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

I think the problem is that the %h you are referencing is gone (it's pad) before val is called. changing new to have a new copy of %h and fixing val to end with a a reference fixes it.
The %h is fine because it's refcnt never dropped below 1. But referencing the value of the hash works a treat! I can now lvalue assign my tied hash elements of blessed-hash object attributes to my hearts content, many many thanks shotgunefx!

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Re: lvalue trickery solution
by shotgunefx (Parson) on Jul 26, 2002 at 17:18 UTC
    Your welcome. Chock the %newh up to cruft. Originally I thought that was the problem. Thinking it was referencing a value that was getting GC'ed. Copying %h suppressed the "Can't return a temporary from lvalue subroutine" but it just failed silently. Then I fixed val so you are correct. The temp assignment is not neccassary.

    -Lee

    "To be civilized is to deny one's nature."