develooper Front page | perl.perl5.porters | Postings from February 2017

[perl #130674] lib/ setting $^H?

Thread Next
Tony Cook via RT
February 1, 2017 05:34
[perl #130674] lib/ setting $^H?
Message ID:
On Mon, 30 Jan 2017 09:45:53 -0800, hv wrote:
> I just noticed this in lib/
>     } elsif  (($^H &= strict::bits('vars'))) {
>                    ^^
> which seems a bit weird. The check was introduced in 2000 by 1d76c68a,
> and
> survived numerous further edits in 2002, but hasn't been touched since
> then.
> I suspect it should just be:
>   } elsif ($^H & strict::bits('vars')) {
> but I'm not sure; if it is correct, it'd be useful to add a comment
> explaining why it's sane.

It's broken, since it removes non-vars strictness:

 ./perl -Ilib -e 'use strict "refs"; use vars qw($foo$); my $x= "abc"; print $$x'

(no error from the symbolic ref)

The attached fixes it, but we're in a "no changes in behaviour" freeze.  This has been broken long enough that I could easily see code out there this fix would break.


via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About