X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlmodstyle.pod;h=558edcf26ab3c4318e597006b1fff60cb5013cb0;hb=0111df86b68202837d8ca044a27bbc00d7895fb1;hp=4da7311f7aa30e563ff13951abddc730f873faa7;hpb=f67486beba48c3146946f5320d63fa647944efb5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlmodstyle.pod b/pod/perlmodstyle.pod index 4da7311..558edcf 100644 --- a/pod/perlmodstyle.pod +++ b/pod/perlmodstyle.pod @@ -498,7 +498,7 @@ A contact email address for the author/maintainer The level of detail in Perl module documentation generally goes from less detailed to more detailed. Your SYNOPSIS section should contain a minimal example of use (perhaps as little as one line of code; skip the -unusual use cases or or anything not needed by most users); the +unusual use cases or anything not needed by most users); the DESCRIPTION should describe your module in broad terms, generally in just a few paragraphs; more detail of the module's routines or methods, lengthy code examples, or other in-depth material should be given in @@ -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