On Mon, Jun 04, 2001 at 10:24:28PM -0700, Craig Barratt wrote:
> BTW, there is another bug with undef values.  stash->get converts undef
> to an empty string, so an undef value in the stash doesn't survive any
> expression, argument passing or assignment.  

Yep, I'm afraid that's another misfeature which could do with some 
improvement.  Somehwere along the line, something has to catch undefs
and convert them to empty string for those times when you don't want
warnings raised.  But if you wrap it up in the wrong place, as I think
I might have done, then you have this problem with losing information.

In Perl term, the benefit is that you can generate code of the form:

    $output .= $stash->get('foo');

and not have to worry about undefs, but with the drawback that

    $stash->set(foo => $stash->get('bar'));

doesn't transfer the undefness, as Craig points out.

Hmmm...


A


-- 
Andy Wardley <[EMAIL PROTECTED]>   Signature regenerating.  Please remain seated.
     <[EMAIL PROTECTED]>   For a good time: http://www.kfs.org/~abw/


Reply via email to