Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Re: lvalue trickery

by dada (Chaplain)
on Jul 26, 2002 at 13:13 UTC ( [id://185527]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: lvalue trickery
in thread lvalue trickery

Well I can't do the Dump after the $obj->val assigment as that's where it dies.
oh yes, you can:
$SIG{__DIE__} = sub { Dump( $obj->{val}->{one} ); die $_[0]; }; { package foo; use Tie::IxHash; tie(my %h, 'Tie::IxHash', qw(one two three four)); sub new { bless { val => \%h } } sub val : lvalue { $_[0]->{val}->{one} } } use Devel::Peek; my $obj = foo->new; # dies here $obj->val = "foo";
still, this doesn't solve anything :-)

cheers,
Aldo

__END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://185527]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found