X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlmodlib.pod;h=f10d04bb4a239c22bf0526ff7b8987d6fdeca078;hb=c8984b0bd19897e6e30588055ac0338326f20a34;hp=14bb7ebfa45244710d636f5bbb74abd4742a6ad3;hpb=b6c543e345c32071a6c3c124ee19c0eb9bb3df41;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlmodlib.pod b/pod/perlmodlib.pod index 14bb7eb..f10d04b 100644 --- a/pod/perlmodlib.pod +++ b/pod/perlmodlib.pod @@ -21,7 +21,7 @@ bulletproof. They work somewhat like pragmas in that they tend to affect the compilation of your program, and thus will usually work well only when used within a -C, or C. Most of these are locally scoped, so an inner BLOCK +C, or C. Most of these are lexically scoped, so an inner BLOCK may countermand any of these by saying: no integer; @@ -79,6 +79,10 @@ restrict named opcodes when compiling or running Perl code overload basic Perl operations +=item re + +alter behaviour of regular expressions + =item sigtrap enable simple signal handling @@ -271,7 +275,7 @@ supply object methods for filehandles =item FindBin -locate directory of original perl script +locate directory of original Perl script =item GDBM_File @@ -368,7 +372,7 @@ by-name interface to Perl's builtin getserv*() functions =item Opcode -disable named opcodes when compiling or running perl code +disable named opcodes when compiling or running Perl code =item Pod::Text @@ -400,7 +404,7 @@ load functions only on demand =item Shell -run shell commands transparently within perl +run shell commands transparently within Perl =item Socket @@ -432,7 +436,7 @@ interface to various C packages =item Test::Harness -run perl standard test scripts with statistics +run Perl standard test scripts with statistics =item Text::Abbrev @@ -503,7 +507,7 @@ by-name interface to Perl's builtin getpw*() functions To find out I the modules installed on your system, including those without documentation or outside the standard release, do this: - find `perl -e 'print "@INC"'` -name '*.pm' -print + % find `perl -e 'print "@INC"'` -name '*.pm' -print They should all have their own documentation installed and accessible via your system man(1) command. If that fails, try the I program. @@ -762,7 +766,7 @@ Avoid C<$r-EClass::func()> where using C<@ISA=qw(... Class ...)> and C<$r-Efunc()> would work (see L for more details). Use autosplit so little used or newly added functions won't be a -burden to programs which don't use them. Add test functions to +burden to programs that don't use them. Add test functions to the module after __END__ either using AutoSplit or by saying: eval join('',) || die $@ unless caller(); @@ -779,12 +783,12 @@ information in objects. Always use B<-w>. Try to C (or C). Remember that you can add C to individual blocks -of code which need less strictness. Always use B<-w>. Always use B<-w>! +of code that need less strictness. Always use B<-w>. Always use B<-w>! Follow the guidelines in the perlstyle(1) manual. =item Some simple style guidelines -The perlstyle manual supplied with perl has many helpful points. +The perlstyle manual supplied with Perl has many helpful points. Coding style is a matter of personal taste. Many people evolve their style over several years as they learn what helps them write and @@ -804,7 +808,7 @@ use mixed case with no underscores (need to be short and portable). You may find it helpful to use letter case to indicate the scope or nature of a variable. For example: - $ALL_CAPS_HERE constants only (beware clashes with perl vars) + $ALL_CAPS_HERE constants only (beware clashes with Perl vars) $Some_Caps_Here package-wide global/static $no_caps_here function scope my() or local() variables @@ -934,7 +938,7 @@ GPL and The Artistic Licence (see the files README, Copying, and Artistic). Larry has good reasons for NOT just using the GNU GPL. My personal recommendation, out of respect for Larry, Perl, and the -perl community at large is to state something simply like: +Perl community at large is to state something simply like: Copyright (c) 1995 Your Name. All rights reserved. This program is free software; you can redistribute it and/or @@ -969,7 +973,7 @@ If possible you should place the module into a major ftp archive and include details of its location in your announcement. Some notes about ftp archives: Please use a long descriptive file -name which includes the version number. Most incoming directories +name that includes the version number. Most incoming directories will not be readable/listable, i.e., you won't be able to see your file after uploading it. Remember to send your email notification message as soon as possible after uploading else your file may get @@ -998,8 +1002,8 @@ Please remember to send me an updated entry for the Module list! =item Take care when changing a released module. -Always strive to remain compatible with previous released versions -(see 2.2 above) Otherwise try to add a mechanism to revert to the +Always strive to remain compatible with previous released versions. +Otherwise try to add a mechanism to revert to the old behaviour if people rely on it. Document incompatible changes. =back @@ -1019,7 +1023,7 @@ there is no need to convert a .pl file into a Module for just that. =item Consider the implications. -All the perl applications which make use of the script will need to +All Perl applications that make use of the script will need to be changed (slightly) if the script is converted into a module. Is it worth it unless you plan to make other changes at the same time? @@ -1062,7 +1066,7 @@ Don't delete the original .pl file till the new .pm one works! =item Complete applications rarely belong in the Perl Module Library. -=item Many applications contain some perl code which could be reused. +=item Many applications contain some Perl code that could be reused. Help save the world! Share your code in a form that makes it easy to reuse. @@ -1076,9 +1080,9 @@ to reuse. fragment of code built on top of the reusable modules. In these cases the application could invoked as: - perl -e 'use Module::Name; method(@ARGV)' ... + % perl -e 'use Module::Name; method(@ARGV)' ... or - perl -mModule::Name ... (in perl5.002 or higher) + % perl -mModule::Name ... (in perl5.002 or higher) =back