Skip to content

Instantly share code, notes, and snippets.

Created March 11, 2011 17:50
Show Gist options
  • Save anonymous/866256 to your computer and use it in GitHub Desktop.
Save anonymous/866256 to your computer and use it in GitHub Desktop.
use strict; use warnings;
use PadWalker;
print "1..1\n";
use Devel::Peek;
use overload;
my $f = sub {
my $x = [];
my $ret = sub {
my $vals = PadWalker::peek_my(0);
return overload::AddrRef($vals->{'$x'});
};
sub { warn $x; $ret->() };
};
use Data::Dumper;
warn Dumper($f->()->());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment