Acme-RightSideOutObject

 view release on metacpan or  search on metacpan

lib/Acme/RightSideOutObject.pm  view on Meta::CPAN


use strict; no strict 'refs';
use warnings;

use Data::Alias;
use PadWalker;
use B;
use Scalar::Util;

sub import {
    *{caller().'::guts'} = sub {
        my $their_self = shift;
        my $weaken = grep $_ eq 'weaken', @_;
        my $debug = grep $_ eq 'debug', @_;
        my $id = Class::InsideOut::id($their_self) or die;
        my $class = ref $their_self;
        my %as_a_hash;
        my $self = bless \%as_a_hash, $class;
        my $our_id = Class::InsideOut::id($self) or die; # sooo bad
        for my $sym (keys %{$class.'::'}) {
            $debug and warn "$class\::$sym\n";



( run in 0.290 second using v1.01-cache-2.11-cpan-b61123c0432 )