summaryrefslogtreecommitdiff
path: root/cpan/version
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@cpan.org>2014-01-04 10:51:55 -0500
committerFather Chrysostomos <sprout@cpan.org>2014-01-04 10:53:46 -0800
commiteffa684c828074be726bb9c5fac18c3e4f1e746b (patch)
tree18454625d004064ab6be67390cd8de8ef08faa23 /cpan/version
parentbea5cecf09ba646ff0ff797c17f2360066b71732 (diff)
downloadperl-effa684c828074be726bb9c5fac18c3e4f1e746b.tar.gz
Final patch to sync with version.pm CPAN release
A last couple of test tweaks so that version.pm now passes all tests from 5.005_04 to blead. NOTE the pure Perl version::vpp is not default for all Perl releases prior to v5.10.
Diffstat (limited to 'cpan/version')
-rw-r--r--cpan/version/lib/version.pm4
-rw-r--r--cpan/version/lib/version/vpp.pm2
-rw-r--r--cpan/version/t/09_list_util.t55
3 files changed, 32 insertions, 29 deletions
diff --git a/cpan/version/lib/version.pm b/cpan/version/lib/version.pm
index b21f1bdf56..dfdee5e05e 100644
--- a/cpan/version/lib/version.pm
+++ b/cpan/version/lib/version.pm
@@ -1,10 +1,10 @@
#!perl -w
package version;
-use 5.005_05;
+use 5.005_04;
use strict;
-use vars qw(@ISA $VERSION $CLASS *declare *qv);
+use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
$VERSION = 0.9905;
$CLASS = 'version';
diff --git a/cpan/version/lib/version/vpp.pm b/cpan/version/lib/version/vpp.pm
index c879c398c8..79e74c3875 100644
--- a/cpan/version/lib/version/vpp.pm
+++ b/cpan/version/lib/version/vpp.pm
@@ -117,7 +117,7 @@ sub currstr {
package version::vpp;
-use 5.005_05;
+use 5.005_04;
use strict;
use POSIX qw/locale_h/;
diff --git a/cpan/version/t/09_list_util.t b/cpan/version/t/09_list_util.t
index f7fb89f021..4882ee9722 100644
--- a/cpan/version/t/09_list_util.t
+++ b/cpan/version/t/09_list_util.t
@@ -4,34 +4,37 @@
#########################
use strict;
-use Test::More tests => 3;
use_ok("version", 0.9905);
+use Test::More;
-# do strict lax tests in a sub to isolate a package to test importing
-SKIP: {
- eval "use List::Util qw(reduce);";
- skip 'No reduce() in List::Util', 2
- if $@;
-
- # use again to get the import()
- use List::Util qw(reduce);
- {
- my $fail = 0;
- my $ret = reduce {
- version->parse($a);
- $fail++ unless defined $a;
- 1
- } "0.039", "0.035";
- is $fail, 0, 'reduce() with parse';
+BEGIN {
+ eval "use List::Util qw(reduce)";
+ if ($@) {
+ plan skip_all => "No List::Util::reduce() available";
+ } else {
+ plan tests => 3;
}
+}
- {
- my $fail = 0;
- my $ret = reduce {
- version->qv($a);
- $fail++ unless defined $a;
- 1
- } "0.039", "0.035";
- is $fail, 0, 'reduce() with qv';
- }
+# do strict lax tests in a sub to isolate a package to test importing
+# use again to get the import()
+use List::Util qw(reduce);
+{
+ my $fail = 0;
+ my $ret = reduce {
+ version->parse($a);
+ $fail++ unless defined $a;
+ 1
+ } "0.039", "0.035";
+ is $fail, 0, 'reduce() with parse';
+}
+
+{
+ my $fail = 0;
+ my $ret = reduce {
+ version->qv($a);
+ $fail++ unless defined $a;
+ 1
+ } "0.039", "0.035";
+ is $fail, 0, 'reduce() with qv';
}