This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make ext/B work with 5.16.x
authorDavid Mitchell <davem@iabyn.com>
Wed, 24 Oct 2012 14:50:25 +0000 (15:50 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 26 Oct 2012 15:51:55 +0000 (16:51 +0100)
commit82aeefe162adb05e9fab0d665d4df0c56f2252ec
tree0347bdf31c0dab910f8f5130edf708b191a1629d
parenta5e62da03c2cb46e070067467ac3b29dd44b96bd
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.
12 files changed:
ext/B/B.pm
ext/B/B.xs
ext/B/t/OptreeCheck.pm
ext/B/t/b.t
ext/B/t/concise-xs.t
ext/B/t/f_map.t
ext/B/t/f_sort.t
ext/B/t/optree_check.t
ext/B/t/optree_constants.t
ext/B/t/optree_misc.t
ext/B/t/optree_samples.t
ext/B/typemap