summaryrefslogtreecommitdiff
path: root/pod/perlmod.pod
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-07-10 23:22:54 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-07-10 23:22:54 +0000
commitd0c42abeeccca75d412e361e229d39e7ab39c424 (patch)
tree37e69335919bcf2419ef59cffa17f1aa72d13dad /pod/perlmod.pod
parent4d9142afa100a96f07b67cd4b087273df8c60543 (diff)
downloadperl-d0c42abeeccca75d412e361e229d39e7ab39c424.tar.gz
perl 5.003_01: pod/perlmod.pod
Typos and pod formatting corrected Use "identifier" for both members of an aliased pair of symbols to emphasize their equivalence Add description of "ops" and "vars" pragmatic modules
Diffstat (limited to 'pod/perlmod.pod')
-rw-r--r--pod/perlmod.pod30
1 files changed, 21 insertions, 9 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod
index 80a4036246..9aa4729b4d 100644
--- a/pod/perlmod.pod
+++ b/pod/perlmod.pod
@@ -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:
@@ -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
@@ -602,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
@@ -676,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
@@ -910,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.
@@ -991,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
@@ -1063,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