including all of the punctuation variables like $_. In addition, the
identifiers STDIN, STDOUT, STDERR, ARGV, ARGVOUT, ENV, INC, and SIG are
forced to be in package C<main>, even when used for other purposes than
-their built-in one. Note also that, if you have a package called C<m>,
+their builtin one. Note also that, if you have a package called C<m>,
C<s>, or C<y>, then you can't use the qualified form of an identifier
because it will be interpreted instead as a pattern match, a substitution,
or a translation.
table lookups at compile time:
local(*main::foo) = *main::bar;
- local($main::{'foo'}) = $main::{'bar'};
+ local($main::{'foo'}) = $main::{'bar'};
You can use this to print out all the variables in a package, for
instance. Here is F<dumpvar.pl> from the Perl library:
instead of C<use>. With require you can get into this problem:
require Cwd; # make Cwd:: accessible
- $here = Cwd::getcwd();
+ $here = Cwd::getcwd();
use Cwd; # import names from Cwd::
$here = getcwd();
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 and therefore far from
+conversion, but it's just a mechanical process and therefore far from
bulletproof.
=head2 Pragmatic Modules
Unlike the pragmas that effect the C<$^H> hints variable, the C<use
vars> and C<use subs> declarations are not BLOCK-scoped. They allow
-you to pre-declare a variables or subroutines within a particular
+you to predeclare a variables or subroutines within a particular
I<file> rather than just a block. Such declarations are effective
for the entire file for which they were declared. You cannot rescind
them with C<no vars> or C<no subs>.
=item locale
-use or ignore current locale for built-in operations (see L<perllocale>)
+use or ignore current locale for builtin operations (see L<perllocale>)
=item ops
=item subs
-pre-declare sub names
+predeclare sub names
=item vmsish
=item vars
-pre-declare global variable names
+predeclare global variable names
=back
warn of errors (from perspective of caller)
-=item Class::Template
+=item Class::Struct
-struct/member template builder
+declare struct-like datatypes
=item Config
=item ExtUtils::MM_OS2
-methods to override UN*X behaviour in ExtUtils::MakeMaker
+methods to override Unix behaviour in ExtUtils::MakeMaker
=item ExtUtils::MM_Unix
=item ExtUtils::MM_VMS
-methods to override UN*X behaviour in ExtUtils::MakeMaker
+methods to override Unix behaviour in ExtUtils::MakeMaker
=item ExtUtils::MakeMaker
=item File::stat
-by-name interface to Perl's built-in stat() functions
+by-name interface to Perl's builtin stat() functions
=item FileCache
=item Net::hostent
-by-name interface to Perl's built-in gethost*() functions
+by-name interface to Perl's builtin gethost*() functions
=item Net::netent
-by-name interface to Perl's built-in getnet*() functions
+by-name interface to Perl's builtin getnet*() functions
=item Net::protoent
-by-name interface to Perl's built-in getproto*() functions
+by-name interface to Perl's builtin getproto*() functions
=item Net::servent
-by-name interface to Perl's built-in getserv*() functions
+by-name interface to Perl's builtin getserv*() functions
=item Opcode
=item Sys::Syslog
-interface to the UNIX syslog(3) calls
+interface to the Unix syslog(3) calls
=item Term::Cap
=item Text::Tabs
-expand and unexpand tabs per the unix expand(1) and unexpand(1)
+expand and unexpand tabs per the Unix expand(1) and unexpand(1)
=item Text::Wrap
=item Time::gmtime
-by-name interface to Perl's built-in gmtime() function
+by-name interface to Perl's builtin gmtime() function
=item Time::localtime
-by-name interface to Perl's built-in localtime() function
+by-name interface to Perl's builtin localtime() function
=item Time::tm
=item User::grent
-by-name interface to Perl's built-in getgr*() functions
+by-name interface to Perl's builtin getgr*() functions
=item User::pwent
-by-name interface to Perl's built-in getpw*() functions
+by-name interface to Perl's builtin getpw*() functions
=back
Avoid class name tests like: C<die "Invalid" unless ref $ref eq 'FOO'>.
Generally you can delete the "C<eq 'FOO'>" part with no harm at all.
-Let the objects look after themselves! Generally, avoid hardwired
+Let the objects look after themselves! Generally, avoid hard-wired
class names as far as possible.
Avoid C<$r-E<gt>Class::func()> where using C<@ISA=qw(... Class ...)> and
those modules.
To be portable each component of a module name should be limited to
-11 characters. If it might be used on DOS then try to ensure each is
+11 characters. If it might be used on MS-DOS then try to ensure each is
unique in the first 8 characters. Nested modules make this easier.
=item Have you got it right?
The general mechanism is to assert your Copyright and then make
a declaration of how others may copy/use/modify your work.
-Perl, for example, is supplied with two types of license: The GNU
-GPL and The Artistic License (see the files README, Copying, and
+Perl, for example, is supplied with two types of licence: The GNU
+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 -e 'use Module::Name; method(@ARGV)' ...
or
- perl -mModule::Name ... (in perl5.002)
+ perl -mModule::Name ... (in perl5.002 or higher)
=back