diff options
author | Tony Cook <tony@develop-help.com> | 2017-02-01 16:31:02 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2018-09-26 14:39:52 +1000 |
commit | eda3f954e1ab1728381b70aa008fe2226fd05de2 (patch) | |
tree | 7a14ee08412e3f1e4e9a7a83f08994922b4e78c4 /lib/vars.pm | |
parent | 4e3855f131e01fb258a8cb812abd6a50fc7fc48b (diff) | |
download | perl-eda3f954e1ab1728381b70aa008fe2226fd05de2.tar.gz |
(perl #130674) don't modify $^H in vars.pm
This could remove non-vars strictness from the caller.
Diffstat (limited to 'lib/vars.pm')
-rw-r--r-- | lib/vars.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vars.pm b/lib/vars.pm index 5f6c0598ca..1027986fac 100644 --- a/lib/vars.pm +++ b/lib/vars.pm @@ -2,7 +2,7 @@ package vars; use 5.006; -our $VERSION = '1.04'; +our $VERSION = '1.05'; use warnings::register; use strict qw(vars subs); @@ -20,7 +20,7 @@ sub import { Carp::croak("Can't declare individual elements of hash or array"); } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) { warnings::warn("No need to declare built-in vars"); - } elsif (($^H &= strict::bits('vars'))) { + } elsif (($^H & strict::bits('vars'))) { require Carp; Carp::croak("'$_' is not a valid variable name under strict vars"); } |