develooper Front page | perl.perl5.porters | Postings from January 2011

Re: [perl #75870] perldata.pod tied hash in scalar context

Thread Previous
From:
Dave Mitchell
Date:
January 21, 2011 09:26
Subject:
Re: [perl #75870] perldata.pod tied hash in scalar context
Message ID:
20110121172554.GM2835@iabyn.com
On Fri, Jun 18, 2010 at 03:58:08PM -0700, Kevin Ryde wrote:
> perldata.pod near the end of "Scalar values" says
> 
>        If a tied hash is evaluated in scalar context, a fatal error will
>        result, since this bucket usage information is currently not
>        available for tied hashes.
> 
> If I'm not mistaken this is no longer so, ie. a tied hash in scalar
> context is not fatal.  In fact in 5.10 the return may be a true/false
> for emptiness like a plain hash even when the tie doesn't implement a
> SCALAR method itself.

Thanks for the report. Now fixed in bleadperl with commit
    6e4c4703d5584b6bcbb9adfe4cdff420d0c88911
-- 
SCO - a train crash in slow motion

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About