develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Coring Variable::Magic / autodie fights with string eval in Perl 5.10.x

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
July 5, 2009 14:19
Subject:
Re: Coring Variable::Magic / autodie fights with string eval in Perl 5.10.x
Message ID:
20090705211937.GI70540@plum.flirble.org
On Mon, Jul 06, 2009 at 01:01:42AM +1000, Paul Fenwick wrote:
> G'day Nicholas,
> 
> Nicholas Clark wrote:

> > This report of a possible bug is a bit late.
> 
> I agree, it's very late!  Until now, I don't think anyone noticed this was
> actually a problem.  What worked in 5.8.x continued to work in 5.10.x.
> String evals are, well, not always the right way of doing things.  As such,
> the amount of code that used lexical triggers via %^H next to string evals
> were very rare.
> 
> Luckily...
> 
> > This behaviour was never a documented part of the implementation.
> > It IS NOT NOW.
> 
> The 'perlpragma.pod' file, which talks about %^H in depth, says one
> shouldn't store anything but simple strings and integers in %^H, because
> anything else will get stringified.  So the stringification *is* documented,
> it's just the timing that isn't.

Here is the documentation for %^H from 5.8.0

=item %^H

WARNING: This variable is strictly for internal use only.  Its availability,
behavior, and contents are subject to change without notice.

The %^H hash provides the same scoping semantic as $^H.  This makes it
useful for implementation of lexically scoped pragmas.

=cut

Here is the documentation for %^H from 5.8.9

=item %^H

WARNING: This variable is strictly for internal use only.  Its availability,
behavior, and contents are subject to change without notice.

The %^H hash provides the same scoping semantic as $^H.  This makes it
useful for implementation of lexically scoped pragmas.

=cut

I'll sleep on my longer reply.

Nicholas Clark

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