diff options
author | David Mitchell <davem@iabyn.com> | 2012-10-24 15:50:25 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-10-26 16:51:55 +0100 |
commit | 82aeefe162adb05e9fab0d665d4df0c56f2252ec (patch) | |
tree | 0347bdf31c0dab910f8f5130edf708b191a1629d /ext/B/t/concise-xs.t | |
parent | a5e62da03c2cb46e070067467ac3b29dd44b96bd (diff) | |
download | perl-82aeefe162adb05e9fab0d665d4df0c56f2252ec.tar.gz |
make ext/B work with 5.16.x
The modules and tests under ext/B are notionally supposed to be
portable to older perl versions; in practice, extensive bit-rot
has occurred; often attempts have been made to add version-specific
code, which haven't actually been tested against older perl versions.
This commit does the minimum necessary to get the tests under ext/B
working with 5.16.0 and 5.16.1, threaded and unthreaded. It makes no
assertions as to whether it will work with the rest of the 5.16.x test
suite.
The side effects of this fix-up are:
* a facility has been added to OptreeCheck.pm (the test module that
checks the Concise output of various constructs) that allows
version-specific matching, e.g.:
# 4 <$> const(PV "junk") s* < 5.017002
# 4 <$> const(PV "junk") s*/FOLD >=5.017002
* OptreeCheck.pm's skip mechanism was found to be broken: checkOptree()
allows you to specify skipping, but only skipped one test, even though
a single call to checkOptree() could generate multiple lines of test
output.
Diffstat (limited to 'ext/B/t/concise-xs.t')
-rw-r--r-- | ext/B/t/concise-xs.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t index efd0cf7788..eeb9f730e0 100644 --- a/ext/B/t/concise-xs.t +++ b/ext/B/t/concise-xs.t @@ -251,6 +251,7 @@ EODIE if (%opts) { require Data::Dumper; Data::Dumper->import('Dumper'); + { my $x = \*Data::Dumper::Sortkeys } # shut up 'used once' warning $Data::Dumper::Sortkeys = 1; } my @argpkgs = @ARGV; @@ -353,6 +354,7 @@ sub corecheck { warn "Module::CoreList not available on $]\n"; return; } + { my $x = \*Module::CoreList::version } # shut up 'used once' warning my $mods = $Module::CoreList::version{'5.009002'}; $mods = [ sort keys %$mods ]; print Dumper($mods); @@ -364,6 +366,7 @@ sub corecheck { END { if ($opts{c}) { + { my $x = \*Data::Dumper::Indent } # shut up 'used once' warning $Data::Dumper::Indent = 1; print "Corrections: ", Dumper(\%report); |