diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-12-25 18:02:57 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-12-26 17:54:26 -0800 |
commit | 2c6c1df5c2ddebe97be50ffbfbe1f5a2cf113eb1 (patch) | |
tree | 655e3eebb7adbde2f11101723e7fb61f5d5e00dc /dist/constant | |
parent | 88df5f01a6650d6895e7d3f03d1b340ca2506b05 (diff) | |
download | perl-2c6c1df5c2ddebe97be50ffbfbe1f5a2cf113eb1.tar.gz |
Remove constant.pm-specific behaviour from Internals::SvREADONLY
Some stuff on CPAN is using this undocumented function, so give
constant.pm its own. It is already a core module, depending on
functionality provided by the core solely for its sake; so this
does not really change its relationship to the core.
Diffstat (limited to 'dist/constant')
-rw-r--r-- | dist/constant/lib/constant.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dist/constant/lib/constant.pm b/dist/constant/lib/constant.pm index d1353ee363..f7d6bd9d9e 100644 --- a/dist/constant/lib/constant.pm +++ b/dist/constant/lib/constant.pm @@ -27,7 +27,7 @@ BEGIN { # By doing this, we save 1 run time check for *every* call to import. my $const = $] > 5.009002; my $downgrade = $] < 5.015004; # && $] >= 5.008 - my $constarray = $] >= 5.019003; + my $constarray = exists &_make_const; if ($const) { Internals::SvREADONLY($const, 1); Internals::SvREADONLY($downgrade, 1); @@ -161,8 +161,8 @@ sub import { } elsif (@_) { my @list = @_; if (_CAN_PCS_FOR_ARRAY) { - Internals::SvREADONLY($list[$_], 1) for 0..$#list; - Internals::SvREADONLY(@list, 1); + _make_const($list[$_]) for 0..$#list; + _make_const(@list); if ($symtab && !exists $symtab->{$name}) { $symtab->{$name} = \@list; $flush_mro++; |