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

Re: HINT_BLOCK_SCOPE leaking at run time with perl 5.12-5.14 onWindows

Thread Previous
From:
Nicholas Clark
Date:
September 21, 2012 03:48
Subject:
Re: HINT_BLOCK_SCOPE leaking at run time with perl 5.12-5.14 onWindows
Message ID:
20120921104825.GD5653@plum.flirble.org
On Fri, Sep 21, 2012 at 02:02:16AM +0100, Steve Hay wrote:
> On 20 September 2012 22:57, Vincent Pit <perl@profvince.com> wrote:
> > Does anyone know why
> >
> >    perl -le "print sub { (caller 0)[8] }->()"
> >
> > prints 256 on Windows with perl 5.12, but 0 with 5.10.1?
> >
> 
> I'm not sure what versions are affected, but with recent perls (5.16,
> 5.17) I see the above printing 0 in default builds, but it prints 256
> if USE_SITECUSTOMIZE is switched on *and* the site\lib folder
> exists(!).

Aha, useful.

> (The default installation layout is:
> 
> C:\perl\bin - binaries
> C:\perl\lib - libraries
> C:\perl\site\lib - empty location for CPAN libraries to go
> 
> With USE_SITECUSTOMIZE enabled your one-liner initially prints 256
> with the above layout, but if you delete the empty lib folder from
> C:\perl\site then the one-liner prints 0 again! The default build
> without USE_SITECUSTOMIZE is not affected in this way.)

$ ./perl -Ilib -MConfig -le "print sub { (caller 0)[8] }->();" -e 'print for $^O, $Config{usesitecustomize}'
256
linux
define

So I can replicate the first part on Linux. Not sure which lib this is being
sensitive to, as the the @INC for the perl I'm testing points to somewhere
uninstalled.

Nicholas Clark

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