Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: lvalue trickery

by broquaint (Abbot)
on Jul 26, 2002 at 12:59 UTC ( [id://185520]=note: print w/replies, xml ) Need Help??


in reply to Re: lvalue trickery
in thread lvalue trickery

Hmmm, in the "untied" branch, you assign to $obj->val before the dump; you do it after in the version that dies.
Well I can't do the Dump after the $obj->val assigment as that's where it dies. I don't believe it's an auto-vivification issue as there's nothing that's being auto-vivfied and if you Data::Dumper the object you can see that both tied and untied are exactly the same.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Re: lvalue trickery
by dada (Chaplain) on Jul 26, 2002 at 13:13 UTC
    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;
Re: Re: Re: lvalue trickery
by RMGir (Prior) on Jul 26, 2002 at 13:09 UTC
    Ah, missed that. I thought the "many more lines of 0's" on the dump was where it was crashing.

    Do you have the same problem if you use another Tie module?
    --
    Mike

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-28 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found