in reply to Delay evaluation of tied scalar when returned from sub

The only practical way to achieve what you want is to pass around a reference to the tied scalar.

Dave.

  • Comment on Re: Delay evaluation of tied scalar when returned from sub

Replies are listed 'Best First'.
Re^2: Delay evaluation of tied scalar when returned from sub
by harryf (Beadle) on Aug 30, 2006 at 12:04 UTC
    I guess so. That's a shame as it pushes the problem to the caller, and was hoping to keep it transparent - the idea would be to use be able to pass the lazy value to, say, a template engine and only have it evaluated on output, but the template engine (or it's user) is able to be blissfully unaware of what's happening behind the scenes.