summaryrefslogtreecommitdiff
path: root/pod/perlmodstyle.pod
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2002-03-22 17:27:51 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-22 15:15:37 +0000
commit4398853c9960f1d741fa0caa3468657b500c36b0 (patch)
treef8df9e2c3bf370be7a5a0a0db53db371ad82f63c /pod/perlmodstyle.pod
parent31ee0cb7dc5352bfe8a41a2a493a0a48e08aa12e (diff)
downloadperl-4398853c9960f1d741fa0caa3468657b500c36b0.tar.gz
Re: Argument "1.23_45" isn't numeric in subroutine entry
Message-ID: <m3n0x0vczs.fsf@anima.de> p4raw-id: //depot/perl@15420
Diffstat (limited to 'pod/perlmodstyle.pod')
-rw-r--r--pod/perlmodstyle.pod17
1 files changed, 14 insertions, 3 deletions
diff --git a/pod/perlmodstyle.pod b/pod/perlmodstyle.pod
index c039da7ee3..558edcf26a 100644
--- a/pod/perlmodstyle.pod
+++ b/pod/perlmodstyle.pod
@@ -588,9 +588,20 @@ using
perl -MExtUtils::MakeMaker -le 'print MM->parse_version(shift)' 'Foo.pm'
-If you want to release a 'beta' or 'alpha' version of a module but don't
-want CPAN.pm to list it as most recent use an '_' after the regular
-version number followed by at least 2 digits, eg. 1.20_01
+If you want to release a 'beta' or 'alpha' version of a module but
+don't want CPAN.pm to list it as most recent use an '_' after the
+regular version number followed by at least 2 digits, eg. 1.20_01. If
+you do this, the following idiom is recommended:
+
+ $VERSION = "1.12_01";
+ $XS_VERSION = $VERSION; # only needed if you have XS code
+ $VERSION = eval $VERSION;
+
+With that trick MakeMaker will only read the first line and thus read
+the underscore, while the perl interpreter will evaluate the $VERSION
+and convert the string into a number. Later operations that treat
+$VERSION as a number will then be able to do so without provoking a
+warning about $VERSION not being a number.
Never release anything (even a one-word documentation patch) without
incrementing the number. Even a one-word documentation patch should