summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@cpan.org>2011-07-01 23:18:09 -0400
committerFather Chrysostomos <sprout@cpan.org>2011-07-01 21:59:24 -0700
commitc8c8e589d797908c16fc78c20698c3b606331e15 (patch)
treea5bd469a635702edf2abcb9670cf9fe787a9ac49 /lib
parent005700e9b03137beeab81285c93bdf3b797bb055 (diff)
downloadperl-c8c8e589d797908c16fc78c20698c3b606331e15.tar.gz
Revise check for negative versions plus test
Diffstat (limited to 'lib')
-rw-r--r--lib/version.pm2
-rw-r--r--lib/version.t4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/version.pm b/lib/version.pm
index adeaacdd47..1126f91d5a 100644
--- a/lib/version.pm
+++ b/lib/version.pm
@@ -6,7 +6,7 @@ use strict;
use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
-$VERSION = 0.88;
+$VERSION = 0.92;
$CLASS = 'version';
diff --git a/lib/version.t b/lib/version.t
index d2e3a2b35a..bee90785ac 100644
--- a/lib/version.t
+++ b/lib/version.t
@@ -213,6 +213,10 @@ sub BaseTests {
like($@, qr/non-numeric data/,
"Invalid version format (non-numeric data)");
+ eval { $version = $CLASS->$method("-1.23")};
+ like($@, qr/negative version number/,
+ "Invalid version format (negative version number)");
+
# from here on out capture the warning and test independently
{
eval{$version = $CLASS->$method("99 and 44/100 pure")};