Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: lvalue trickery

by dada (Chaplain)
on Jul 26, 2002 at 13:13 UTC ( #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? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-05-16 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?