summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorBrad Gilbert <b2gills@gmail.com>2013-03-04 12:36:56 -0600
committerKarl Williamson <public@khwilliamson.com>2013-03-20 12:25:53 -0600
commit2b7e302aafb087c3e0ad3f0105cb43e566196e84 (patch)
tree352f24f0a748f6b48b609d0e7f17b6e148c01f4f /dist
parent60b8fafeb11519ee514f3d9213b109aa52133e87 (diff)
downloadperl-2b7e302aafb087c3e0ad3f0105cb43e566196e84.tar.gz
Make utf8 downgrading in constant.pm, version dependent
The reason for this change is that the test that determines when to do this caused the utf8 module to always be loaded.
Diffstat (limited to 'dist')
-rw-r--r--dist/constant/lib/constant.pm15
1 files changed, 3 insertions, 12 deletions
diff --git a/dist/constant/lib/constant.pm b/dist/constant/lib/constant.pm
index 1940b8e8f5..035bce2374 100644
--- a/dist/constant/lib/constant.pm
+++ b/dist/constant/lib/constant.pm
@@ -4,7 +4,7 @@ use strict;
use warnings::register;
use vars qw($VERSION %declared);
-$VERSION = '1.26';
+$VERSION = '1.27';
#=======================================================================
@@ -29,17 +29,8 @@ BEGIN {
my $const = $] > 5.009002;
*_CAN_PCS = sub () {$const};
- # Before this makes its way into a dev perl release, we have to do
- # browser-sniffing, as it were....
- *{chr 256} = \3;
- if (exists ${__PACKAGE__."::"}{"\xc4\x80"}) {
- delete ${__PACKAGE__."::"}{"\xc4\x80"};
- *_DOWNGRADE = sub () {1};
- }
- else {
- delete ${__PACKAGE__."::"}{chr 256};
- *_DOWNGRADE = sub () {0};
- }
+ my $downgrade = $] < 5.015004; # && $] >= 5.008
+ *_DOWNGRADE = sub () { $downgrade };
}
#=======================================================================