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

Re: [perl #107528] Autovivification should be ignored when testingfor existence

Thread Previous | Thread Next
From:
Dr.Ruud
Date:
January 6, 2012 18:13
Subject:
Re: [perl #107528] Autovivification should be ignored when testingfor existence
Message ID:
20120107010639.18359.qmail@lists-nntp.develooper.com
On 2012-01-05 23:58, Robert Colvin via RT wrote:

> in testing existence
> the state of variables are
> modified. exists should be a safe
> operation and it is therefore
> reasonable to expect that it
> won't make any modifications

Reminds me:

This also changes the state of $a:

     my $a = "2";
     ...;
     print "yes" if $a > 0;

If that $a is on a shared memory page, and that numeric test happens in 
a child process, it will probably cause the memory page to be really 
copied. Which can eat RAM fast.

-- 
Ruud

Thread Previous | Thread Next


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