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