- or download this
my $a = []; $a->[1]{bar}{baz}[3] = 7;
bless $a, "hrmph";
*hrmph::deref = sub { $_[0]->[1]{bar}{baz}[3] };
print "yeah: ", $a->deref, "\n";
- or download this
my $x = []; $x->[1]{bar}{baz}[3] = 7;
bless $x, "whatever";
my $deref = sub { $_[0]->[1]{bar}{baz}[3] };
print "yeah: ", $x->$deref, "\n";
- or download this
my $x = []; $x->[1]{bar}{baz}[3] = 7;
# bless $x, "whatever";
my $deref = sub { $_[0]->[1]{bar}{baz}[3] };
print "yeah: ", $x->$deref, "\n";