summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-01-06 21:59:00 +0000
committerSteve Peters <steve@fisharerojo.org>2006-01-06 21:59:00 +0000
commit34ba6322b644154d55680c95808981776852ae24 (patch)
treeaabe0a4ab0822979a1d0ba9134c969c4c9f52a53 /lib
parent29ecdb6fa31693daf50c1386a8ec5d92fb7b0313 (diff)
downloadperl-34ba6322b644154d55680c95808981776852ae24.tar.gz
Upgrade to version-0.52
p4raw-id: //depot/perl@26685
Diffstat (limited to 'lib')
-rw-r--r--lib/version.pm2
-rw-r--r--lib/version.pod25
-rw-r--r--lib/version.t6
3 files changed, 24 insertions, 9 deletions
diff --git a/lib/version.pm b/lib/version.pm
index 9443a6ac99..dafbae63b2 100644
--- a/lib/version.pm
+++ b/lib/version.pm
@@ -11,7 +11,7 @@ use vars qw(@ISA $VERSION $CLASS @EXPORT);
@EXPORT = qw(qv);
-$VERSION = 0.50;
+$VERSION = 0.52;
$CLASS = 'version';
diff --git a/lib/version.pod b/lib/version.pod
index 509089cd12..a8742033fe 100644
--- a/lib/version.pod
+++ b/lib/version.pod
@@ -55,13 +55,24 @@ and to not rely on hidden behavior of the parser.
=item * Be careful
If you are using Module::Build or ExtUtils::MakeMaker, so that you can
-release your module to CPAN, you have to recognize that none of those
-programs currently handles version objects natively (yet). That also
-goes for the CPAN indexer (PAUSE). Although there are modules on CPAN
-that employ the version module internally, the support for assigning a
-module $VERSION scalar is still lacking. Both Module::Build and the
-PAUSE indexer will [hopefully soon] include support for version
-objects.
+release your module to CPAN, you have to recognize that neither of those
+programs completely handles version objects natively (yet). If you use
+version objects with Module::Build, you should add an explicit dependency
+to the release of version.pm in your Build.PL:
+
+ my $builder = Module::Build->new(
+ ...
+ requires => {
+ ... ,
+ 'version' => 0.50,
+ ...,
+ },
+ ...
+ );
+
+and it should Just Work(TM). Module::Build will [hopefully soon]
+include full support for version objects; there are no current plans
+to patch ExtUtils::MakeMaker to support version objects.
=head2 What IS a version
diff --git a/lib/version.t b/lib/version.t
index 8a8c209db2..16f306cd82 100644
--- a/lib/version.t
+++ b/lib/version.t
@@ -4,7 +4,7 @@
#########################
-use Test::More tests => 202;
+use Test::More qw(no_plan);
diag "Tests with base class" unless $ENV{PERL_CORE};
@@ -94,6 +94,10 @@ sub BaseTests {
like($@, qr/underscores before decimal/,
"Invalid version format (underscores before decimal)");
+ eval {my $version = $CLASS->new("1_2")};
+ like($@, qr/alpha without decimal/,
+ "Invalid version format (alpha without decimal)");
+
$version = $CLASS->new("99 and 44/100 pure");
ok ("$version" eq "99.000", '$version eq "99.000"');
ok ($version->numify == 99.0, '$version->numify == 99.0');