summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod75
-rw-r--r--pod/perldiag.pod7
-rw-r--r--pod/perlfaq8.pod3
-rw-r--r--pod/perlop.pod8
-rw-r--r--pod/perlrun.pod9
-rw-r--r--pod/perlsec.pod8
-rw-r--r--pod/perlsub.pod5
-rw-r--r--pod/perltoc.pod75
8 files changed, 144 insertions, 46 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 9574872791..a8c0909a4c 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -10,9 +10,9 @@ this one.
=head1 Supported Environments
-Perl5.004 builds out of the box on Unix, Plan9, LynxOS, VMS, OS/2,
-QNX, AmigaOS, and Windows NT; once built on Windows NT, Perl runs
-on Windows 95 as well.
+Perl5.004 builds out of the box on Unix, Plan 9, LynxOS, VMS, OS/2,
+QNX, AmigaOS, and Windows NT. Perl runs on Windows 95 as well, but it
+cannot be built there, for lack of a reasonable command interpreter.
=head1 Core Changes
@@ -72,7 +72,7 @@ your scripts.
Before Perl 5.004, C<AUTOLOAD> functions were looked up as methods
(using the C<@ISA> hierarchy), even when the function to be autoloaded
was called as a plain function (e.g. C<Foo::bar()>), not a method
-(e.g. C<Foo->bar()> or C<$obj->bar()>).
+(e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>).
Perl 5.005 will use method lookup only for methods' C<AUTOLOAD>s.
However, there is a significant base of existing code that may be using
@@ -92,9 +92,9 @@ assigned to (via C<@_>).
Earlier versions of Perl vary in their handling of such arguments.
Perl versions 5.002 and 5.003 always brought them into existence.
-Perl versions 5.000, 5.001, and 5.002 brought them into existence only
-if they were not the first argument (which was almost certainly a
-bug). Earlier versions of Perl never brought them into existence.
+Perl versions 5.000 and 5.001 brought them into existence only if
+they were not the first argument (which was almost certainly a bug).
+Earlier versions of Perl never brought them into existence.
For example, given this code:
@@ -280,8 +280,8 @@ The new conversions in Perl's sprintf() are:
%i a synonym for %d
%p a pointer (the address of the Perl value, in hexadecimal)
- %n special: B<stores> into the next variable in the parameter
- list the number of characters printed so far
+ %n special: *stores* the number of characters output so far
+ into the next variable in the parameter list
The new flags that go between the C<%> and the conversion are:
@@ -665,6 +665,43 @@ Each unique hash key is only allocated once, no matter how many hashes
have an entry with that key. So even if you have 100 copies of the
same hash, the hash keys never have to be reallocated.
+=head1 Support for More Operating Systems
+
+Support for the following operating systems is new in Perl 5.004.
+
+=head2 Win32
+
+Perl 5.004 now includes support for building a "native" perl under
+Windows NT, using the Microsoft Visual C++ compiler (versions 2.0
+and above). The resulting perl can be used under Windows 95 (if it
+is installed in the same directory locations as it got installed
+in Windows NT). This port includes support for perl extension
+building tools like L<MakeMaker> and L<h2xs>, so that many extensions
+available on the Comprehensive Perl Archive Network (CPAN) can now be
+readily built under Windows NT. See http://www.perl.com/ for more
+information on CPAN, and L<README.win32> for more details on how to
+get started with building this port.
+
+There is also support for building perl under the Cygwin32 environment.
+Cygwin32 is a set of GNU tools that make it possible to compile and run
+many UNIX programs under Windows NT by providing a mostly UNIX-like
+interface for compilation and execution. See L<README.cygwin32> for
+more details on this port, and how to obtain the Cygwin32 toolkit.
+This port has not been as well tested as the "native" port described
+above (which is not as well tested as we'd like either :)
+
+=head2 Plan 9
+
+See L<README.plan9>.
+
+=head2 QNX
+
+See L<README.qnx>.
+
+=head2 AmigaOS
+
+See L<README.amigaos>.
+
=head1 Pragmata
Six new pragmatic modules exist:
@@ -933,6 +970,19 @@ For example, you can now say
=head1 Utility Changes
+=head2 pod2html
+
+=over
+
+=item Sends converted HTML to standard output
+
+The I<pod2html> utility included with Perl 5.004 is entirely new.
+By default, it sends the converted HTML to its standard output,
+instead of writing it to a file like Perl 5.003's I<pod2html> did.
+Use the B<--outfile=FILENAME> option to write to a file.
+
+=back
+
=head2 xsubpp
=over
@@ -1097,6 +1147,13 @@ that can no longer be found in the table.
as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See L<perlfunc/substr>.
+=item Can't redefine active sort subroutine %s
+
+(F) Perl optimizes the internal handling of sort subroutines and keeps
+pointers into them. You tried to redefine one such sort subroutine when it
+was currently active, which is not allowed. If you really want to do
+this, you should write C<sort { &func } @x> instead of C<sort func @x>.
+
=item Can't use bareword ("%s") as %s ref while "strict refs" in use
(F) Only hard references are allowed by "strict refs". Symbolic references
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 448e39909d..ea33f50f9f 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -688,6 +688,13 @@ couldn't open the pipe into which to send data destined for stdout.
(F) The script you specified can't be opened for the indicated reason.
+=item Can't redefine active sort subroutine %s
+
+(F) Perl optimizes the internal handling of sort subroutines and keeps
+pointers into them. You tried to redefine one such sort subroutine when it
+was currently active, which is not allowed. If you really want to do
+this, you should write C<sort { &func } @x> instead of C<sort func @x>.
+
=item Can't rename %s to %s: %s, skipping file
(S) The rename done by the B<-i> switch failed for some reason, probably because
diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod
index 0c91f1e8de..4fabce6f36 100644
--- a/pod/perlfaq8.pod
+++ b/pod/perlfaq8.pod
@@ -1183,6 +1183,3 @@ CPAN). No ONC::RPC module is known.
Copyright (c) 1997 Tom Christiansen and Nathan Torkington.
All rights reserved. See L<perlfaq> for distribution information.
-END-of-perlfaq9.pod
-exit
-
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 3734477ecf..7f39b9d4de 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -644,7 +644,8 @@ Options are:
If "/" is the delimiter then the initial C<m> is optional. With the C<m>
you can use any pair of non-alphanumeric, non-whitespace characters as
delimiters. This is particularly useful for matching Unix path names
-that contain "/", to avoid LTS (leaning toothpick syndrome).
+that contain "/", to avoid LTS (leaning toothpick syndrome). If "?" is
+the delimiter, then the match-only-once rule of C<?PATTERN?> applies.
PATTERN may contain variables, which will be interpolated (and the
pattern recompiled) every time the pattern search is evaluated. (Note
@@ -817,6 +818,11 @@ Some frequently seen examples:
use POSIX qw( setlocale localeconv )
@EXPORT = qw( foo bar baz );
+A common mistake is to try to separate the words with comma or to put
+comments into a multi-line qw-string. For this reason the C<-w>
+switch produce warnings if the STRING contains the "," or the "#"
+character.
+
=item s/PATTERN/REPLACEMENT/egimosx
Searches a string for a pattern, and if found, replaces that pattern
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 51e6942fcc..6d8ee20a72 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -591,7 +591,10 @@ processes. However, scripts running setuid would do well to execute
the following lines before doing anything else, just to keep people
honest:
- $ENV{'PATH'} = '/bin:/usr/bin'; # or whatever you need
- $ENV{'SHELL'} = '/bin/sh' if defined $ENV{'SHELL'};
- $ENV{'IFS'} = '' if defined $ENV{'IFS'};
+ $ENV{PATH} = '/bin:/usr/bin'; # or whatever you need
+ $ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
+ delete $ENV{IFS};
+ delete $ENV{ENV};
+ delete $ENV{CDPATH};
+ $ENV{TERM} = 'dumb' if exists $ENV{TERM};
diff --git a/pod/perlsec.pod b/pod/perlsec.pod
index e21f97f21f..29a9167cf4 100644
--- a/pod/perlsec.pod
+++ b/pod/perlsec.pod
@@ -58,7 +58,10 @@ For example:
$path = $ENV{'PATH'}; # $path now tainted
$ENV{'PATH'} = '/bin:/usr/bin';
- $ENV{'IFS'} = '' if $ENV{'IFS'} ne '';
+ delete $ENV{'IFS'};
+ delete $ENV{'CDPATH'};
+ delete $ENV{'ENV'};
+ $ENV{'TERM'} = 'dumb';
$path = $ENV{'PATH'}; # $path now NOT tainted
system "echo $data"; # Is secure now!
@@ -79,6 +82,9 @@ For example:
exec "echo", $arg; # Secure (doesn't use the shell)
exec "sh", '-c', $arg; # Considered secure, alas!
+ @files = <*.c>; # Always insecure (uses csh)
+ @files = glob('*.c'); # Always insecure (uses csh)
+
If you try to do something insecure, you will get a fatal error saying
something like "Insecure dependency" or "Insecure PATH". Note that you
can still write an insecure B<system> or B<exec>, but only by explicitly
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 7cdd893ef4..c124f21c6a 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -320,8 +320,9 @@ otherwise. An inner block may countermand this with S<"no strict 'vars'">.
A my() has both a compile-time and a run-time effect. At compile time,
the compiler takes notice of it; the principle usefulness of this is to
-quiet C<use strict 'vars'>. The actual initialization doesn't happen
-until run time, so gets executed every time through a loop.
+quiet C<use strict 'vars'>. The actual initialization is delayed until
+run time, so it gets executed appropriately; every time through a loop,
+for example.
Variables declared with "my" are not part of any package and are therefore
never fully qualified with the package name. In particular, you're not
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index f4d917d00e..0340059b15 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -961,6 +961,20 @@ LIST, READLINE this, GETC this, DESTROY this
=back
+=item Support for More Operating Systems
+
+=over
+
+=item Win32
+
+=item Plan 9
+
+=item QNX
+
+=item AmigaOS
+
+=back
+
=item Pragmata
use autouse MODULE => qw(sub1 sub2 sub3), use blib, use blib 'dir', use
@@ -996,6 +1010,10 @@ constant NAME => VALUE, use locale, use ops, use vmsish
=over
+=item pod2html
+
+Sends converted HTML to standard output
+
=item xsubpp
C<void> XSUBs now default to returning nothing
@@ -1018,26 +1036,27 @@ L<perlsec>
not a HASH element or slice, Allocation too large: %lx, Allocation too
large, Applying %s to %s will act on scalar(%s), Attempt to free
nonexistent shared string, Attempt to use reference as lvalue in substr,
-Can't use bareword ("%s") as %s ref while "strict refs" in use, Cannot
-resolve method `%s' overloading `%s' in package `%s', Constant subroutine
-%s redefined, Constant subroutine %s undefined, Copy method did not return
-a reference, Died, Exiting pseudo-block via %s, Identifier too long,
-Illegal character %s (carriage return), Illegal switch in PERL5OPT: %s,
-Integer overflow in hex number, Integer overflow in octal number, internal
-error: glob failed, Invalid conversion in %s: "%s", Invalid type in pack:
-'%s', Invalid type in unpack: '%s', Name "%s::%s" used only once: possible
-typo, Null picture in formline, Offset outside string, Out of memory!, Out
-of memory during request for %s, panic: frexp, Possible attempt to put
-comments in qw() list, Possible attempt to separate words with commas,
-Scalar value @%s{%s} better written as $%s{%s}, Stub found while resolving
-method `%s' overloading `%s' in package `%s', Too late for "B<-T>" option,
-untie attempted while %d inner references still exist, Unrecognized
-character %s, Unsupported function fork, Use of "$$<digit>" to mean
-"${$}<digit>" is deprecated, Value of %s can be "0"; test with defined(),
-Variable "%s" may be unavailable, Variable "%s" will not stay shared,
-Warning: something's wrong, Ill-formed logical name |%s| in prime_env_iter,
-Got an error from DosAllocMem, Malformed PERLLIB_PREFIX, PERL_SH_DIR too
-long, Process terminated by SIG%s
+Can't redefine active sort subroutine %s, Can't use bareword ("%s") as %s
+ref while "strict refs" in use, Cannot resolve method `%s' overloading `%s'
+in package `%s', Constant subroutine %s redefined, Constant subroutine %s
+undefined, Copy method did not return a reference, Died, Exiting
+pseudo-block via %s, Identifier too long, Illegal character %s (carriage
+return), Illegal switch in PERL5OPT: %s, Integer overflow in hex number,
+Integer overflow in octal number, internal error: glob failed, Invalid
+conversion in %s: "%s", Invalid type in pack: '%s', Invalid type in unpack:
+'%s', Name "%s::%s" used only once: possible typo, Null picture in
+formline, Offset outside string, Out of memory!, Out of memory during
+request for %s, panic: frexp, Possible attempt to put comments in qw()
+list, Possible attempt to separate words with commas, Scalar value @%s{%s}
+better written as $%s{%s}, Stub found while resolving method `%s'
+overloading `%s' in package `%s', Too late for "B<-T>" option, untie
+attempted while %d inner references still exist, Unrecognized character %s,
+Unsupported function fork, Use of "$$<digit>" to mean "${$}<digit>" is
+deprecated, Value of %s can be "0"; test with defined(), Variable "%s" may
+be unavailable, Variable "%s" will not stay shared, Warning: something's
+wrong, Ill-formed logical name |%s| in prime_env_iter, Got an error from
+DosAllocMem, Malformed PERLLIB_PREFIX, PERL_SH_DIR too long, Process
+terminated by SIG%s
=item BUGS
@@ -1190,6 +1209,8 @@ i, m, s, x
=item WARNING on \1 vs $1
+=item SEE ALSO
+
=back
=head2 perlrun - how to execute the Perl interpreter
@@ -1966,13 +1987,13 @@ t, t expr, b [line] [condition], b subname [condition], b postpone subname
command, A, O [opt[=val]] [opt"val"] [opt?].., C<recallCommand>,
C<ShellBang>, C<pager>, C<tkRunning>, C<signalLevel>, C<warnLevel>,
C<dieLevel>, C<AutoTrace>, C<LineInfo>, C<inhibit_exit>, C<PrintRet>,
-C<frame>, C<maxTraceLen>, C<arrayDepth>, C<hashDepth>, C<compactDump>,
-C<veryCompact>, C<globPrint>, C<DumpDBFiles>, C<DumpPackages>, C<quote>,
-C<HighBit>, C<undefPrint>, C<UsageOnly>, C<TTY>, C<noTTY>, C<ReadLine>,
-C<NonStop>, E<lt> [ command ], E<lt>E<lt> command, E<gt> command,
-E<gt>E<gt> command, { [ command ], {{ command, ! number, ! -number, !
-pattern, !! cmd, H -number, q or ^D, R, |dbcmd, ||dbcmd, = [alias value],
-command, m expr, m package
+C<ornaments>, C<frame>, C<maxTraceLen>, C<arrayDepth>, C<hashDepth>,
+C<compactDump>, C<veryCompact>, C<globPrint>, C<DumpDBFiles>,
+C<DumpPackages>, C<quote>, C<HighBit>, C<undefPrint>, C<UsageOnly>, C<TTY>,
+C<noTTY>, C<ReadLine>, C<NonStop>, E<lt> [ command ], E<lt>E<lt> command,
+E<gt> command, E<gt>E<gt> command, { [ command ], {{ command, ! number, !
+-number, ! pattern, !! cmd, H -number, q or ^D, R, |dbcmd, ||dbcmd, =
+[alias value], command, m expr, m package
=item Debugger input/output