Change 30702 by [EMAIL PROTECTED] on 2007/03/22 23:01:23
Integrate:
[ 29227]
Use $HOME/localperl as default prefix for installing perl
in the terse installation instructions in README.
[ 30278]
Subject: Re: [PATCH] Document that m//k works
From: demerphq <[EMAIL PROTECTED]>
Date: Tue, 13 Feb 2007 22:04:54 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 30484]
Doc patch about PerlIO::encoding:
Subject: [PATCH] Re: 'Unknown PerlIO layer "encoding"...' message
From: Tels <[EMAIL PROTECTED]>
Date: Fri, 2 Mar 2007 11:31:39 +0000
Message-Id: <[EMAIL PROTECTED]>
[ 30525]
Mention Perl::Unsafe::Signals in the core docs en passant.
[ 30554]
warn() without args doesn't take a default message in $_, but in $@
[ 30575]
Subject: [PATCH] perlfunc.pod (ref results), perlop.pod (qr// result)
From: Wolfgang Laun <[EMAIL PROTECTED]>
Date: Wed, 14 Mar 2007 07:56:45 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 30596]
Don't mention DynaLoader.a in INSTALL,
since it doesn't exist anymore
[ 30643]
Subject: Re: Composing @INC from PERL5LIB
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Date: Mon, 19 Mar 2007 23:35:10 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 30645]
More adjustments to the PERL5LIB docs by Rick
Delaney and myself
[ 30646]
Better wording for the return value of select()
(bug #41907)
[ 30648]
More nits in the PERL5LIB docs, suggested by Andreas.
[ 30649]
Subject: [PATCH] my email address changed
From: Michael Stevens <[EMAIL PROTECTED]>
Date: Tue, 20 Mar 2007 15:49:12 +0000
Message-ID: <[EMAIL PROTECTED]>
[ 30685]
Remove references to perlcc from the core docs.
[ 30686]
Fix a broken link and a meaningless phrase in perldebguts
[ 30688]
Misc. L<> fixes in core docs : don't link to man pages;
provide full urls when linking to web sites.
Affected files ...
... //depot/maint-5.8/perl/AUTHORS#46 integrate
... //depot/maint-5.8/perl/INSTALL#46 integrate
... //depot/maint-5.8/perl/README#10 integrate
... //depot/maint-5.8/perl/pod/perldebguts.pod#6 integrate
... //depot/maint-5.8/perl/pod/perldiag.pod#98 integrate
... //depot/maint-5.8/perl/pod/perlfunc.pod#99 integrate
... //depot/maint-5.8/perl/pod/perlipc.pod#23 integrate
... //depot/maint-5.8/perl/pod/perllocale.pod#5 integrate
... //depot/maint-5.8/perl/pod/perlmod.pod#13 integrate
... //depot/maint-5.8/perl/pod/perlop.pod#35 integrate
... //depot/maint-5.8/perl/pod/perlpacktut.pod#5 integrate
... //depot/maint-5.8/perl/pod/perlre.pod#19 integrate
... //depot/maint-5.8/perl/pod/perlrun.pod#63 integrate
... //depot/maint-5.8/perl/pod/perlutil.pod#3 integrate
... //depot/maint-5.8/perl/pod/perlvar.pod#45 integrate
Differences ...
==== //depot/maint-5.8/perl/AUTHORS#46 (text) ====
Index: perl/AUTHORS
--- perl/AUTHORS#45~30479~ 2007-03-05 15:13:13.000000000 -0800
+++ perl/AUTHORS 2007-03-22 16:01:23.000000000 -0700
@@ -587,7 +587,7 @@
Michael Mahan <[EMAIL PROTECTED]>
Michael Schroeder <[EMAIL PROTECTED]>
Michael Somos <[EMAIL PROTECTED]>
-Michael Stevens <[EMAIL PROTECTED]>
+Michael Stevens <[EMAIL PROTECTED]>
Michele Sardo
Mik Firestone <[EMAIL PROTECTED]>
Mike Fletcher <[EMAIL PROTECTED]>
==== //depot/maint-5.8/perl/INSTALL#46 (text) ====
Index: perl/INSTALL
--- perl/INSTALL#45~30470~ 2007-03-05 12:02:51.000000000 -0800
+++ perl/INSTALL 2007-03-22 16:01:23.000000000 -0700
@@ -535,8 +535,7 @@
Currently, for most systems, the main perl executable is built by
linking the "perl library" libperl.a with perlmain.o, your static
-extensions (usually just DynaLoader.a) and various extra libraries,
-such as -lm.
+extensions, and various extra libraries, such as -lm.
On some systems that support dynamic loading, it may be possible to
replace libperl.a with a shared libperl.so. If you anticipate building
==== //depot/maint-5.8/perl/README#10 (text) ====
Index: perl/README
--- perl/README#9~30470~ 2007-03-05 12:02:51.000000000 -0800
+++ perl/README 2007-03-22 16:01:23.000000000 -0700
@@ -30,10 +30,13 @@
If you're using a relatively modern operating system and want to
install this version of Perl locally, run the following commands:
- ./Configure -des -Dprefix=/opt/foo
+ ./Configure -des -Dprefix=$HOME/localperl
make test
make install
+This will configure and compile perl for your platform, run the regression
+tests, and install perl in a subdirectory "localperl" of your home directory.
+
If you run into any trouble whatsoever or you need to install a customized
version of Perl, you should read the detailed instructions in the "INSTALL"
file that came with this distribution. Additionally, there are a number of
==== //depot/maint-5.8/perl/pod/perldebguts.pod#6 (text) ====
Index: perl/pod/perldebguts.pod
--- perl/pod/perldebguts.pod#5~29928~ 2007-01-22 15:12:43.000000000 -0800
+++ perl/pod/perldebguts.pod 2007-03-22 16:01:23.000000000 -0700
@@ -191,9 +191,8 @@
=item *
-See L<perldebug/"Options"> for description of options parsed by
-C<DB::parse_options(string)> parses debugger options; see
-L<pperldebug/Options> for a description of options recognized.
+See L<perldebug/"Configurable Options"> for a description of options parsed by
+C<DB::parse_options(string)>.
=item *
==== //depot/maint-5.8/perl/pod/perldiag.pod#98 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod#97~30506~ 2007-03-07 11:28:56.000000000 -0800
+++ perl/pod/perldiag.pod 2007-03-22 16:01:23.000000000 -0700
@@ -4634,7 +4634,7 @@
=item Warning: something's wrong
(W) You passed warn() an empty string (the equivalent of C<warn "">) or
-you called it with no args and C<$_> was empty.
+you called it with no args and C<$@> was empty.
=item Warning: unable to close filehandle %s properly
==== //depot/maint-5.8/perl/pod/perlfunc.pod#99 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#98~30585~ 2007-03-14 09:44:53.000000000 -0700
+++ perl/pod/perlfunc.pod 2007-03-22 16:01:23.000000000 -0700
@@ -524,7 +524,10 @@
of this version of Perl therefore refers to "layers" rather than to
"disciplines". Now back to the regularly scheduled documentation...>
-To mark FILEHANDLE as UTF-8, use C<:utf8>.
+To mark FILEHANDLE as UTF-8, use C<:utf8> or C<:encoding(utf8)>.
+C<:utf8> just marks the data as UTF-8 without further checking,
+while C<:encoding(utf8)> checks the data for actually being valid
+UTF-8. More details can be found in L<PerlIO::encoding>.
In general, binmode() should be called after open() but before any I/O
is done on the filehandle. Calling binmode() will normally flush any
@@ -1367,20 +1370,11 @@
be open any more when the program is reincarnated, with possible
resulting confusion on the part of Perl.
-This function is now largely obsolete, partly because it's very
-hard to convert a core file into an executable, and because the
-real compiler backends for generating portable bytecode and compilable
-C code have superseded it. That's why you should now invoke it as
-C<CORE::dump()>, if you don't want to be warned against a possible
+This function is now largely obsolete, mostly because it's very hard to
+convert a core file into an executable. That's why you should now invoke
+it as C<CORE::dump()>, if you don't want to be warned against a possible
typo.
-If you're looking to use L<dump> to speed up your program, consider
-generating bytecode or native C code as described in L<perlcc>. If
-you're just trying to accelerate a CGI script, consider using the
-C<mod_perl> extension to B<Apache>, or the CPAN module, CGI::Fast.
-You might also consider autoloading or selfloading, which at least
-make your program I<appear> to run faster.
-
=item each HASH
X<each> X<hash, iterator>
@@ -4295,6 +4289,14 @@
print "r is not a reference at all.\n";
}
+The return value C<LVALUE> indicates a reference to an lvalue that is not
+a variable. You get this from taking the reference of function calls like
+C<pos()> or C<substr()>. C<VSTRING> is returned if the reference points
+to a L<version string|perldata\"Version Strings">.
+
+The result C<Regexp> indicates that the argument is a regular expression
+resulting from C<qr//>.
+
See also L<perlref>.
=item rename OLDNAME,NEWNAME
@@ -4682,8 +4684,8 @@
=item select
-Returns the currently selected filehandle. Sets the current default
-filehandle for output, if FILEHANDLE is supplied. This has two
+Returns the currently selected filehandle. If FILEHANDLE is supplied,
+sets the new current default filehandle for output. This has two
effects: first, a C<write> or a C<print> without a filehandle will
default to this FILEHANDLE. Second, references to variables related to
output will refer to this output channel. For example, if you have to
==== //depot/maint-5.8/perl/pod/perlipc.pod#23 (text) ====
Index: perl/pod/perlipc.pod
--- perl/pod/perlipc.pod#22~30470~ 2007-03-05 12:02:51.000000000 -0800
+++ perl/pod/perlipc.pod 2007-03-22 16:01:23.000000000 -0700
@@ -386,6 +386,10 @@
POSIX::SigAction->new(sub { die "alarm" }))
or die "Error setting SIGALRM handler: $!\n";
+Another way to disable the safe signal behavior locally is to use
+the C<Perl::Unsafe::Signals> module from CPAN (which will affect
+all signals).
+
=item Restartable system calls
On systems that supported it, older versions of Perl used the
@@ -539,7 +543,7 @@
The fork() has to come before the setsid() to ensure that you aren't a
process group leader (the setsid() will fail if you are). If your
system doesn't have the setsid() function, open F</dev/tty> and use the
-C<TIOCNOTTY> ioctl() on it instead. See L<tty(4)> for details.
+C<TIOCNOTTY> ioctl() on it instead. See tty(4) for details.
Non-Unix users should check their Your_OS::Process module for other
solutions.
==== //depot/maint-5.8/perl/pod/perllocale.pod#5 (text) ====
Index: perl/pod/perllocale.pod
--- perl/pod/perllocale.pod#4~30469~ 2007-03-05 11:20:16.000000000 -0800
+++ perl/pod/perllocale.pod 2007-03-22 16:01:23.000000000 -0700
@@ -177,7 +177,7 @@
If no second argument is provided and the category is LC_ALL, the
result is implementation-dependent. It may be a string of
concatenated locales names (separator also implementation-dependent)
-or a single locale name. Please consult your L<setlocale(3)> for
+or a single locale name. Please consult your setlocale(3) man page for
details.
If a second argument is given and it corresponds to a valid locale,
@@ -197,11 +197,11 @@
If the second argument does not correspond to a valid locale, the locale
for the category is not changed, and the function returns I<undef>.
-For further information about the categories, consult L<setlocale(3)>.
+For further information about the categories, consult setlocale(3).
=head2 Finding locales
-For locales available in your system, consult also L<setlocale(3)> to
+For locales available in your system, consult also setlocale(3) to
see whether it leads to the list of available locales (search for the
I<SEE ALSO> section). If that fails, try the following command lines:
@@ -289,7 +289,7 @@
other locale variables) may affect other programs as well, not just
Perl. In particular, external programs run from within Perl will see
these changes. If you make the new settings permanent (read on), all
-programs you run see the changes. See L<ENVIRONMENT> for
+programs you run see the changes. See L<"ENVIRONMENT"> for
the full list of relevant environment variables and L<USING LOCALES>
for their effects in Perl. Effects in other programs are
easily deducible. For example, the variable LC_COLLATE may well affect
==== //depot/maint-5.8/perl/pod/perlmod.pod#13 (text) ====
Index: perl/pod/perlmod.pod
--- perl/pod/perlmod.pod#12~26619~ 2006-01-03 10:30:46.000000000 -0800
+++ perl/pod/perlmod.pod 2007-03-22 16:01:23.000000000 -0700
@@ -315,9 +315,7 @@
in the Perl compiler suite to save the compiled state of the program.
C<INIT> blocks are run just before the Perl runtime begins execution, in
-"first in, first out" (FIFO) order. For example, the code generators
-documented in L<perlcc> make use of C<INIT> blocks to initialize and
-resolve pointers to XSUBs.
+"first in, first out" (FIFO) order.
When you use the B<-n> and B<-p> switches to Perl, C<BEGIN> and
C<END> work just as they do in B<awk>, as a degenerate case.
==== //depot/maint-5.8/perl/pod/perlop.pod#35 (text) ====
Index: perl/pod/perlop.pod
--- perl/pod/perlop.pod#34~30506~ 2007-03-07 11:28:56.000000000 -0800
+++ perl/pod/perlop.pod 2007-03-22 16:01:23.000000000 -0700
@@ -1024,33 +1024,81 @@
=over 8
-=item ?PATTERN?
-X<?>
+=item qr/STRING/msixo
+X<qr> X</i> X</m> X</o> X</s> X</x>
-This is just like the C</pattern/> search, except that it matches only
-once between calls to the reset() operator. This is a useful
-optimization when you want to see only the first occurrence of
-something in each file of a set of files, for instance. Only C<??>
-patterns local to the current package are reset.
+This operator quotes (and possibly compiles) its I<STRING> as a regular
+expression. I<STRING> is interpolated the same way as I<PATTERN>
+in C<m/PATTERN/>. If "'" is used as the delimiter, no interpolation
+is done. Returns a Perl value which may be used instead of the
+corresponding C</STRING/imosx> expression. The returned value is a
+normalized version of the original pattern. It magically differs from
+a string containing the same characters: ref(qr/x/) returns "Regexp",
+even though dereferencing the result returns undef.
- while (<>) {
- if (?^$?) {
- # blank line between header and body
- }
- } continue {
- reset if eof; # clear ?? status for next file
+For example,
+
+ $rex = qr/my.STRING/is;
+ print $rex; # prints (?si-xm:my.STRING)
+ s/$rex/foo/;
+
+is equivalent to
+
+ s/my.STRING/foo/is;
+
+The result may be used as a subpattern in a match:
+
+ $re = qr/$pattern/;
+ $string =~ /foo${re}bar/; # can be interpolated in other patterns
+ $string =~ $re; # or used standalone
+ $string =~ /$re/; # or this way
+
+Since Perl may compile the pattern at the moment of execution of qr()
+operator, using qr() may have speed advantages in some situations,
+notably if the result of qr() is used standalone:
+
+ sub match {
+ my $patterns = shift;
+ my @compiled = map qr/$_/i, @$patterns;
+ grep {
+ my $success = 0;
+ foreach my $pat (@compiled) {
+ $success = 1, last if /$pat/;
+ }
+ $success;
+ } @_;
}
-This usage is vaguely deprecated, which means it just might possibly
-be removed in some distant future version of Perl, perhaps somewhere
-around the year 2168.
+Precompilation of the pattern into an internal representation at
+the moment of qr() avoids a need to recompile the pattern every
+time a match C</$pat/> is attempted. (Perl has many other internal
+optimizations, but none would be triggered in the above example if
+we did not use qr() operator.)
+
+Options are:
+
+ m Treat string as multiple lines.
+ s Treat string as single line. (Make . match a newline)
+ i Do case-insensitive pattern matching.
+ x Use extended regular expressions.
+ p When matching preserve a copy of the matched string so
+ that ${^PREMATCH}, ${^MATCH}, ${^POSTMATCH} will be defined.
+ o Compile pattern only once.
+
+If a precompiled pattern is embedded in a larger pattern then the effect
+of 'msix' will be propagated appropriately. The effect of the 'o'
+modifier has is not propagated, being restricted to those patterns
+explicitly using it.
+
+See L<perlre> for additional information on valid syntax for STRING, and
+for a detailed look at the semantics of regular expressions.
-=item m/PATTERN/cgimosx
+=item m/PATTERN/msixogc
X<m> X<operator, match>
X<regexp, options> X<regexp> X<regex, options> X<regex>
X</m> X</s> X</i> X</x> X</o> X</g> X</c>
-=item /PATTERN/cgimosx
+=item /PATTERN/msixogc
Searches a string for a pattern match, and in scalar context returns
true if it succeeds, false if it fails. If no string is specified
@@ -1064,13 +1112,8 @@
Options are as described in C<qr//>; in addition, the following match
process modifiers are available:
- c Do not reset search position on a failed match when /g is in effect.
g Match globally, i.e., find all occurrences.
- i Do case-insensitive pattern matching.
- m Treat string as multiple lines.
- o Compile pattern only once.
- s Treat string as single line.
- x Use extended regular expressions.
+ c Do not reset search position on a failed match when /g is in effect.
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
@@ -1221,6 +1264,137 @@
lowercase lowercase line-noise lowercase lowercase line-noise
MiXeD line-noise. That's all!
+=item ?PATTERN?
+X<?>
+
+This is just like the C</pattern/> search, except that it matches only
+once between calls to the reset() operator. This is a useful
+optimization when you want to see only the first occurrence of
+something in each file of a set of files, for instance. Only C<??>
+patterns local to the current package are reset.
+
+ while (<>) {
+ if (?^$?) {
+ # blank line between header and body
+ }
+ } continue {
+ reset if eof; # clear ?? status for next file
+ }
+
+This usage is vaguely deprecated, which means it just might possibly
+be removed in some distant future version of Perl, perhaps somewhere
+around the year 2168.
+
+=item s/PATTERN/REPLACEMENT/msixogce
+X<substitute> X<substitution> X<replace> X<regexp, replace>
+X<regexp, substitute> X</m> X</s> X</i> X</x> X</o> X</g> X</c> X</e>
+
+Searches a string for a pattern, and if found, replaces that pattern
+with the replacement text and returns the number of substitutions
+made. Otherwise it returns false (specifically, the empty string).
+
+If no string is specified via the C<=~> or C<!~> operator, the C<$_>
+variable is searched and modified. (The string specified with C<=~> must
+be scalar variable, an array element, a hash element, or an assignment
+to one of those, i.e., an lvalue.)
+
+If the delimiter chosen is a single quote, no interpolation is
+done on either the PATTERN or the REPLACEMENT. Otherwise, if the
+PATTERN contains a $ that looks like a variable rather than an
+end-of-string test, the variable will be interpolated into the pattern
+at run-time. If you want the pattern compiled only once the first time
+the variable is interpolated, use the C</o> option. If the pattern
+evaluates to the empty string, the last successfully executed regular
+expression is used instead. See L<perlre> for further explanation on these.
+See L<perllocale> for discussion of additional considerations that apply
+when C<use locale> is in effect.
+
+Options are as with m// with the addition of the following replacement
+specific options:
+
+ e Evaluate the right side as an expression.
+ ee Evaluate the right side as a string then eval the result
+
+Any non-alphanumeric, non-whitespace delimiter may replace the
+slashes. If single quotes are used, no interpretation is done on the
+replacement string (the C</e> modifier overrides this, however). Unlike
+Perl 4, Perl 5 treats backticks as normal delimiters; the replacement
+text is not evaluated as a command. If the
+PATTERN is delimited by bracketing quotes, the REPLACEMENT has its own
+pair of quotes, which may or may not be bracketing quotes, e.g.,
+C<s(foo)(bar)> or C<< s<foo>/bar/ >>. A C</e> will cause the
+replacement portion to be treated as a full-fledged Perl expression
+and evaluated right then and there. It is, however, syntax checked at
+compile-time. A second C<e> modifier will cause the replacement portion
+to be C<eval>ed before being run as a Perl expression.
+
+Examples:
+
+ s/\bgreen\b/mauve/g; # don't change wintergreen
+
+ $path =~ s|/usr/bin|/usr/local/bin|;
+
+ s/Login: $foo/Login: $bar/; # run-time pattern
+
+ ($foo = $bar) =~ s/this/that/; # copy first, then change
+
+ $count = ($paragraph =~ s/Mister\b/Mr./g); # get change-count
+
+ $_ = 'abc123xyz';
+ s/\d+/$&*2/e; # yields 'abc246xyz'
+ s/\d+/sprintf("%5d",$&)/e; # yields 'abc 246xyz'
+ s/\w/$& x 2/eg; # yields 'aabbcc 224466xxyyzz'
+
+ s/%(.)/$percent{$1}/g; # change percent escapes; no /e
+ s/%(.)/$percent{$1} || $&/ge; # expr now, so /e
+ s/^=(\w+)/pod($1)/ge; # use function call
+
+ # expand variables in $_, but dynamics only, using
+ # symbolic dereferencing
+ s/\$(\w+)/${$1}/g;
+
+ # Add one to the value of any numbers in the string
+ s/(\d+)/1 + $1/eg;
+
+ # This will expand any embedded scalar variable
+ # (including lexicals) in $_ : First $1 is interpolated
+ # to the variable name, and then evaluated
+ s/(\$\w+)/$1/eeg;
+
+ # Delete (most) C comments.
+ $program =~ s {
+ /\* # Match the opening delimiter.
+ .*? # Match a minimal number of characters.
+ \*/ # Match the closing delimiter.
+ } []gsx;
+
+ s/^\s*(.*?)\s*$/$1/; # trim whitespace in $_, expensively
+
+ for ($variable) { # trim whitespace in $variable, cheap
+ s/^\s+//;
+ s/\s+$//;
+ }
+
+ s/([^ ]*) *([^ ]*)/$2 $1/; # reverse 1st two fields
+
+Note the use of $ instead of \ in the last example. Unlike
+B<sed>, we use the \<I<digit>> form in only the left hand side.
+Anywhere else it's $<I<digit>>.
+
+Occasionally, you can't use just a C</g> to get all the changes
+to occur that you might want. Here are two common cases:
+
+ # put commas in the right places in an integer
+ 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/g;
+
+ # expand tabs to 8-column spacing
+ 1 while s/\t+/' ' x (length($&)*8 - length($`)%8)/e;
+
+=back
+
+=head2 Quote-Like Operators
+X<operator, quote-like>
+
=over 4
=item q/STRING/
@@ -1248,64 +1422,6 @@
if /\b(tcl|java|python)\b/i; # :-)
$baz = "\n"; # a one-character string
-=item qr/STRING/msixo
-X<qr> X</i> X</m> X</o> X</s> X</x>
-
-This operator quotes (and possibly compiles) its I<STRING> as a regular
-expression. I<STRING> is interpolated the same way as I<PATTERN>
-in C<m/PATTERN/>. If "'" is used as the delimiter, no interpolation
-is done. Returns a Perl value which may be used instead of the
-corresponding C</STRING/imosx> expression.
-
-For example,
-
- $rex = qr/my.STRING/is;
- s/$rex/foo/;
-
-is equivalent to
-
- s/my.STRING/foo/is;
-
-The result may be used as a subpattern in a match:
-
- $re = qr/$pattern/;
- $string =~ /foo${re}bar/; # can be interpolated in other patterns
- $string =~ $re; # or used standalone
- $string =~ /$re/; # or this way
-
-Since Perl may compile the pattern at the moment of execution of qr()
-operator, using qr() may have speed advantages in some situations,
-notably if the result of qr() is used standalone:
-
- sub match {
- my $patterns = shift;
- my @compiled = map qr/$_/i, @$patterns;
- grep {
- my $success = 0;
- foreach my $pat (@compiled) {
- $success = 1, last if /$pat/;
- }
- $success;
- } @_;
- }
-
-Precompilation of the pattern into an internal representation at
-the moment of qr() avoids a need to recompile the pattern every
-time a match C</$pat/> is attempted. (Perl has many other internal
-optimizations, but none would be triggered in the above example if
-we did not use qr() operator.)
-
-Options are:
-
- i Do case-insensitive pattern matching.
- m Treat string as multiple lines.
- o Compile pattern only once.
- s Treat string as single line.
- x Use extended regular expressions.
-
-See L<perlre> for additional information on valid syntax for STRING, and
-for a detailed look at the semantics of regular expressions.
-
=item qx/STRING/
X<qx> X<`> X<``> X<backtick>
@@ -1426,114 +1542,6 @@
C<use warnings> pragma and the B<-w> switch (that is, the C<$^W> variable)
produces warnings if the STRING contains the "," or the "#" character.
-=item s/PATTERN/REPLACEMENT/egimosx
-X<substitute> X<substitution> X<replace> X<regexp, replace>
-X<regexp, substitute> X</e> X</g> X</i> X</m> X</o> X</s> X</x>
-
-Searches a string for a pattern, and if found, replaces that pattern
-with the replacement text and returns the number of substitutions
-made. Otherwise it returns false (specifically, the empty string).
-
-If no string is specified via the C<=~> or C<!~> operator, the C<$_>
-variable is searched and modified. (The string specified with C<=~> must
-be scalar variable, an array element, a hash element, or an assignment
-to one of those, i.e., an lvalue.)
-
-If the delimiter chosen is a single quote, no interpolation is
-done on either the PATTERN or the REPLACEMENT. Otherwise, if the
-PATTERN contains a $ that looks like a variable rather than an
-end-of-string test, the variable will be interpolated into the pattern
-at run-time. If you want the pattern compiled only once the first time
-the variable is interpolated, use the C</o> option. If the pattern
-evaluates to the empty string, the last successfully executed regular
-expression is used instead. See L<perlre> for further explanation on these.
-See L<perllocale> for discussion of additional considerations that apply
-when C<use locale> is in effect.
-
-Options are:
-
- e Evaluate the right side as an expression.
- g Replace globally, i.e., all occurrences.
- i Do case-insensitive pattern matching.
- m Treat string as multiple lines.
- o Compile pattern only once.
- s Treat string as single line.
- x Use extended regular expressions.
-
-Any non-alphanumeric, non-whitespace delimiter may replace the
-slashes. If single quotes are used, no interpretation is done on the
-replacement string (the C</e> modifier overrides this, however). Unlike
-Perl 4, Perl 5 treats backticks as normal delimiters; the replacement
-text is not evaluated as a command. If the
-PATTERN is delimited by bracketing quotes, the REPLACEMENT has its own
-pair of quotes, which may or may not be bracketing quotes, e.g.,
-C<s(foo)(bar)> or C<< s<foo>/bar/ >>. A C</e> will cause the
-replacement portion to be treated as a full-fledged Perl expression
-and evaluated right then and there. It is, however, syntax checked at
-compile-time. A second C<e> modifier will cause the replacement portion
-to be C<eval>ed before being run as a Perl expression.
-
-Examples:
-
- s/\bgreen\b/mauve/g; # don't change wintergreen
-
- $path =~ s|/usr/bin|/usr/local/bin|;
-
- s/Login: $foo/Login: $bar/; # run-time pattern
-
- ($foo = $bar) =~ s/this/that/; # copy first, then change
-
- $count = ($paragraph =~ s/Mister\b/Mr./g); # get change-count
-
- $_ = 'abc123xyz';
- s/\d+/$&*2/e; # yields 'abc246xyz'
- s/\d+/sprintf("%5d",$&)/e; # yields 'abc 246xyz'
- s/\w/$& x 2/eg; # yields 'aabbcc 224466xxyyzz'
-
- s/%(.)/$percent{$1}/g; # change percent escapes; no /e
- s/%(.)/$percent{$1} || $&/ge; # expr now, so /e
- s/^=(\w+)/pod($1)/ge; # use function call
-
- # expand variables in $_, but dynamics only, using
- # symbolic dereferencing
- s/\$(\w+)/${$1}/g;
-
- # Add one to the value of any numbers in the string
- s/(\d+)/1 + $1/eg;
-
- # This will expand any embedded scalar variable
- # (including lexicals) in $_ : First $1 is interpolated
- # to the variable name, and then evaluated
- s/(\$\w+)/$1/eeg;
-
- # Delete (most) C comments.
- $program =~ s {
- /\* # Match the opening delimiter.
- .*? # Match a minimal number of characters.
- \*/ # Match the closing delimiter.
- } []gsx;
-
- s/^\s*(.*?)\s*$/$1/; # trim whitespace in $_, expensively
-
- for ($variable) { # trim whitespace in $variable, cheap
- s/^\s+//;
- s/\s+$//;
- }
-
- s/([^ ]*) *([^ ]*)/$2 $1/; # reverse 1st two fields
-
-Note the use of $ instead of \ in the last example. Unlike
-B<sed>, we use the \<I<digit>> form in only the left hand side.
-Anywhere else it's $<I<digit>>.
-
-Occasionally, you can't use just a C</g> to get all the changes
-to occur that you might want. Here are two common cases:
-
- # put commas in the right places in an integer
- 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/g;
-
- # expand tabs to 8-column spacing
- 1 while s/\t+/' ' x (length($&)*8 - length($`)%8)/e;
=item tr/SEARCHLIST/REPLACEMENTLIST/cds
X<tr> X<y> X<transliterate> X</c> X</d> X</s>
==== //depot/maint-5.8/perl/pod/perlpacktut.pod#5 (text) ====
Index: perl/pod/perlpacktut.pod
--- perl/pod/perlpacktut.pod#4~20818~ 2003-08-21 22:54:24.000000000 -0700
+++ perl/pod/perlpacktut.pod 2007-03-22 16:01:23.000000000 -0700
@@ -592,7 +592,7 @@
range, up to 255. After some more Latin extensions we find the character
sets from languages using non-Roman alphabets, interspersed with a
variety of symbol sets such as currency symbols, Zapf Dingbats or Braille.
-(You might want to visit L<www.unicode.org> for a look at some of
+(You might want to visit L<http://www.unicode.org/> for a look at some of
them - my personal favourites are Telugu and Kannada.)
The Unicode character sets associates characters with integers. Encoding
@@ -625,7 +625,7 @@
The pack code C<w> has been added to support a portable binary data
encoding scheme that goes way beyond simple integers. (Details can
-be found at L<Casbah.org>, the Scarab project.) A BER (Binary Encoded
+be found at L<http://Casbah.org/>, the Scarab project.) A BER (Binary Encoded
Representation) compressed unsigned integer stores base 128
digits, most significant digit first, with as few digits as possible.
Bit eight (the high bit) is set on each byte except the last. There
==== //depot/maint-5.8/perl/pod/perlre.pod#19 (text) ====
Index: perl/pod/perlre.pod
--- perl/pod/perlre.pod#18~30470~ 2007-03-05 12:02:51.000000000 -0800
+++ perl/pod/perlre.pod 2007-03-22 16:01:23.000000000 -0700
@@ -27,15 +27,6 @@
=over 4
-=item i
-X</i> X<regex, case-insensitive> X<regexp, case-insensitive>
-X<regular expression, case-insensitive>
-
-Do case-insensitive pattern matching.
-
-If C<use locale> is in effect, the case map is taken from the current
-locale. See L<perllocale>.
-
=item m
X</m> X<regex, multiline> X<regexp, multiline> X<regular expression, multiline>
@@ -58,11 +49,26 @@
while still allowing "^" and "$" to match, respectively, just after
and just before newlines within the string.
+=item i
+X</i> X<regex, case-insensitive> X<regexp, case-insensitive>
+X<regular expression, case-insensitive>
+
+Do case-insensitive pattern matching.
+
+If C<use locale> is in effect, the case map is taken from the current
+locale. See L<perllocale>.
+
=item x
X</x>
Extend your pattern's legibility by permitting whitespace and comments.
+=item p
+X</p> X<regex, preserve> X<regexp, preserve>
+
+Preserve the string matched such that ${^PREMATCH}, {$^MATCH}, and
+${^POSTMATCH} are available for use after matching.
+
=back
These are usually written as "the C</x> modifier", even though the delimiter
==== //depot/maint-5.8/perl/pod/perlrun.pod#63 (text) ====
Index: perl/pod/perlrun.pod
--- perl/pod/perlrun.pod#62~30469~ 2007-03-05 11:20:16.000000000 -0800
+++ perl/pod/perlrun.pod 2007-03-22 16:01:23.000000000 -0700
@@ -1002,14 +1002,17 @@
A list of directories in which to look for Perl library
files before looking in the standard library and the current
directory. Any architecture-specific directories under the specified
-locations are automatically included if they exist. If PERL5LIB is not
-defined, PERLLIB is used. Directories are separated (like in PATH) by
-a colon on unixish platforms and by a semicolon on Windows (the proper
-path separator being given by the command C<perl -V:path_sep>).
+locations are automatically included if they exist (this lookup
+being done at interpreter startup time.)
+
+If PERL5LIB is not defined, PERLLIB is used. Directories are separated
+(like in PATH) by a colon on unixish platforms and by a semicolon on
+Windows (the proper path separator being given by the command C<perl
+-V:path_sep>).
When running taint checks (either because the program was running setuid
-or setgid, or the B<-T> switch was used), neither variable is used.
-The program should instead say:
+or setgid, or the B<-T> or B<-t> switch was specified), neither variable
+is used. The program should instead say:
use lib "/my/directory";
==== //depot/maint-5.8/perl/pod/perlutil.pod#3 (text) ====
Index: perl/pod/perlutil.pod
--- perl/pod/perlutil.pod#2~30465~ 2007-03-05 08:57:07.000000000 -0800
+++ perl/pod/perlutil.pod 2007-03-22 16:01:23.000000000 -0700
@@ -205,10 +205,6 @@
which subroutines are taking up the most run time. See L<Devel::DProf>
for more information.
-=item L<perlcc|perlcc>
-
-F<perlcc> is the interface to the experimental Perl compiler suite.
-
=item L<prove>
F<prove> is a command-line interface to the test-running functionality of
@@ -262,7 +258,7 @@
L<roffitall|roffitall>, L<a2p|a2p>, L<s2p|s2p>, L<find2perl|find2perl>,
L<File::Find|File::Find>, L<pl2pm|pl2pm>, L<perlbug|perlbug>,
L<h2ph|h2ph>, L<c2ph|c2ph>, L<h2xs|h2xs>, L<dprofpp|dprofpp>,
-L<Devel::DProf>, L<perlcc|perlcc>, L<enc2xs>, L<xsubpp>, L<cpan>,
+L<Devel::DProf>, L<enc2xs>, L<xsubpp>, L<cpan>,
L<instmodsh>, L<piconv>, L<prove>
=cut
==== //depot/maint-5.8/perl/pod/perlvar.pod#45 (text) ====
Index: perl/pod/perlvar.pod
--- perl/pod/perlvar.pod#44~30468~ 2007-03-05 10:08:59.000000000 -0800
+++ perl/pod/perlvar.pod 2007-03-22 16:01:23.000000000 -0700
@@ -988,7 +988,7 @@
The current value of the flag associated with the B<-c> switch.
Mainly of use with B<-MO=...> to allow code to alter its behavior
when being compiled, such as for example to AUTOLOAD at compile
-time rather than normal, deferred loading. See L<perlcc>. Setting
+time rather than normal, deferred loading. Setting
C<$^C = 1> is similar to calling C<B::minus_c>.
=item $DEBUGGING
End of Patch.