X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/fbff26bcac0ac41e44778278aca063f82c1d70e0..369236063a992c09b5fd6efb6f0910bd1d5effcd:/pod/perlmodstyle.pod diff --git a/pod/perlmodstyle.pod b/pod/perlmodstyle.pod index 1e9a6a9..71ca30b 100644 --- a/pod/perlmodstyle.pod +++ b/pod/perlmodstyle.pod @@ -370,7 +370,7 @@ which is visible to the user (and most things that aren't!) =item Parameter passing -Use named parameters. It's easier to use a hash like this: +Use named parameters. It's easier to use a hash like this: $obj->do_something( name => "wibble", @@ -566,7 +566,7 @@ Your module should also include a README file describing the module and giving pointers to further information (website, author email). An INSTALL file should be included, and should contain simple installation -instructions. When using ExtUtils::MakeMaker this will usually be: +instructions. When using ExtUtils::MakeMaker this will usually be: =over 4 @@ -620,14 +620,14 @@ The most common CPAN version numbering scheme looks like this: 1.00, 1.10, 1.11, 1.20, 1.30, 1.31, 1.32 A correct CPAN version number is a floating point number with at least -2 digits after the decimal. You can test whether it conforms to CPAN by +2 digits after the decimal. You can test whether it conforms to CPAN by 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 +regular version number followed by at least 2 digits, eg. 1.20_01. If you do this, the following idiom is recommended: our $VERSION = "1.12_01"; # so CPAN distribution will have @@ -638,7 +638,7 @@ you do this, the following idiom is recommended: 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 +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. @@ -647,9 +647,9 @@ incrementing the number. Even a one-word documentation patch should result in a change in version at the sub-minor level. Once picked, it is important to stick to your version scheme, without -reducing the number of digits. This is because "downstream" packagers, +reducing the number of digits. This is because "downstream" packagers, such as the FreeBSD ports system, interpret the version numbers in -various ways. If you change the number of digits in your version scheme, +various ways. If you change the number of digits in your version scheme, you can confuse these systems so they get the versions of your module out of order, which is obviously bad. @@ -685,7 +685,7 @@ Specify version requirements for other Perl modules in the pre-requisites in your Makefile.PL or Build.PL. Be sure to specify Perl version requirements both in Makefile.PL or -Build.PL and with C or similar. See the section on +Build.PL and with C or similar. See the section on C of L for details. =head2 Testing @@ -696,7 +696,8 @@ and the tests should also be available to people installing the modules For Module::Build you would use the C equivalent C. The importance of these tests is proportional to the alleged stability of a -module. A module which purports to be stable or which hopes to achieve wide +module. A module which purports to be +stable or which hopes to achieve wide use should adhere to as strict a testing regime as possible. Useful modules to help you write tests (with minimum impact on your @@ -711,8 +712,9 @@ Currently you have the choice between ExtUtils::MakeMaker and the more platform independent Module::Build, allowing modules to be installed in a consistent manner. When using ExtUtils::MakeMaker, you can use "make dist" to create your -package. Tools exist to help you to build your module in a MakeMaker-friendly -style. These include ExtUtils::ModuleMaker and h2xs. See also L. +package. Tools exist to help you to build your module in a +MakeMaker-friendly style. These include ExtUtils::ModuleMaker and h2xs. +See also L. =head2 Licensing