in reply to lvalue trickery

Hmmm, in the "untied" branch, you assign to $obj->val before the dump; you do it after in the version that dies.

Maybe that's the bug? It might be an auto-vivification issue, more than a tie issue.

That's a wild guess, though.
--
Mike

Replies are listed 'Best First'.
Re: Re: lvalue trickery
by broquaint (Abbot) on Jul 26, 2002 at 12:59 UTC
    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

      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;
      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