perl 5.003_01: pod/perlmod.pod
[p5sagit/p5-mst-13.2.git] / pod / perlmod.pod
index 3ada156..9aa4729 100644 (file)
@@ -7,7 +7,7 @@ perlmod - Perl modules (packages)
 =head2 Packages
 
 Perl provides a mechanism for alternative namespaces to protect packages
-from stomping on each others variables.  In fact, apart from certain
+from stomping on each other's variables.  In fact, apart from certain
 magical variables, there's really no such thing as a global variable in
 Perl.  The package statement declares the compilation unit as being in the
 given namespace.  The scope of the package declaration is from the
@@ -22,7 +22,7 @@ symbol table is used by the compiler for the rest of that block.  You can
 refer to variables and filehandles in other packages by prefixing the
 identifier with the package name and a double colon:
 C<$Package::Variable>.  If the package name is null, the C<main> package
-as assumed.  That is, C<$::sail> is equivalent to C<$main::sail>.
+is assumed.  That is, C<$::sail> is equivalent to C<$main::sail>.
 
 (The old package delimiter was a single quote, but double colon
 is now the preferred delimiter, in part because it's more readable
@@ -69,8 +69,8 @@ or L<perlref> regarding closures.
 
 The symbol table for a package happens to be stored in the associative
 array of that name appended with two colons.  The main symbol table's
-name is thus C<%main::>, or C<%::> for short.  Likewise the nested package
-mentioned earlier is named C<%OUTER::INNER::>.
+name is thus C<%main::>, or C<%::> for short.  Likewise symbol table for
+the nested package mentioned earlier is named C<%OUTER::INNER::>.
 
 The value in each entry of the associative array is what you are referring
 to when you use the C<*name> typeglob notation.  In fact, the following
@@ -120,7 +120,7 @@ Assignment to a typeglob performs an aliasing operation, i.e.,
     *dick = *richard;
 
 causes variables, subroutines and file handles accessible via the
-identifier C<richard> to also be accessible via the symbol C<dick>.  If
+identifier C<richard> to also be accessible via the identifier C<dick>.  If
 you only want to alias a particular variable or subroutine, you can
 assign a reference instead:
 
@@ -190,7 +190,7 @@ For more on this, see L<perlobj>.
 
 =head2 Perl Modules
 
-A module is a just package that is defined in a library file of
+A module is just a package that is defined in a library file of
 the same name, and is designed to be reusable.  It may do this by
 providing a mechanism for exporting some of its symbols into the symbol
 table of any package using it.  Or it may function as a class
@@ -305,7 +305,7 @@ F<.pl> files will all eventually be converted into standard modules, and
 the F<.ph> files made by B<h2ph> will probably end up as extension modules
 made by B<h2xs>.  (Some F<.ph> values may already be available through the
 POSIX module.)  The B<pl2pm> file in the distribution may help in your
-conversion, but it's just a mechanical process, so is far from bullet proof.
+conversion, but it's just a mechanical process, so is far from bulletproof.
 
 =head2 Pragmatic Modules
 
@@ -335,6 +335,10 @@ Pragma to compute arithmetic in integer instead of double
 
 Pragma to request less of something from the compiler
 
+=item ops
+
+Pragma to restrict use of unsafe opcodes
+
 =item overload
 
 Pragma for overloading operators 
@@ -351,6 +355,10 @@ Pragma to restrict unsafe constructs
 
 Pragma to predeclare sub names
 
+=item vars
+
+Pragma to predeclare global symbols
+
 =back
 
 =head2 Standard Modules
@@ -489,6 +497,10 @@ Perl interface to IEEE Std 1003.1
 
 load functions only on demand
 
+=item Safe
+
+Creation controlled compartments in which perl code can be evaluated.
+
 =item Socket
 
 load the C socket.h defines and structure manipulators
@@ -598,7 +610,7 @@ Miscellaneous Modules
 
 =back
 
-Some of the reguster CPAN sites as of this writing include the following.
+The registered CPAN sites as of this writing include the following.
 You should try to choose one close to you:
 
 =over
@@ -672,7 +684,7 @@ ftp://ftp.is.co.za/programming/perl/CPAN/
 =back
 
 For an up-to-date listing of CPAN sites, 
-see http://www.perl.com/perl/ or ftp://ftp.perl.com/perl/ .
+see F<http://www.perl.com/perl/CPAN> or F<ftp://ftp.perl.com/perl/>.
 
 =head1 Modules: Creation, Use and Abuse
 
@@ -743,8 +755,8 @@ Generally you can delete the "eq 'FOO'" part with no harm at all.
 Let the objects look after themselves! Generally, avoid hardwired
 class names as far as possible.
 
-Avoid $r->Class::func() where using @ISA=qw(... Class ...) and
-$r->func() would work (see perlbot man page for more details).
+Avoid $r-E<gt>Class::func() where using @ISA=qw(... Class ...) and
+$r-E<gt>func() would work (see perlbot man page 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
@@ -794,7 +806,7 @@ or nature of a variable. For example:
  $no_caps_here    function scope my() or local() variables
 
 Function and method names seem to work best as all lowercase.
-E.g., $obj->as_string().
+E.g., $obj-E<gt>as_string().
 
 You can use a leading underscore to indicate that a variable or
 function should not be used outside the package that defined it.
@@ -810,7 +822,7 @@ export try to use @EXPORT_OK in preference to @EXPORT and avoid
 short or common names to reduce the risk of name clashes.
 
 Generally anything not exported is still accessible from outside the
-module using the ModuleName::item_name (or $blessed_ref->method)
+module using the ModuleName::item_name (or $blessed_ref-E<gt>method)
 syntax.  By convention you can use a leading underscore on names to
 informally indicate that they are 'internal' and not for public use.
 
@@ -906,6 +918,8 @@ If the README file seems to be getting too large you may wish to
 split out some of the sections into separate files: INSTALL,
 Copying, ToDo etc.
 
+=over 4
+
 =item Adding a Copyright Notice.
 
 How you choose to licence your work is a personal decision.
@@ -987,6 +1001,8 @@ old behaviour if people rely on it. Document incompatible changes.
 
 =back
 
+=back
+
 =head2 Guidelines for Converting Perl 4 Library Scripts into Modules
 
 =over 4
@@ -1059,7 +1075,7 @@ the application could invoked as:
 
      perl -e 'use Module::Name; method(@ARGV)' ...
 or   
-     perl -mModule::Name ...    (in perl5.002?)
+     perl -mModule::Name ...    (in perl5.002)
 
 =back