diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-15 21:30:44 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-15 21:30:44 +0000 |
commit | c2276cd9a1ad823a3a292bd9ea5d0475bb983737 (patch) | |
tree | d3828d43e8271c783c6683783ad627b4232d3672 /gnu/usr.bin/perl/pod | |
parent | c30a36e0c140753f3f773b400f5dbc777b344b8a (diff) |
sync in-tree perl with 5.8.6
Diffstat (limited to 'gnu/usr.bin/perl/pod')
31 files changed, 787 insertions, 652 deletions
diff --git a/gnu/usr.bin/perl/pod/buildtoc b/gnu/usr.bin/perl/pod/buildtoc index 86d5ba7ebf7..e4dc82ade3f 100644 --- a/gnu/usr.bin/perl/pod/buildtoc +++ b/gnu/usr.bin/perl/pod/buildtoc @@ -32,6 +32,7 @@ $masterpodfile = File::Spec->catdir($Up, "pod.lst"); dmake => File::Spec->catdir($Up, "win32", "makefile.mk"), podmak => File::Spec->catdir($Up, "win32", "pod.mak"), # plan9 => File::Spec->catdir($Up, "plan9", "mkfile"), + unix => File::Spec->catdir($Up, "Makefile.SH"), ); { @@ -673,6 +674,27 @@ sub do_vms { $makefile; } +sub do_unix { + my $name = shift; + my $makefile_SH = join '', @_; + die "$0: $name contains NUL bytes" if $makefile_SH =~ /\0/; + + $makefile_SH =~ s/\n\s+-\@test -f \S+ && cd pod && \$\(LNS\) \S+ \S+ && cd \.\. && echo "\S+" >> extra.pods \# See buildtoc\n/\0/gm; + + my $sections = () = $makefile_SH =~ m/\0+/g; + + die "$0: $name contains no copy rules" if $sections < 1; + die "$0: $name contains $sections discontigous copy rules" + if $sections > 1; + + my @copy_rules = map "\t-\@test -f pod/$Copies{$_} && cd pod && \$(LNS) $Copies{$_} $_ && cd .. && echo \"pod/$_\" >> extra.pods # See buildtoc", + keys %Copies; + + $makefile_SH =~ s/\0+/join "\n", '', @copy_rules, ''/se; + $makefile_SH; + +} + # Do stuff my $built; diff --git a/gnu/usr.bin/perl/pod/perl.pod b/gnu/usr.bin/perl/pod/perl.pod index 5b50092761d..ab9064beb0f 100644 --- a/gnu/usr.bin/perl/pod/perl.pod +++ b/gnu/usr.bin/perl/pod/perl.pod @@ -132,6 +132,7 @@ For ease of access, the Perl manual has been split up into several sections. perlhist Perl history records perldelta Perl changes since previous version + perl585delta Perl changes in version 5.8.5 perl584delta Perl changes in version 5.8.4 perl583delta Perl changes in version 5.8.3 perl582delta Perl changes in version 5.8.2 @@ -370,9 +371,10 @@ Perl developers, please write to perl-thanks@perl.org . a2p awk to perl translator s2p sed to perl translator - http://www.perl.com/ the Perl Home Page + http://www.perl.org/ the Perl homepage + http://www.perl.com/ Perl articles (O'Reilly Media) http://www.cpan.org/ the Comprehensive Perl Archive - http://www.perl.org/ Perl Mongers (Perl user groups) + http://www.pm.org/ the Perl Mongers =head1 DIAGNOSTICS diff --git a/gnu/usr.bin/perl/pod/perl58delta.pod b/gnu/usr.bin/perl/pod/perl58delta.pod index 1260c0b88c9..04a03747aac 100644 --- a/gnu/usr.bin/perl/pod/perl58delta.pod +++ b/gnu/usr.bin/perl/pod/perl58delta.pod @@ -2992,7 +2992,7 @@ Using splice() past the end of an array now causes a warning. =item * Malformed Unicode encodings (UTF-8 and UTF-16) cause a lot of warnings, -ad doestrying to use UTF-16 surrogates (which are unimplemented). +as does trying to use UTF-16 surrogates (which are unimplemented). =item * diff --git a/gnu/usr.bin/perl/pod/perlapio.pod b/gnu/usr.bin/perl/pod/perlapio.pod index 10b8dc554e0..1dc3d5396a0 100644 --- a/gnu/usr.bin/perl/pod/perlapio.pod +++ b/gnu/usr.bin/perl/pod/perlapio.pod @@ -225,7 +225,7 @@ This corresponds to clearerr(), i.e., clears 'error' and (usually) This corresponds to fflush(). Sends any buffered write data to the underlying file. If called with C<NULL> this may flush all open -streams (or core dump with some USE_STDIO implementattions). Calling +streams (or core dump with some USE_STDIO implementations). Calling on a handle open for read only, or on which last operation was a read of some kind may lead to undefined behaviour on some USE_STDIO implementations. The USE_PERLIO (layers) implementation tries to diff --git a/gnu/usr.bin/perl/pod/perlcall.pod b/gnu/usr.bin/perl/pod/perlcall.pod index 40f1d65a7be..dd520afcaa1 100644 --- a/gnu/usr.bin/perl/pod/perlcall.pod +++ b/gnu/usr.bin/perl/pod/perlcall.pod @@ -343,7 +343,11 @@ has no effect when G_EVAL is not used. When G_KEEPERR is used, any errors in the called code will be prefixed with the string "\t(in cleanup)", and appended to the current value -of C<$@>. +of C<$@>. an error will not be appended if that same error string is +already at the end of C<$@>. + +In addition, a warning is generated using the appended string. This can be +disabled using C<no warnings 'misc'>. The G_KEEPERR flag was introduced in Perl version 5.002. diff --git a/gnu/usr.bin/perl/pod/perldata.pod b/gnu/usr.bin/perl/pod/perldata.pod index 6264cf4eb00..8e0f6ca8ad0 100644 --- a/gnu/usr.bin/perl/pod/perldata.pod +++ b/gnu/usr.bin/perl/pod/perldata.pod @@ -631,7 +631,7 @@ of how to arrange for an output ordering. =head2 Subscripts -An array is subscripted by specifying a dollary sign (C<$>), then the +An array is subscripted by specifying a dollar sign (C<$>), then the name of the array (without the leading C<@>), then the subscript inside square brackets. For example: diff --git a/gnu/usr.bin/perl/pod/perldebug.pod b/gnu/usr.bin/perl/pod/perldebug.pod index e44eaafdcb0..69346524ad9 100644 --- a/gnu/usr.bin/perl/pod/perldebug.pod +++ b/gnu/usr.bin/perl/pod/perldebug.pod @@ -1014,6 +1014,12 @@ L<Dumpvalue>, and L<perlrun>. +When debugging a script that uses #! and is thus normally found in +$PATH, the -S option causes perl to search $PATH for it, so you don't +have to type the path or `which $scriptname`. + + $ perl -Sd foo.pl + =head1 BUGS You cannot get stack frame information or in any fashion debug functions diff --git a/gnu/usr.bin/perl/pod/perldiag.pod b/gnu/usr.bin/perl/pod/perldiag.pod index 7ffda4b0052..27ac73b729f 100644 --- a/gnu/usr.bin/perl/pod/perldiag.pod +++ b/gnu/usr.bin/perl/pod/perldiag.pod @@ -783,6 +783,16 @@ usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See L<perlfunc/last>. +=item Can't load '%s' for module %s + +(F) The module you tried to load failed to load a dynamic extension. This +may either mean that you upgraded your version of perl to one that is +incompatible with your old dynamic extensions (which is known to happen +between major versions of perl), or (more likely) that your dynamic +extension was built against an older version of the library that is +installed on your system. You may need to rebuild your old dynamic +extensions. + =item Can't localize lexical variable %s (F) You used local on a variable name that was previously declared as a @@ -821,6 +831,12 @@ autoload, but there is no function to autoload. Most probable causes are a misprint in a function/method name or a failure to C<AutoSplit> the file, say, by doing C<make install>. +=item Can't locate loadable object for module %s in @INC + +(F) The module you loaded is trying to load an external library, like +for example, C<foo.so> or C<bar.dll>, but the L<DynaLoader> module was +unable to locate this library. See L<DynaLoader>. + =item Can't locate object method "%s" via package "%s" (F) You called a method correctly, and it correctly indicated a package @@ -924,6 +940,10 @@ for stdout. (F) The script you specified can't be opened for the indicated reason. +If you're debugging a script that uses #!, and normally relies on the +shell's $PATH search, the -S option causes perl to do that search, so +you don't have to type the path or C<`which $scriptname`>. + =item Can't read CRTL environ (S) A warning peculiar to VMS. Perl tried to read an element of %ENV @@ -1795,7 +1815,8 @@ L<perlsec> for more information. (F) You can't use system(), exec(), or a piped open in a setuid or setgid script if C<$ENV{PATH}> contains a directory that is writable by -the world. See L<perlsec>. +the world. Also, the PATH must not contain any relative directory. +See L<perlsec>. =item Insecure $ENV{%s} while running %s @@ -2016,7 +2037,7 @@ when the function is called. =item Malformed UTF-8 character (%s) -Perl detected something that didn't comply with UTF-8 encoding rules. +(W utf8) Perl detected something that didn't comply with UTF-8 encoding rules. One possible cause is that you read in data that you thought to be in UTF-8 but it wasn't (it was for example legacy 8-bit data). Another @@ -2066,6 +2087,11 @@ ended earlier on the current line. (W syntax) An underscore (underbar) in a numeric constant did not separate two digits. +=item Missing argument to -%c + +(F) The argument to the indicated command line switch must follow +immediately after the switch, without intervening spaces. + =item Missing %sbrace%s on \N{} (F) Wrong syntax of character name literal C<\N{charname}> within @@ -2363,11 +2389,6 @@ your system. (F) Configure didn't find anything resembling the setreuid() call for your system. -=item No space allowed after -%c - -(F) The argument to the indicated command line switch must follow -immediately after the switch, without intervening spaces. - =item No %s specified for -%c (F) The indicated command line switch needs a mandatory argument, but @@ -2604,6 +2625,11 @@ C<limit datasize n> (where C<n> is the number of kilobytes) to check the current limits and change them, and in ksh/bash/zsh use C<ulimit -a> and C<ulimit -d n>, respectively. +=item Out of memory during %s extend + +(X) An attempt was made to extend an array, a list, or a string beyond +the largest possible memory allocation. + =item Out of memory during "large" request for %s (F) The malloc() function returned 0, indicating there was insufficient @@ -2611,11 +2637,6 @@ remaining memory (or virtual memory) to satisfy the request. However, the request was judged large enough (compile-time default is 64K), so a possibility to shut down by trapping this error is granted. -=item Out of memory during %s extend - -(X) An attempt was made to extend an array, a list, or a string beyond -the largest possible memory allocation. - =item Out of memory during request for %s (X|F) The malloc() function returned 0, indicating there was @@ -3703,17 +3724,27 @@ target of the change to are deprecated and one should use the new ithreads instead, see L<perl58delta> for more details. -=item Tied variable freed while still in use - -(F) An access method for a tied variable (e.g. FETCH) did something to -free the variable. Since continuing the current operation is likely -to result in a coredump, Perl is bailing out instead. - =item times not implemented (F) Your version of the C library apparently doesn't do times(). I suspect you're not running on Unix. +=item "-T" is on the #! line, it must also be used on the command line + +(X) The #! line (or local equivalent) in a Perl script contains the +B<-T> option, but Perl was not invoked with B<-T> in its command line. +This is an error because, by the time Perl discovers a B<-T> in a +script, it's too late to properly taint everything from the environment. +So Perl gives up. + +If the Perl script is being executed as a command using the #! +mechanism (or its local equivalent), this error can usually be fixed by +editing the #! line so that the B<-T> option is a part of Perl's first +argument: e.g. change C<perl -n -T> to C<perl -T -n>. + +If the Perl script is being executed as C<perl scriptname>, then the +B<-T> option must appear on the command line: C<perl -T scriptname>. + =item To%s: illegal mapping '%s' (F) You tried to define a customized To-mapping for lc(), lcfirst, @@ -3736,22 +3767,6 @@ system call to call, silly dilly. B<-M> or B<-m> option. This is an error because B<-M> and B<-m> options are not intended for use inside scripts. Use the C<use> pragma instead. -=item Too late for "B<-T>" option - -(X) The #! line (or local equivalent) in a Perl script contains the -B<-T> option, but Perl was not invoked with B<-T> in its command line. -This is an error because, by the time Perl discovers a B<-T> in a -script, it's too late to properly taint everything from the environment. -So Perl gives up. - -If the Perl script is being executed as a command using the #! -mechanism (or its local equivalent), this error can usually be fixed by -editing the #! line so that the B<-T> option is a part of Perl's first -argument: e.g. change C<perl -n -T> to C<perl -T -n>. - -If the Perl script is being executed as C<perl scriptname>, then the -B<-T> option must appear on the command line: C<perl -T scriptname>. - =item Too late to run %s block (W void) A CHECK or INIT block is being defined during run time proper, diff --git a/gnu/usr.bin/perl/pod/perlfaq.pod b/gnu/usr.bin/perl/pod/perlfaq.pod index 7acdf613d04..1b5760e342f 100644 --- a/gnu/usr.bin/perl/pod/perlfaq.pod +++ b/gnu/usr.bin/perl/pod/perlfaq.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq - frequently asked questions about Perl ($Date: 2003/01/31 17:37:17 $) +perlfaq - frequently asked questions about Perl ($Date: 2003/12/03 03:02:44 $) =head1 DESCRIPTION @@ -98,6 +98,7 @@ in respect of this information or its use. =head1 The Questions + =head2 L<perlfaq1>: General Questions About Perl Very general, high-level questions about Perl. @@ -122,6 +123,10 @@ What are perl4 and perl5? =item * +What is Ponie? + +=item * + What is perl6? =item * @@ -169,8 +174,7 @@ How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl =head2 L<perlfaq2>: Obtaining and Learning about Perl -Where to find source and documentation for Perl, support, -and related matters. +Where to find source and documentation for Perl, support, and related matters. =over 4 @@ -374,7 +378,6 @@ Where can I learn about linking C with Perl? [h2xs, xsubpp] =item * I've read perlembed, perlguts, etc., but I can't embed perl in -my C program; what am I doing wrong? =item * @@ -389,8 +392,7 @@ What's MakeMaker? =head2 L<perlfaq4>: Data Manipulation -Manipulating numbers, dates, strings, arrays, hashes, and -miscellaneous data issues. +Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues. =over 4 @@ -400,6 +402,10 @@ Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I s =item * +Why is int() broken? + +=item * + Why isn't my octal data interpreted correctly? =item * @@ -408,7 +414,7 @@ Does Perl have a round() function? What about ceil() and floor()? Trig functio =item * -How do I convert between numeric representations? +How do I convert between numeric representations/bases/radixes? =item * @@ -833,7 +839,7 @@ How do I close a file descriptor by number? =item * -Why can't I use "C:\temp\foo" in DOS paths? What doesn't `C:\temp\foo.exe` work? +Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? =item * @@ -856,7 +862,7 @@ Why do I get weird spaces when I print an array of lines? =head2 L<perlfaq6>: Regular Expressions -Pattern matching and regular expressions. +This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number are handled with regular expressions, but those answers are found elsewhere in this document (in L<perlfaq9>: ``How do I decode or create those %-encodings on the web'' and L<perlfaq4>: ``How do I determine whether a scalar is a number/whole/integer/float'', to be precise). =over 4 @@ -942,7 +948,7 @@ Are Perl regexes DFAs or NFAs? Are they POSIX compliant? =item * -What's wrong with using grep or map in a void context? +What's wrong with using grep in a void context? =item * @@ -957,8 +963,7 @@ How do I match a pattern that is supplied by the user? =head2 L<perlfaq7>: General Perl Language Issues -General Perl language issues that don't clearly fit into any of the -other sections. +General Perl language issues that don't clearly fit into any of the other sections. =over 4 @@ -1083,8 +1088,7 @@ What does "bad interpreter" mean? =head2 L<perlfaq8>: System Interaction -Interprocess communication (IPC), control over the user-interface -(keyboard, screen and pointing devices). +This section of the Perl FAQ covers questions involving operating system interaction. Topics include interprocess communication (IPC), control over the user-interface (keyboard, screen and pointing devices), and most anything else not related to data manipulation. Read the FAQs and documentation specific to the port of perl to your operating system (eg, L<perlvms>, L<perlplan9>, ...). These should contain more detailed information on the vagaries of your perl. =over 4 @@ -1262,6 +1266,10 @@ How do I open a file without blocking? =item * +How do I tell the difference between errors from the shell and perl? + +=item * + How do I install a module from CPAN? =item * @@ -1278,7 +1286,7 @@ How do I add the directory my program lives in to the module/library search path =item * -How do I add a directory to my include path at runtime? +How do I add a directory to my include path (@INC) at runtime? =item * diff --git a/gnu/usr.bin/perl/pod/perlfaq1.pod b/gnu/usr.bin/perl/pod/perlfaq1.pod index e868e2e7600..c4aa4cc455a 100644 --- a/gnu/usr.bin/perl/pod/perlfaq1.pod +++ b/gnu/usr.bin/perl/pod/perlfaq1.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq1 - General Questions About Perl ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $) +perlfaq1 - General Questions About Perl ($Revision: 1.7 $, $Date: 2004/04/07 21:33:08 $) =head1 DESCRIPTION @@ -173,7 +173,7 @@ Probably the best thing to do is try to write equivalent code to do a set of tasks. These languages have their own newsgroups in which you can learn about (but hopefully not argue about) them. -Some comparison documents can be found at http://language.perl.com/versus/ +Some comparison documents can be found at http://www.perl.com/doc/FMTEYEWTK/versus/ if you really can't stop yourself. =head2 Can I do [task] in Perl? diff --git a/gnu/usr.bin/perl/pod/perlfaq2.pod b/gnu/usr.bin/perl/pod/perlfaq2.pod index 929a8b64a92..89ed6b7fa38 100644 --- a/gnu/usr.bin/perl/pod/perlfaq2.pod +++ b/gnu/usr.bin/perl/pod/perlfaq2.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $) +perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.7 $, $Date: 2004/04/07 21:33:08 $) =head1 DESCRIPTION @@ -129,7 +129,7 @@ miscellaneous modules. See http://www.cpan.org/modules/00modlist.long.html or http://search.cpan.org/ for a more complete list of modules by category. -CPAN is not affiliated with O'Reilly and Associates. +CPAN is not affiliated with O'Reilly Media. =head2 Is there an ISO or ANSI certified version of Perl? @@ -218,34 +218,34 @@ This is faster and more productive than just posting a request. =head2 Perl Books -A number of books on Perl and/or CGI programming are available. A few of -these are good, some are OK, but many aren't worth your money. Tom -Christiansen maintains a list of these books, some with extensive -reviews, at http://www.perl.com/perl/critiques/index.html . +A number of books on Perl and/or CGI programming are available. A few +of these are good, some are OK, but many aren't worth your money. +There is a list of these books, some with extensive reviews, at +http://books.perl.org/ . The incontestably definitive reference book on Perl, written by -the creator of Perl, is now (July 2000) in its third edition: +the creator of Perl, is now (Sept 2004) in its third edition: - Programming Perl (the "Camel Book"): + Programming Perl (the "Camel Book"): by Larry Wall, Tom Christiansen, and Jon Orwant - 0-596-00027-8 [3rd edition July 2000] + ISBN 0-596-00027-8 [3rd edition July 2000] http://www.oreilly.com/catalog/pperl3/ - (English, translations to several languages are also available) + (English, translations to several languages are also available) The companion volume to the Camel containing thousands of real-world examples, mini-tutorials, and complete programs is: - The Perl Cookbook (the "Ram Book"): + The Perl Cookbook (the "Ram Book"): by Tom Christiansen and Nathan Torkington, with Foreword by Larry Wall - ISBN 1-56592-243-3 [1st Edition August 1998] - http://perl.oreilly.com/catalog/cookbook/ + ISBN 0-596-00313-7 [2nd Edition August 2003] + http://www.oreilly.com/catalog/perlckbk2/ If you're already a seasoned programmer, then the Camel Book might suffice for you to learn Perl from. If you're not, check out the Llama book: - Learning Perl (the "Llama Book") + Learning Perl (the "Llama Book") by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 [3rd edition July 2001] http://www.oreilly.com/catalog/lperl3/ @@ -254,26 +254,26 @@ And for more advanced information on writing larger programs, presented in the same style as the Llama book, continue your education with the Alpaca book: - Learning Perl Objects, References, and Modules (the "Alpaca Book") - by Randal L. Schwartz, with Tom Phoenix (foreword by Damian Conway) - ISBN 0-596-00478-8 [1st edition June 2003] - http://www.oreilly.com/catalog/lrnperlorm/ + Learning Perl Objects, References, and Modules (the "Alpaca Book") + by Randal L. Schwartz, with Tom Phoenix (foreword by Damian Conway) + ISBN 0-596-00478-8 [1st edition June 2003] + http://www.oreilly.com/catalog/lrnperlorm/ If you're not an accidental programmer, but a more serious and possibly even degreed computer scientist who doesn't need as much hand-holding as we try to provide in the Llama, please check out the delightful book - Perl: The Programmer's Companion - by Nigel Chapman - ISBN 0-471-97563-X [1997, 3rd printing Spring 1998] - http://www.wiley.com/compbooks/catalog/97563-X.htm - http://www.wiley.com/compbooks/chapman/perl/perltpc.html (errata etc) + Perl: The Programmer's Companion + by Nigel Chapman + ISBN 0-471-97563-X [1997, 3rd printing Spring 1998] + http://www.wiley.com/compbooks/catalog/97563-X.htm + http://www.wiley.com/compbooks/chapman/perl/perltpc.html (errata etc) If you are more at home in Windows the following is available (though unfortunately rather dated). - Learning Perl on Win32 Systems (the "Gecko Book") + Learning Perl on Win32 Systems (the "Gecko Book") by Randal L. Schwartz, Erik Olson, and Tom Christiansen, with foreword by Larry Wall ISBN 1-56592-324-3 [1st edition August 1997] @@ -296,56 +296,56 @@ Recommended books on (or mostly on) Perl follow. =item References - Programming Perl + Programming Perl by Larry Wall, Tom Christiansen, and Jon Orwant ISBN 0-596-00027-8 [3rd edition July 2000] http://www.oreilly.com/catalog/pperl3/ - Perl 5 Pocket Reference - by Johan Vromans + Perl 5 Pocket Reference + by Johan Vromans ISBN 0-596-00032-4 [3rd edition May 2000] http://www.oreilly.com/catalog/perlpr3/ - Perl in a Nutshell - by Ellen Siever, Stephan Spainhour, and Nathan Patwardhan + Perl in a Nutshell + by Ellen Siever, Stephan Spainhour, and Nathan Patwardhan ISBN 1-56592-286-7 [1st edition December 1998] http://www.oreilly.com/catalog/perlnut/ =item Tutorials - Elements of Programming with Perl + Elements of Programming with Perl by Andrew L. Johnson ISBN 1-884777-80-5 [1st edition October 1999] http://www.manning.com/Johnson/ - Learning Perl + Learning Perl by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 [3rd edition July 2001] http://www.oreilly.com/catalog/lperl3/ - Learning Perl Objects, References, and Modules - by Randal L. Schwartz, with Tom Phoenix (foreword by Damian Conway) - ISBN 0-596-00478-8 [1st edition June 2003] - http://www.oreilly.com/catalog/lrnperlorm/ + Learning Perl Objects, References, and Modules + by Randal L. Schwartz, with Tom Phoenix (foreword by Damian Conway) + ISBN 0-596-00478-8 [1st edition June 2003] + http://www.oreilly.com/catalog/lrnperlorm/ - Learning Perl on Win32 Systems + Learning Perl on Win32 Systems by Randal L. Schwartz, Erik Olson, and Tom Christiansen, with foreword by Larry Wall ISBN 1-56592-324-3 [1st edition August 1997] http://www.oreilly.com/catalog/lperlwin/ - Perl: The Programmer's Companion + Perl: The Programmer's Companion by Nigel Chapman ISBN 0-471-97563-X [1997, 3rd printing Spring 1998] - http://www.wiley.com/compbooks/catalog/97563-X.htm - http://www.wiley.com/compbooks/chapman/perl/perltpc.html (errata etc) + http://www.wiley.com/compbooks/catalog/97563-X.htm + http://www.wiley.com/compbooks/chapman/perl/perltpc.html (errata etc) - Cross-Platform Perl + Cross-Platform Perl by Eric Foster-Johnson ISBN 1-55851-483-X [2nd edition September 2000] http://www.pconline.com/~erc/perlbook.htm - MacPerl: Power and Ease + MacPerl: Power and Ease by Vicki Brown and Chris Nandor, with foreword by Matthias Neeracher ISBN 1-881957-32-2 [1st edition May 1998] @@ -353,21 +353,20 @@ Recommended books on (or mostly on) Perl follow. =item Task-Oriented - The Perl Cookbook + The Perl Cookbook by Tom Christiansen and Nathan Torkington with foreword by Larry Wall ISBN 1-56592-243-3 [1st edition August 1998] http://www.oreilly.com/catalog/cookbook/ - Effective Perl Programming + Effective Perl Programming by Joseph Hall ISBN 0-201-41975-0 [1st edition 1998] http://www.awl.com/ - =item Special Topics - Mastering Regular Expressions + Mastering Regular Expressions by Jeffrey E. F. Friedl ISBN 0-596-00289-0 [2nd edition July 2002] http://www.oreilly.com/catalog/regex2/ @@ -393,10 +392,15 @@ Recommended books on (or mostly on) Perl follow. ISBN 1-56592-716-8 [1st edition January 2002] http://www.oreilly.com/catalog/mastperltk/ - Extending and Embedding Perl - by Tim Jenness and Simon Cozens - ISBN 1-930110-82-0 [1st edition August 2002] - http://www.manning.com/jenness + Extending and Embedding Perl + by Tim Jenness and Simon Cozens + ISBN 1-930110-82-0 [1st edition August 2002] + http://www.manning.com/jenness + + Perl Debugger Pocket Reference + by Richard Foley + ISBN 0-596-00503-2 [1st edition January 2004] + http://www.oreilly.com/catalog/perldebugpr/ =back @@ -476,32 +480,6 @@ as do the O'Reilly Perl Resource Kits (in both the Unix flavor and in the proprietary Microsoft flavor); the free Unix distributions also all come with Perl. -Alternatively, you can purchase commercial incidence based support -through the Perl Clinic. The following is a commercial from them: - -"The Perl Clinic is a commercial Perl support service operated by -ActiveState Tool Corp. and The Ingram Group. The operators have many -years of in-depth experience with Perl applications and Perl internals -on a wide range of platforms. - -"Through our group of highly experienced and well-trained support engineers, -we will put our best effort into understanding your problem, providing an -explanation of the situation, and a recommendation on how to proceed." - -Contact The Perl Clinic at - - www.PerlClinic.com - - North America Pacific Standard Time (GMT-8) - Tel: 1 604 606-4611 hours 8am-6pm - Fax: 1 604 606-4640 - - Europe (GMT) - Tel: 00 44 1483 862814 - Fax: 00 44 1483 862801 - -See also www.perl.com for updates on tutorials, training, and support. - =head2 Where do I send bug reports? If you are reporting a bug in the perl interpreter or the modules @@ -518,29 +496,27 @@ Read the perlbug(1) man page (perl5.004 or later) for more information. =head2 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? -The Perl Home Page at http://www.perl.com/ is currently hosted by -The O'Reilly Network, a subsidiary of O'Reilly and Associates. +Perl.com at http://www.perl.com/ is part of the O'Reilly Network, a +subsidiary of O'Reilly Media. + +The Perl Foundation is an advocacy organization for the Perl language +which maintains the web site http://www.perl.org/ as a general +advocacy site for the Perl language. It uses the domain to provide +general support services to the Perl community, including the hosting +of mailing lists, web sites, and other services. The web site +http://www.perl.org/ is a general advocacy site for the Perl language, +and there are many other sub-domains for special topics, such as -Perl Mongers is an advocacy organization for the Perl language which -maintains the web site http://www.perl.org/ as a general advocacy -site for the Perl language. + http://learn.perl.org/ + http://use.perl.org/ + http://jobs.perl.org/ + http://lists.perl.org/ Perl Mongers uses the pm.org domain for services related to Perl user groups, including the hosting of mailing lists and web sites. See the Perl user group web site at http://www.pm.org/ for more information about joining, starting, or requesting services for a Perl user group. -Perl Mongers also maintain the perl.org domain to provide general -support services to the Perl community, including the hosting of mailing -lists, web sites, and other services. The web site -http://www.perl.org/ is a general advocacy site for the Perl language, -and there are many other sub-domains for special topics, such as - - http://bugs.perl.org/ - http://history.perl.org/ - http://lists.perl.org/ - http://use.perl.org/ - http://www.cpan.org/ is the Comprehensive Perl Archive Network, a replicated worlwide repository of Perl software, see the I<What is CPAN?> question earlier in this document. diff --git a/gnu/usr.bin/perl/pod/perlfaq3.pod b/gnu/usr.bin/perl/pod/perlfaq3.pod index 26c7b4c9843..716567d4c0e 100644 --- a/gnu/usr.bin/perl/pod/perlfaq3.pod +++ b/gnu/usr.bin/perl/pod/perlfaq3.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq3 - Programming Tools ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $) +perlfaq3 - Programming Tools ($Revision: 1.7 $, $Date: 2004/04/07 21:33:08 $) =head1 DESCRIPTION @@ -218,24 +218,24 @@ If you're on Unix, you already have an IDE--Unix itself. The UNIX philosophy is the philosophy of several small tools that each do one thing and do it well. It's like a carpenter's toolbox. -If you want an IDE, check the following: +If you want an IDE, check the following (in alphabetical order, not +order of preference): =over 4 -=item Komodo +=item Eclipse -ActiveState's cross-platform (as of April 2001 Windows and Linux), -multi-language IDE has Perl support, including a regular expression -debugger and remote debugging -( http://www.ActiveState.com/Products/Komodo/index.html ). (Visual -Perl, a Visual Studio.NET plug-in is currently (early 2001) in beta -( http://www.ActiveState.com/Products/VisualPerl/index.html )). +The Eclipse Perl Integration Project integrates Perl +editing/debugging with Eclipse. + +The website for the project is http://e-p-i-c.sf.net/ -=item The Object System +=item Komodo -( http://www.castlelink.co.uk/object_system/ ) is a Perl web -applications development IDE, apparently for any platform -that runs Perl. +ActiveState's cross-platform (as of October 2004, that's Windows, Linux, +and Solaris), multi-language IDE has Perl support, including a regular expression +debugger and remote debugging +( http://www.ActiveState.com/Products/Komodo/ ). =item Open Perl IDE @@ -244,6 +244,11 @@ Open Perl IDE is an integrated development environment for writing and debugging Perl scripts with ActiveState's ActivePerl distribution under Windows 95/98/NT/2000. +=item OptiPerl + +( http://www.optiperl.com/ ) is a Windows IDE with simulated CGI +environment, including debugger and syntax highlighting editor. + =item PerlBuilder ( http://www.solutionsoft.com/perl.htm ) is an integrated development @@ -254,10 +259,11 @@ environment for Windows that supports Perl development. ( http://helpconsulting.net/visiperl/ ) From Help Consulting, for Windows. -=item OptiPerl +=item Visual Perl + +( http://www.activestate.com/Products/Visual_Perl/ ) +Visual Perl is a Visual Studio.NET plug-in from ActiveState. -( http://www.optiperl.com/ ) is a Windows IDE with simulated CGI -environment, including debugger and syntax highlighting editor. =back @@ -279,7 +285,7 @@ specifically for programming, such as Textpad If you are using MacOS, the same concerns apply. MacPerl (for Classic environments) comes with a simple editor. Popular external editors are BBEdit ( http://www.bbedit.com/ ) -or Alpha ( http://www.kelehers.org/alpha/ ). MacOS X users can +or Alpha ( http://www.his.com/~jguyer/Alpha/Alpha8.html ). MacOS X users can use Unix editors as well. =over 4 @@ -338,7 +344,7 @@ The following are Win32 multilanguage editor/IDESs that support Perl: =item Codewright -http://www.starbase.com/ +http://www.borland.com/codewright/ =item MultiEdit @@ -399,16 +405,22 @@ no 32k limit). =over 4 -=item BBEdit and BBEdit Lite +=item Affrus -are text editors for Mac OS that have a Perl sensitivity mode -( http://web.barebones.com/ ). +is a full Perl development enivornment with full debugger support ( +http://www.latenightsw.com ). =item Alpha is an editor, written and extensible in Tcl, that nonetheless has built in support for several popular markup and programming languages -including Perl and HTML ( http://alpha.olm.net/ ). +including Perl and HTML ( http://www.his.com/~jguyer/Alpha/Alpha8.html ). + +=item BBEdit and BBEdit Lite + +are text editors for Mac OS that have a Perl sensitivity mode +( http://web.barebones.com/ ). + =back @@ -454,7 +466,7 @@ to the Athena Widget set. Both are available from CPAN. See the directory http://www.cpan.org/modules/by-category/08_User_Interfaces/ Invaluable for Perl/Tk programming are the Perl/Tk FAQ at -http://w4.lns.cornell.edu/%7Epvhp/ptk/ptkTOC.html , the Perl/Tk Reference +http://phaseit.net/claird/comp.lang.perl.tk/ptkFAQ.html , the Perl/Tk Reference Guide available at http://www.cpan.org/authors/Stephen_O_Lidie/ , and the online manpages at @@ -780,7 +792,7 @@ Perl install anyway. =head2 How can I compile Perl into Java? You can also integrate Java and Perl with the -Perl Resource Kit from O'Reilly and Associates. See +Perl Resource Kit from O'Reilly Media. See http://www.oreilly.com/catalog/prkunix/ . Perl 5.6 comes with Java Perl Lingo, or JPL. JPL, still in diff --git a/gnu/usr.bin/perl/pod/perlfaq4.pod b/gnu/usr.bin/perl/pod/perlfaq4.pod index 2ff7c7110ef..5888b78286b 100644 --- a/gnu/usr.bin/perl/pod/perlfaq4.pod +++ b/gnu/usr.bin/perl/pod/perlfaq4.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq4 - Data Manipulation ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $) +perlfaq4 - Data Manipulation ($Revision: 1.7 $, $Date: 2004/04/07 21:33:08 $) =head1 DESCRIPTION @@ -559,7 +559,7 @@ C<$timestamp = gmtime(1005613200)> sets $timestamp to "Tue Nov 13 01:00:00 That doesn't mean that Perl can't be used to create non-Y2K compliant programs. It can. But so can your pencil. It's the fault of the user, not the language. At the risk of inflaming the NRA: ``Perl doesn't -break Y2K, people do.'' See http://language.perl.com/news/y2k.html for +break Y2K, people do.'' See http://www.perl.org/about/y2k.html for a longer exposition. =head1 Data: Strings @@ -1715,19 +1715,15 @@ sorting the keys as shown in an earlier question. =head2 What happens if I add or remove keys from a hash while iterating over it? -Don't do that. :-) +(contributed by brian d foy) -[lwall] In Perl 4, you were not allowed to modify a hash at all while -iterating over it. In Perl 5 you can delete from it, but you still -can't add to it, because that might cause a doubling of the hash table, -in which half the entries get copied up to the new top half of the -table, at which point you've totally bamboozled the iterator code. -Even if the table doesn't double, there's no telling whether your new -entry will be inserted before or after the current iterator position. +The easy answer is "Don't do that!" -Either treasure up your changes and make them after the iterator finishes -or use keys to fetch all the old keys at once, and iterate over the list -of keys. +If you iterate through the hash with each(), you can delete the key +most recently returned without worrying about it. If you delete or add +other keys, the iterator may skip or double up on them since perl +may rearrange the hash table. See the +entry for C<each()> in L<perlfunc>. =head2 How do I look up a hash element by value? diff --git a/gnu/usr.bin/perl/pod/perlfaq6.pod b/gnu/usr.bin/perl/pod/perlfaq6.pod index 168233bd1b5..6b0aaf71828 100644 --- a/gnu/usr.bin/perl/pod/perlfaq6.pod +++ b/gnu/usr.bin/perl/pod/perlfaq6.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq6 - Regular Expressions ($Revision: 1.20 $, $Date: 2003/01/03 20:05:28 $) +perlfaq6 - Regular Expressions ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $) =head1 DESCRIPTION @@ -151,7 +151,19 @@ Up to Perl 5.8.0, $/ has to be a string. This may change in 5.10, but don't get your hopes up. Until then, you can use these examples if you really need to do this. -Use the four argument form of sysread to continually add to +If you have File::Stream, this is easy. + + use File::Stream; + my $stream = File::Stream->new( + $filehandle, + separator => qr/\s*,\s*/, + ); + + print "$_\n" while <$stream>; + +If you don't have File::Stream, you have to do a little more work. + +You can use the four argument form of sysread to continually add to a buffer. After you add to the buffer, you check if you have a complete line (using your regular expression). @@ -354,7 +366,7 @@ created by Jeffrey Friedl and later modified by Fred Curtis. $/ = undef; $_ = <>; - s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs + s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse; print; This could, of course, be more legibly written with the C</x> modifier, adding @@ -395,11 +407,11 @@ whitespace and comments. Here it is expanded, courtesy of Fred Curtis. . ## Anything other char [^/"'\\]* ## Chars which doesn't start a comment, string or escape ) - }{$2}gxs; + }{defined $2 ? $2 : ""}gxse; A slight modification also removes C++ comments: - s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs; + s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse; =head2 Can I use Perl regular expressions to match balanced text? @@ -745,17 +757,17 @@ Or like this: } Here's another, slightly less painful, way to do it from Benjamin -Goldberg: +Goldberg, who uses a zero-width negative look-behind assertion. - $martian =~ m/ - (?!<[A-Z]) - (?:[A-Z][A-Z])*? - GX - /x; + print "found GX!\n" if $martian =~ m/ + (?<![A-Z]) + (?:[A-Z][A-Z])*? + GX + /x; This succeeds if the "martian" character GX is in the string, and fails -otherwise. If you don't like using (?!<), you can replace (?!<[A-Z]) -with (?:^|[^A-Z]). +otherwise. If you don't like using (?<!), a zero-width negative +look-behind assertion, you can replace (?<![A-Z]) with (?:^|[^A-Z]). It does have the drawback of putting the wrong thing in $-[0] and $+[0], but this usually can be worked around. diff --git a/gnu/usr.bin/perl/pod/perlfaq7.pod b/gnu/usr.bin/perl/pod/perlfaq7.pod index 96d6b88d4a2..2f0287def14 100644 --- a/gnu/usr.bin/perl/pod/perlfaq7.pod +++ b/gnu/usr.bin/perl/pod/perlfaq7.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq7 - General Perl Language Issues ($Revision: 1.15 $, $Date: 2003/07/24 02:17:21 $) +perlfaq7 - General Perl Language Issues ($Revision: 1.6 $, $Date: 2003/12/03 03:02:45 $) =head1 DESCRIPTION @@ -97,6 +97,16 @@ See L<perllexwarn> for more details. no warnings; # temporarily turn off warnings $a = $b + $c; # I know these might be undef } + +Additionally, you can enable and disable categories of warnings. +You turn off the categories you want to ignore and you can still +get other categories of warnings. See L<perllexwarn> for the +complete details, including the category names and hierarchy. + + { + no warnings 'uninitialized'; + $a = $b + $c; + } If you have an older version of Perl, the C<$^W> variable (documented in L<perlvar>) controls runtime warnings for a block: @@ -213,7 +223,7 @@ but encourages closures. Here's a classic function-generating function: sub add_function_generator { - return sub { shift + shift }; + return sub { shift() + shift() }; } $add_sub = add_function_generator(); @@ -232,7 +242,7 @@ value that the lexical had when the function was created. sub make_adder { my $addpiece = shift; - return sub { shift + $addpiece }; + return sub { shift() + $addpiece }; } $f1 = make_adder(20); diff --git a/gnu/usr.bin/perl/pod/perlfaq8.pod b/gnu/usr.bin/perl/pod/perlfaq8.pod index 22f6a0727c7..052ce7a001a 100644 --- a/gnu/usr.bin/perl/pod/perlfaq8.pod +++ b/gnu/usr.bin/perl/pod/perlfaq8.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq8 - System Interaction ($Revision: 1.6 $, $Date: 2003/12/03 03:02:45 $) +perlfaq8 - System Interaction ($Revision: 1.7 $, $Date: 2004/08/09 18:10:15 $) =head1 DESCRIPTION @@ -413,31 +413,30 @@ foregrounded process group, which you then trap in your process. Signals are documented in L<perlipc/"Signals"> and the section on ``Signals'' in the Camel. -Be warned that very few C libraries are re-entrant. Therefore, if you -attempt to print() in a handler that got invoked during another stdio -operation your internal structures will likely be in an -inconsistent state, and your program will dump core. You can -sometimes avoid this by using syswrite() instead of print(). +You can set the values of the %SIG hash to be the functions you want +to handle the signal. After perl catches the signal, it looks in %SIG +for a key with the same name as the signal, then calls the subroutine +value for that key. + + # as an anonymous subroutine + + $SIG{INT} = sub { syswrite(STDERR, "ouch\n", 5 ) }; + + # or a reference to a function + + $SIG{INT} = \&ouch; + + # or the name of the function as a string + + $SIG{INT} = "ouch"; + +Perl versions before 5.8 had in its C source code signal handlers which +would catch the signal and possibly run a Perl function that you had set +in %SIG. This violated the rules of signal handling at that level +causing perl to dump core. Since version 5.8.0, perl looks at %SIG +*after* the signal has been caught, rather than while it is being caught. +Previous versions of this answer were incorrect. -Unless you're exceedingly careful, the only safe things to do inside a -signal handler are (1) set a variable and (2) exit. In the first case, -you should only set a variable in such a way that malloc() is not -called (eg, by setting a variable that already has a value). - -For example: - - $Interrupted = 0; # to ensure it has a value - $SIG{INT} = sub { - $Interrupted++; - syswrite(STDERR, "ouch\n", 5); - } - -However, because syscalls restart by default, you'll find that if -you're in a "slow" call, such as <FH>, read(), connect(), or -wait(), that the only way to terminate them is by "longjumping" out; -that is, by raising an exception. See the time-out handler for a -blocking flock() in L<perlipc/"Signals"> or the section on ``Signals'' -in the Camel book. =head2 How do I modify the shadow password file on a Unix system? @@ -1066,6 +1065,74 @@ sysopen(): sysopen(FH, "/foo/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644) or die "can't open /foo/somefile: $!": +=head2 How do I tell the difference between errors from the shell and perl? + +(answer contributed by brian d foy, C<< <bdfoy@cpan.org> >> + +When you run a Perl script, something else is running the script for you, +and that something else may output error messages. The script might +emit its own warnings and error messages. Most of the time you cannot +tell who said what. + +You probably cannot fix the thing that runs perl, but you can change how +perl outputs its warnings by defining a custom warning and die functions. + +Consider this script, which has an error you may not notice immediately. + + #!/usr/locl/bin/perl + + print "Hello World\n"; + +I get an error when I run this from my shell (which happens to be +bash). That may look like perl forgot it has a print() function, +but my shebang line is not the path to perl, so the shell runs the +script, and I get the error. + + $ ./test + ./test: line 3: print: command not found + +A quick and dirty fix involves a little bit of code, but this may be all +you need to figure out the problem. + + #!/usr/bin/perl -w + + BEGIN { + $SIG{__WARN__} = sub{ print STDERR "Perl: ", @_; }; + $SIG{__DIE__} = sub{ print STDERR "Perl: ", @_; exit 1}; + } + + $a = 1 + undef; + $x / 0; + __END__ + +The perl message comes out with "Perl" in front. The BEGIN block +works at compile time so all of the compilation errors and warnings +get the "Perl:" prefix too. + + Perl: Useless use of division (/) in void context at ./test line 9. + Perl: Name "main::a" used only once: possible typo at ./test line 8. + Perl: Name "main::x" used only once: possible typo at ./test line 9. + Perl: Use of uninitialized value in addition (+) at ./test line 8. + Perl: Use of uninitialized value in division (/) at ./test line 9. + Perl: Illegal division by zero at ./test line 9. + Perl: Illegal division by zero at -e line 3. + +If I don't see that "Perl:", it's not from perl. + +You could also just know all the perl errors, and although there are +some people who may know all of them, you probably don't. However, they +all should be in the perldiag manpage. If you don't find the error in +there, it probably isn't a perl error. + +Looking up every message is not the easiest way, so let perl to do it +for you. Use the diagnostics pragma with turns perl's normal messages +into longer discussions on the topic. + + use diagnostics; + +If you don't get a paragraph or two of expanded discussion, it +might not be perl's message. + =head2 How do I install a module from CPAN? The easiest way is to have a module also named CPAN do it for you. diff --git a/gnu/usr.bin/perl/pod/perlfaq9.pod b/gnu/usr.bin/perl/pod/perlfaq9.pod index f73c619b988..c2991ccf559 100644 --- a/gnu/usr.bin/perl/pod/perlfaq9.pod +++ b/gnu/usr.bin/perl/pod/perlfaq9.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq9 - Networking ($Revision: 1.15 $, $Date: 2003/01/31 17:36:57 $) +perlfaq9 - Networking ($Revision: 1.6 $, $Date: 2003/12/03 03:02:45 $) =head1 DESCRIPTION @@ -383,7 +383,7 @@ a database, send mail, or purchase a computer). You can't, at least, not in real time. Bummer, eh? Without sending mail to the address and seeing whether there's a human -on the other hand to answer you, you cannot determine whether a mail +on the other end to answer you, you cannot determine whether a mail address is valid. Even if you apply the mail header standard, you can have problems, because there are deliverable addresses that aren't RFC-822 (the mail header standard) compliant, and addresses that aren't diff --git a/gnu/usr.bin/perl/pod/perlfunc.pod b/gnu/usr.bin/perl/pod/perlfunc.pod index fe300187e5b..7e52c4121d2 100644 --- a/gnu/usr.bin/perl/pod/perlfunc.pod +++ b/gnu/usr.bin/perl/pod/perlfunc.pod @@ -2922,7 +2922,9 @@ works for symmetry, but you really should consider writing something to the temporary file first. You will need to seek() to do the reading. -File handles can be opened to "in memory" files held in Perl scalars via: +Since v5.8.0, perl has built using PerlIO by default. Unless you've +changed this (ie Configure -Uuseperlio), you can open file handles to +"in memory" files held in Perl scalars via: open($fh, '>', \$variable) || .. @@ -2985,6 +2987,8 @@ Examples: } } +See L<perliol/> for detailed info on PerlIO. + You may also, in the Bourne shell tradition, specify an EXPR beginning with C<< '>&' >>, in which case the rest of the string is interpreted as the name of a filehandle (or file descriptor, if numeric) to be @@ -3743,9 +3747,14 @@ array in subroutines, just like C<shift>. =item pos Returns the offset of where the last C<m//g> search left off for the variable -in question (C<$_> is used when the variable is not specified). May be -modified to change that offset. Such modification will also influence -the C<\G> zero-width assertion in regular expressions. See L<perlre> and +in question (C<$_> is used when the variable is not specified). Note that +0 is a valid match offset, while C<undef> indicates that the search position +is reset (usually due to match failure, but can also be because no match has +yet been performed on the scalar). C<pos> directly accesses the location used +by the regexp engine to store the offset, so assigning to C<pos> will change +that offset, and so will also influence the C<\G> zero-width assertion in +regular expressions. Because a failed C<m//gc> match doesn't reset the offset, +the return from C<pos> won't change either in this case. See L<perlre> and L<perlop>. =item print FILEHANDLE LIST @@ -5379,9 +5388,9 @@ meanings of the fields: (The epoch was at 00:00 January 1, 1970 GMT.) -(*) The ctime field is non-portable. In particular, you cannot expect -it to be a "creation time", see L<perlport/"Files and Filesystems"> -for details. +(*) Not all fields are supported on all filesystem types. Notably, the +ctime field is non-portable. In particular, you cannot expect it to be a +"creation time", see L<perlport/"Files and Filesystems"> for details. If C<stat> is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the stat structure from the @@ -5873,11 +5882,9 @@ tell() on pipes, fifos, and sockets usually returns -1. There is no C<systell> function. Use C<sysseek(FH, 0, 1)> for that. -Do not use tell() on a filehandle that has been opened using -sysopen(), use sysseek() for that as described above. Why? Because -sysopen() creates unbuffered, "raw", filehandles, while open() creates -buffered filehandles. sysseek() make sense only on the first kind, -tell() only makes sense on the second kind. +Do not use tell() (or other buffered I/O operations) on a file handle +that has been manipulated by sysread(), syswrite() or sysseek(). +Those functions ignore the buffering, while tell() does not. =item telldir DIRHANDLE @@ -6304,7 +6311,8 @@ files. The first two elements of the list must be the NUMERICAL access and modification times, in that order. Returns the number of files successfully changed. The inode change time of each file is set to the current time. For example, this code has the same effect as the -Unix touch(1) command when the files I<already exist>. +Unix touch(1) command when the files I<already exist> and belong to +the user running the program: #!/usr/bin/perl $atime = $mtime = time; @@ -6314,7 +6322,8 @@ Since perl 5.7.2, if the first two elements of the list are C<undef>, then the utime(2) function in the C library will be called with a null second argument. On most systems, this will set the file's access and modification times to the current time (i.e. equivalent to the example -above.) +above) and will even work on other users' files where you have write +permission: utime undef, undef, @ARGV; diff --git a/gnu/usr.bin/perl/pod/perlguts.pod b/gnu/usr.bin/perl/pod/perlguts.pod index 035188e75ab..3ae04644855 100644 --- a/gnu/usr.bin/perl/pod/perlguts.pod +++ b/gnu/usr.bin/perl/pod/perlguts.pod @@ -926,8 +926,11 @@ SV. The C<name> and C<namlen> arguments are used to associate a string with the magic, typically the name of a variable. C<namlen> is stored in the -C<mg_len> field and if C<name> is non-null and C<namlen> E<gt>= 0 a malloc'd -copy of the name is stored in C<mg_ptr> field. +C<mg_len> field and if C<name> is non-null then either a C<savepvn> copy of +C<name> or C<name> itself is stored in the C<mg_ptr> field, depending on +whether C<namlen> is greater than zero or equal to zero respectively. As a +special case, if C<(name && namlen == HEf_SVKEY)> then C<name> is assumed +to contain an C<SV*> and is stored as-is with its REFCNT incremented. The sv_magic function uses C<how> to determine which, if any, predefined "Magic Virtual Table" should be assigned to the C<mg_virtual> field. @@ -944,6 +947,9 @@ count of the C<obj> object is incremented. If it is the same, or if the C<how> argument is C<PERL_MAGIC_arylen>, or if it is a NULL pointer, then C<obj> is merely stored, without the reference count being incremented. +See also C<sv_magicext> in L<perlapi> for a more flexible way to add magic +to an SV. + There is also a function to add magic to an C<HV>: void hv_magic(HV *hv, GV *gv, int how); diff --git a/gnu/usr.bin/perl/pod/perlhist.pod b/gnu/usr.bin/perl/pod/perlhist.pod index b944102193e..43da1b440a5 100644 --- a/gnu/usr.bin/perl/pod/perlhist.pod +++ b/gnu/usr.bin/perl/pod/perlhist.pod @@ -380,6 +380,8 @@ the strings?). 5.8.5-RC1 2004-Jul-06 5.8.5-RC2 2004-Jul-08 5.8.5 2004-Jul-19 + 5.8.6-RC1 2004-Nov-11 + 5.8.6 2004-Nov-27 Hugo 5.9.0 2003-Oct-27 Rafael 5.9.1 2004-Mar-16 diff --git a/gnu/usr.bin/perl/pod/perlintern.pod b/gnu/usr.bin/perl/pod/perlintern.pod index 8a2608d4330..23d0f42fc1b 100644 --- a/gnu/usr.bin/perl/pod/perlintern.pod +++ b/gnu/usr.bin/perl/pod/perlintern.pod @@ -493,6 +493,12 @@ is a CV representing a possible closure. (SvFAKE and name of '&' is not a meaningful combination currently but could become so if C<my sub foo {}> is implemented.) +The flag SVf_PADSTALE is cleared on lexicals each time the my() is executed, +and set on scope exit. This allows the 'Variable $x is not available' warning +to be generated in evals, such as + + { my $x = 1; sub f { eval '$x'} } f(); + AV * CvPADLIST(CV *cv) =for hackers diff --git a/gnu/usr.bin/perl/pod/perlipc.pod b/gnu/usr.bin/perl/pod/perlipc.pod index 5d916e832e5..76dcfed734e 100644 --- a/gnu/usr.bin/perl/pod/perlipc.pod +++ b/gnu/usr.bin/perl/pod/perlipc.pod @@ -355,11 +355,16 @@ with your timeouts. If you are having problems with such functions, you can try using the POSIX sigaction() function, which bypasses the Perl safe signals (note that this means subjecting yourself to possible memory corruption, as described above). Instead of setting -C<$SIG{ALRM}> try something like the following: +C<$SIG{ALRM}>: - use POSIX; - sigaction SIGALRM, new POSIX::SigAction sub { die "alarm\n" } - or die "Error setting SIGALRM handler: $!\n"; + local $SIG{ALRM} = sub { die "alarm" }; + +try something like the following: + + use POSIX qw(SIGALRM); + POSIX::sigaction(SIGALRM, + POSIX::SigAction->new(sub { die "alarm" })) + or die "Error setting SIGALRM handler: $!\n"; =item Restartable system calls @@ -388,7 +393,7 @@ will generate the signal again. The result of this is a rather odd "loop". In future Perl's signal mechanism may be changed to avoid this - perhaps by simply disallowing %SIG handlers on signals of that type. Until then the work-round is not to set a %SIG handler on those -signals. (Which signals they are is operating system dependant.) +signals. (Which signals they are is operating system dependent.) =item Signals triggered by operating system state diff --git a/gnu/usr.bin/perl/pod/perlop.pod b/gnu/usr.bin/perl/pod/perlop.pod index b24036a395e..3ac953426e0 100644 --- a/gnu/usr.bin/perl/pod/perlop.pod +++ b/gnu/usr.bin/perl/pod/perlop.pod @@ -190,8 +190,8 @@ Unary "-" performs arithmetic negation if the operand is numeric. If the operand is an identifier, a string consisting of a minus sign concatenated with the identifier is returned. Otherwise, if the string starts with a plus or minus, a string starting with the opposite sign -is returned. One effect of these rules is that C<-bareword> is equivalent -to C<"-bareword">. +is returned. One effect of these rules is that -bareword is equivalent +to "-bareword". Unary "~" performs bitwise negation, i.e., 1's complement. For example, C<0666 & ~027> is 0640. (See also L<Integer Arithmetic> and @@ -219,7 +219,8 @@ pattern, substitution, or transliteration. The left argument is what is supposed to be searched, substituted, or transliterated instead of the default $_. When used in scalar context, the return value generally indicates the success of the operation. Behavior in list context depends on the particular -operator. See L</"Regexp Quote-Like Operators"> for details. +operator. See L</"Regexp Quote-Like Operators"> for details and +L<perlretut> for examples using these operators. If the right argument is an expression rather than a search pattern, substitution, or transliteration, it is interpreted as a search pattern at run @@ -2034,6 +2035,14 @@ you say the compiler will precompute the number which that expression represents so that the interpreter won't have to. +=head2 No-ops + +Perl doesn't officially have a no-op operator, but the bare constants +C<0> and C<1> are special-cased to not produce a warning in a void +context, so you can for example safely do + + 1 while foo(); + =head2 Bitwise String Operators Bitstrings of any size may be manipulated by the bitwise operators diff --git a/gnu/usr.bin/perl/pod/perlre.pod b/gnu/usr.bin/perl/pod/perlre.pod index 85dc1f2d448..0db542c6b3a 100644 --- a/gnu/usr.bin/perl/pod/perlre.pod +++ b/gnu/usr.bin/perl/pod/perlre.pod @@ -201,7 +201,7 @@ as endpoints of a range, that's not a range, the "-" is understood literally. If Unicode is in effect, C<\s> matches also "\x{85}", "\x{2028}, and "\x{2029}", see L<perlunicode> for more details about C<\pP>, C<\PP>, and C<\X>, and L<perluniintro> about Unicode in general. -You can define your own C<\p> and C<\P> propreties, see L<perlunicode>. +You can define your own C<\p> and C<\P> properties, see L<perlunicode>. The POSIX character class syntax @@ -582,7 +582,7 @@ track of the number of nested parentheses. For example: Inside the C<(?{...})> block, C<$_> refers to the string the regular expression is matching against. You can also use C<pos()> to know what is -the current position of matching withing this string. +the current position of matching within this string. The C<code> is properly scoped in the following sense: If the assertion is backtracked (compare L<"Backtracking">), all changes introduced after diff --git a/gnu/usr.bin/perl/pod/perlrun.pod b/gnu/usr.bin/perl/pod/perlrun.pod index 3567ae7d693..86e84ca2058 100644 --- a/gnu/usr.bin/perl/pod/perlrun.pod +++ b/gnu/usr.bin/perl/pod/perlrun.pod @@ -6,7 +6,7 @@ perlrun - how to execute the Perl interpreter B<perl> S<[ B<-sTtuUWX> ]> S<[ B<-hv> ] [ B<-V>[:I<configvar>] ]> - S<[ B<-cw> ] [ B<-d>[:I<debugger>] ] [ B<-D>[I<number/list>] ]> + S<[ B<-cw> ] [ B<-d>[B<t>][:I<debugger>] ] [ B<-D>[I<number/list>] ]> S<[ B<-pna> ] [ B<-F>I<pattern> ] [ B<-l>[I<octal>] ] [ B<-0>[I<octal/hexadecimal>] ]> S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> ]> S<[ B<-P> ]> @@ -334,16 +334,24 @@ be skipped. =item B<-d> +=item B<-dt> + runs the program under the Perl debugger. See L<perldebug>. +If B<t> is specified, it indicates to the debugger that threads +will be used in the code being debugged. =item B<-d:>I<foo[=bar,baz]> +=item B<-dt:>I<foo[=bar,baz]> + runs the program under the control of a debugging, profiling, or tracing module installed as Devel::foo. E.g., B<-d:DProf> executes the program using the Devel::DProf profiler. As with the B<-M> flag, options may be passed to the Devel::foo package where they will be received and interpreted by the Devel::foo::import routine. The comma-separated list of options must follow a C<=> character. +If B<t> is specified, it indicates to the debugger that threads +will be used in the code being debugged. See L<perldebug>. =item B<-D>I<letters> @@ -360,8 +368,7 @@ As an alternative, specify a number instead of list of letters (e.g., B<-D14> is equivalent to B<-Dtls>): 1 p Tokenizing and parsing - 2 s Stack snapshots - with v, displays all stacks + 2 s Stack snapshots (with v, displays all stacks) 4 l Context (loop) stack processing 8 t Trace execution 16 o Method and overloading resolution @@ -381,7 +388,7 @@ B<-D14> is equivalent to B<-Dtls>): 262144 R Include reference counts of dumped variables (eg when using -Ds) 524288 J Do not s,t,P-debug (Jump over) opcodes within package DB 1048576 v Verbose: use in conjunction with other flags - 2097152 C Copy On Write + 8388608 q quiet - currently only suppresses the "EXECUTING" message All these flags require B<-DDEBUGGING> when you compile the Perl executable (but see L<Devel::Peek>, L<re> which may change this). @@ -523,6 +530,10 @@ folks use it for their backup files: $ perl -pi~ -e 's/foo/bar/' file1 file2 file3... +Note that because B<-i> renames or deletes the original file before +creating a new file of the same name, UNIX-style soft and hard links will +not be preserved. + Finally, the B<-i> switch does not impede execution when no files are given on the command line. In this case, no backup is made (the original file cannot, of course, be determined) and processing @@ -595,7 +606,7 @@ Note that the lines are not printed by default. See B<-p> to have lines printed. If a file named by an argument cannot be opened for some reason, Perl warns you about it and moves on to the next file. -Here is an efficient way to delete all files that haven't been modifed for +Here is an efficient way to delete all files that haven't been modified for at least a week: find . -mtime +7 -print | perl -nle unlink @@ -723,9 +734,12 @@ original name fails, and if the name does not already end in one of those suffixes. If your Perl was compiled with DEBUGGING turned on, using the -Dp switch to Perl shows how the search progresses. -Typically this is used to emulate #! startup on platforms that -don't support #!. This example works on many platforms that -have a shell compatible with Bourne shell: +Typically this is used to emulate #! startup on platforms that don't +support #!. Its also convenient when debugging a script that uses #!, +and is thus normally found by the shell's $PATH search mechanism. + +This example works on many platforms that have a shell compatible with +Bourne shell: #!/usr/bin/perl eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' @@ -817,12 +831,14 @@ prints the version and patchlevel of your perl executable. prints summary of the major perl configuration values and the current values of @INC. -=item B<-V:>I<name> +=item B<-V:>I<configvar> Prints to STDOUT the value of the named configuration variable(s), -with multiples when your query looks like a regex. -For example, +with multiples when your configvar argument looks like a regex (has +non-letters). For example: + $ perl -V:libc + libc='/lib/libc-2.2.4.so'; $ perl -V:lib. libs='-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc'; libc='/lib/libc-2.2.4.so'; @@ -843,7 +859,7 @@ you to embed queries into shell commands. (mnemonic: PATH separator compression-vars: zcat='' zip='zip' are here ! A leading colon removes the 'name=' part of the response, this allows -you to map to the name you need. +you to map to the name you need. (mnemonic: empty label) $ echo "goodvfork="`./perl -Ilib -V::usevfork` goodvfork=false; @@ -1077,6 +1093,11 @@ The command used to load the debugger code. The default is: BEGIN { require 'perl5db.pl' } +=item PERL5DB_THREADED + +If set to a true value, indicates to the debugger that the code being +debugged uses threads. + =item PERL5SHELL (specific to the Win32 port) May be set to an alternative shell that perl must use internally for @@ -1092,6 +1113,20 @@ fit for interactive use, and setting COMSPEC to such a shell may interfere with the proper functioning of other programs (which usually look in COMSPEC to find a shell fit for interactive use). +=item PERL_ALLOW_NON_IFS_LSP (specific to the Win32 port) + +Set to 1 to allow the use of non-IFS compatible LSP's. +Perl normally searches for an IFS-compatible LSP because this is required +for its emulation of Windows sockets as real filehandles. However, this may +cause problems if you have a firewall such as McAfee Guardian which requires +all applications to use its LSP which is not IFS-compatible, because clearly +Perl will normally avoid using such an LSP. +Setting this environment variable to 1 means that Perl will simply use the +first suitable LSP enumerated in the catalog, which keeps McAfee Guardian +happy (and in that particular case Perl still works too because McAfee +Guardian's LSP actually plays some other games which allow applications +requiring IFS compatibility to work). + =item PERL_DEBUG_MSTATS Relevant only if perl is compiled with the malloc included with the perl @@ -1170,7 +1205,7 @@ L<perlvms> and in F<README.vms> in the Perl source distribution. In Perls 5.8.1 and later. If set to C<unsafe> the pre-Perl-5.8.0 signals behaviour (immediate but unsafe) is restored. If set to C<safe> the safe (or deferred) signals are used. -See L<perlipc/"Deferred Signals (Safe signals)">. +See L<perlipc/"Deferred Signals (Safe Signals)">. =item PERL_UNICODE diff --git a/gnu/usr.bin/perl/pod/perlsec.pod b/gnu/usr.bin/perl/pod/perlsec.pod index 5a09e32d8ec..3174450f8e9 100644 --- a/gnu/usr.bin/perl/pod/perlsec.pod +++ b/gnu/usr.bin/perl/pod/perlsec.pod @@ -32,10 +32,10 @@ program more secure than the corresponding C program. You may not use data derived from outside your program to affect something else outside your program--at least, not by accident. All command line arguments, environment variables, locale information (see -L<perllocale>), results of certain system calls (readdir(), -readlink(), the variable of shmread(), the messages returned by -msgrcv(), the password, gcos and shell fields returned by the -getpwxxx() calls), and all file input are marked as "tainted". +L<perllocale>), results of certain system calls (C<readdir()>, +C<readlink()>, the variable of C<shmread()>, the messages returned by +C<msgrcv()>, the password, gcos and shell fields returned by the +C<getpwxxx()> calls), and all file input are marked as "tainted". Tainted data may not be used directly or indirectly in any command that invokes a sub-shell, nor in any command that modifies files, directories, or processes, B<with the following exceptions>: @@ -129,11 +129,27 @@ For example: If you try to do something insecure, you will get a fatal error saying something like "Insecure dependency" or "Insecure $ENV{PATH}". +The exception to the principle of "one tainted value taints the whole +expression" is with the ternary conditional operator C<?:>. Since code +with a ternary conditional + + $result = $tainted_value ? "Untainted" : "Also untainted"; + +is effectively + + if ( $tainted_value ) { + $result = "Untainted"; + } else { + $result = "Also untainted"; + } + +it doesn't make sense for C<$result> to be tainted. + =head2 Laundering and Detecting Tainted Data To test whether a variable contains tainted data, and whose use would thus trigger an "Insecure dependency" message, you can use the -tainted() function of the Scalar::Util module, available in your +C<tainted()> function of the Scalar::Util module, available in your nearby CPAN mirror, and included in Perl starting from the release 5.8.0. Or you may be able to use the following C<is_tainted()> function. @@ -179,7 +195,7 @@ Laundering data using regular expression is the I<only> mechanism for untainting dirty data, unless you use the strategy detailed below to fork a child of lesser privilege. -The example does not untaint $data if C<use locale> is in effect, +The example does not untaint C<$data> if C<use locale> is in effect, because the characters matched by C<\w> are determined by the locale. Perl considers that locale definitions are untrustworthy because they contain data from outside the program. If you are writing a @@ -220,16 +236,16 @@ will not. =head2 Cleaning Up Your Path -For "Insecure C<$ENV{PATH}>" messages, you need to set C<$ENV{'PATH'}> to a -known value, and each directory in the path must be non-writable by others -than its owner and group. You may be surprised to get this message even -if the pathname to your executable is fully qualified. This is I<not> -generated because you didn't supply a full path to the program; instead, -it's generated because you never set your PATH environment variable, or -you didn't set it to something that was safe. Because Perl can't -guarantee that the executable in question isn't itself going to turn -around and execute some other program that is dependent on your PATH, it -makes sure you set the PATH. +For "Insecure C<$ENV{PATH}>" messages, you need to set C<$ENV{'PATH'}> to +a known value, and each directory in the path must be absolute and +non-writable by others than its owner and group. You may be surprised to +get this message even if the pathname to your executable is fully +qualified. This is I<not> generated because you didn't supply a full path +to the program; instead, it's generated because you never set your PATH +environment variable, or you didn't set it to something that was safe. +Because Perl can't guarantee that the executable in question isn't itself +going to turn around and execute some other program that is dependent on +your PATH, it makes sure you set the PATH. The PATH isn't the only environment variable which can cause problems. Because some shells may use the variables IFS, CDPATH, ENV, and @@ -247,26 +263,26 @@ privileges. Perl doesn't prevent you from opening tainted filenames for reading, so be careful what you print out. The tainting mechanism is intended to prevent stupid mistakes, not to remove the need for thought. -Perl does not call the shell to expand wild cards when you pass B<system> -and B<exec> explicit parameter lists instead of strings with possible shell -wildcards in them. Unfortunately, the B<open>, B<glob>, and +Perl does not call the shell to expand wild cards when you pass C<system> +and C<exec> explicit parameter lists instead of strings with possible shell +wildcards in them. Unfortunately, the C<open>, C<glob>, and backtick functions provide no such alternate calling convention, so more subterfuge will be required. Perl provides a reasonably safe way to open a file or pipe from a setuid or setgid program: just create a child process with reduced privilege who does the dirty work for you. First, fork a child using the special -B<open> syntax that connects the parent and child by a pipe. Now the +C<open> syntax that connects the parent and child by a pipe. Now the child resets its ID set and any other per-process attributes, like environment variables, umasks, current working directories, back to the originals or known safe values. Then the child process, which no longer -has any special permissions, does the B<open> or other system call. +has any special permissions, does the C<open> or other system call. Finally, the child passes the data it managed to access back to the parent. Because the file or pipe was opened in the child while running under less privilege than the parent, it's not apt to be tricked into doing something it shouldn't. -Here's a way to do backticks reasonably safely. Notice how the B<exec> is +Here's a way to do backticks reasonably safely. Notice how the C<exec> is not called with a string that the shell could expand. This is by far the best way to call something that might be subjected to shell escapes: just never call the shell at all. @@ -330,7 +346,7 @@ outlaw scripts with any set-id bit set, which doesn't help much. Alternately, it can simply ignore the set-id bits on scripts. If the latter is true, Perl can emulate the setuid and setgid mechanism when it notices the otherwise useless setuid/gid bits on Perl scripts. It does -this via a special executable called B<suidperl> that is automatically +this via a special executable called F<suidperl> that is automatically invoked for you if it's needed. However, if the kernel set-id script feature isn't disabled, Perl will @@ -357,12 +373,12 @@ of the set-id script to open to the interpreter, rather than using a pathname subject to meddling, it instead passes I</dev/fd/3>. This is a special file already opened on the script, so that there can be no race condition for evil scripts to exploit. On these systems, Perl should be -compiled with C<-DSETUID_SCRIPTS_ARE_SECURE_NOW>. The B<Configure> +compiled with C<-DSETUID_SCRIPTS_ARE_SECURE_NOW>. The F<Configure> program that builds Perl tries to figure this out for itself, so you should never have to specify this yourself. Most modern releases of SysVr4 and BSD 4.4 use this approach to avoid the kernel race condition. -Prior to release 5.6.1 of Perl, bugs in the code of B<suidperl> could +Prior to release 5.6.1 of Perl, bugs in the code of F<suidperl> could introduce a security hole. =head2 Protecting Your Programs diff --git a/gnu/usr.bin/perl/pod/perlsub.pod b/gnu/usr.bin/perl/pod/perlsub.pod index 31e4f59a3cf..1a9b14597b4 100644 --- a/gnu/usr.bin/perl/pod/perlsub.pod +++ b/gnu/usr.bin/perl/pod/perlsub.pod @@ -212,7 +212,7 @@ C<DESTROY> plus all functions mentioned in L<perltie> and L<PerlIO::via>. The C<BEGIN>, C<CHECK>, C<INIT> and C<END> subroutines are not so much subroutines as named special code blocks, of which you can have more -than one in a package, and which you can B<not> call explicitely. See +than one in a package, and which you can B<not> call explicitly. See L<perlmod/"BEGIN, CHECK, INIT and END"> =head2 Private Variables via my() diff --git a/gnu/usr.bin/perl/pod/perlthrtut.pod b/gnu/usr.bin/perl/pod/perlthrtut.pod index 517fdd1b86d..8e4e4f6063b 100644 --- a/gnu/usr.bin/perl/pod/perlthrtut.pod +++ b/gnu/usr.bin/perl/pod/perlthrtut.pod @@ -602,7 +602,7 @@ communications between threads. =head2 Semaphores: Synchronizing Data Access Semaphores are a kind of generic locking mechanism. In their most basic -form, they behave very much like lockable scalars, except that thay +form, they behave very much like lockable scalars, except that they can't hold data, and that they must be explicitly unlocked. In their advanced form, they act like a kind of counter, and can allow multiple threads to have the 'lock' at any one time. diff --git a/gnu/usr.bin/perl/pod/perltie.pod b/gnu/usr.bin/perl/pod/perltie.pod index 429a6627701..b64357665f4 100644 --- a/gnu/usr.bin/perl/pod/perltie.pod +++ b/gnu/usr.bin/perl/pod/perltie.pod @@ -1118,9 +1118,11 @@ You cannot easily tie a multilevel data structure (such as a hash of hashes) to a dbm file. The first problem is that all but GDBM and Berkeley DB have size limitations, but beyond that, you also have problems with how references are to be represented on disk. One experimental -module that does attempt to address this need partially is the MLDBM -module. Check your nearest CPAN site as described in L<perlmodlib> for -source code to MLDBM. +module that does attempt to address this need is DBM::Deep. Check your +nearest CPAN site as described in L<perlmodlib> for source code. Note +that despite its name, DBM::Deep does not use dbm. Another earlier attempt +at solving the problem is MLDBM, which is also available on the CPAN, but +which has some fairly serious limitations. Tied filehandles are still incomplete. sysopen(), truncate(), flock(), fcntl(), stat() and -X can't currently be trapped. diff --git a/gnu/usr.bin/perl/pod/perltoc.pod b/gnu/usr.bin/perl/pod/perltoc.pod index 5f601c2e3a9..e89db8e34ea 100644 --- a/gnu/usr.bin/perl/pod/perltoc.pod +++ b/gnu/usr.bin/perl/pod/perltoc.pod @@ -829,7 +829,7 @@ Interaction, perlfaq9 - Networking =back -=head2 perlfaq1 - General Questions About Perl ($Revision: 1.9 $, $Date: +=head2 perlfaq1 - General Questions About Perl ($Revision: 1.10 $, $Date: 2003/07/09 15:47:28 $) =over 4 @@ -878,8 +878,8 @@ Scheme, or Tcl? =back -=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.9 $, -$Date: 2004/08/09 18:10:16 $) +=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.10 $, +$Date: 2005/01/15 21:30:38 $) =over 4 @@ -934,7 +934,7 @@ References, Tutorials, Task-Oriented, Special Topics =back -=head2 perlfaq3 - Programming Tools ($Revision: 1.9 $, $Date: 2003/08/24 +=head2 perlfaq3 - Programming Tools ($Revision: 1.10 $, $Date: 2003/08/24 05:26:59 $) =over 4 @@ -1021,7 +1021,7 @@ my C program; what am I doing wrong? =back -=head2 perlfaq4 - Data Manipulation ($Revision: 1.9 $, $Date: 2003/10/02 +=head2 perlfaq4 - Data Manipulation ($Revision: 1.10 $, $Date: 2003/10/02 04:44:33 $) =over 4 @@ -1240,7 +1240,7 @@ array of hashes or arrays? =back -=head2 perlfaq5 - Files and Formats ($Revision: 1.9 $, $Date: 2003/01/26 +=head2 perlfaq5 - Files and Formats ($Revision: 1.10 $, $Date: 2003/01/26 17:45:46 $) =over 4 @@ -1336,7 +1336,7 @@ protected files? Isn't this a bug in Perl? =back -=head2 perlfaq6 - Regular Expressions ($Revision: 1.9 $, $Date: 2003/01/03 +=head2 perlfaq6 - Regular Expressions ($Revision: 1.10 $, $Date: 2003/01/03 20:05:28 $) =over 4 @@ -1403,7 +1403,7 @@ file? =back -=head2 perlfaq7 - General Perl Language Issues ($Revision: 1.9 $, $Date: +=head2 perlfaq7 - General Perl Language Issues ($Revision: 1.10 $, $Date: 2003/07/24 02:17:21 $) =over 4 @@ -1485,7 +1485,7 @@ methods? =back -=head2 perlfaq8 - System Interaction ($Revision: 1.9 $, $Date: 2003/01/26 +=head2 perlfaq8 - System Interaction ($Revision: 1.10 $, $Date: 2003/01/26 17:44:04 $) =over 4 @@ -1613,7 +1613,7 @@ search path? =back -=head2 perlfaq9 - Networking ($Revision: 1.9 $, $Date: 2003/01/31 17:36:57 +=head2 perlfaq9 - Networking ($Revision: 1.10 $, $Date: 2003/01/31 17:36:57 $) =over 4 @@ -1834,6 +1834,8 @@ regular expressions =item Constant Folding +=item No-ops + =item Bitwise String Operators =item Integer Arithmetic @@ -2252,7 +2254,7 @@ I<commandline>, B<-F>I<pattern>, B<-h>, B<-i>[I<extension>], B<-I>I<directory>, B<-l>[I<octnum>], B<-m>[B<->]I<module>, B<-M>[B<->]I<module>, B<-M>[B<->]I<'module ...'>, B<-[mM]>[B<->]I<module=arg[,arg]...>, B<-n>, B<-p>, B<-P>, B<-s>, B<-S>, -B<-t>, B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I<name>, B<-w>, B<-W>, +B<-t>, B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I<configvar>, B<-w>, B<-W>, B<-X>, B<-x>, B<-x> I<directory> =back @@ -2261,10 +2263,11 @@ B<-X>, B<-x>, B<-x> I<directory> HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLIO, :bytes, :crlf, :mmap, :perlio, :pop, :raw, :stdio, :unix, :utf8, :win32, PERLIO_DEBUG, PERLLIB, -PERL5DB, PERL5SHELL (specific to the Win32 port), PERL_DEBUG_MSTATS, -PERL_DESTRUCT_LEVEL, PERL_DL_NONLAZY, PERL_ENCODING, PERL_HASH_SEED, -PERL_HASH_SEED_DEBUG, PERL_ROOT (specific to the VMS port), PERL_SIGNALS, -PERL_UNICODE, SYS$LOGIN (specific to the VMS port) +PERL5DB, PERL5SHELL (specific to the Win32 port), PERL_ALLOW_NON_IFS_LSP +(specific to the Win32 port), PERL_DEBUG_MSTATS, PERL_DESTRUCT_LEVEL, +PERL_DL_NONLAZY, PERL_ENCODING, PERL_HASH_SEED, PERL_HASH_SEED_DEBUG, +PERL_ROOT (specific to the VMS port), PERL_SIGNALS, PERL_UNICODE, SYS$LOGIN +(specific to the VMS port) =back @@ -3889,9 +3892,9 @@ Look around, Check it's new, Discuss the need, Choose a name, Check again =item Step-by-step: Making the module -Start with F<h2xs>, Use L<strict|strict> and L<warnings|warnings>, Use -L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!, Use L<plain old -documentation|perlpod>, Write tests, Write the README +Start with F<module-starter> or F<h2xs>, Use L<strict|strict> and +L<warnings|warnings>, Use L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!, +Use L<plain old documentation|perlpod>, Write tests, Write the README =item Step-by-step: Distributing your module @@ -4688,8 +4691,8 @@ SvSetSV, SvSetSV_nosteal, SvSHARE, SvUNLOCK =item Memory Management -Copy, Move, New, Newc, Newz, Poison, Renew, Renewc, Safefree, savepv, -savepvn, savesharedpv, StructCopy, Zero +Copy, CopyD, Move, MoveD, New, Newc, Newz, Poison, Renew, Renewc, Safefree, +savepv, savepvn, savesharedpv, StructCopy, Zero, ZeroD =item Miscellaneous Functions @@ -4734,30 +4737,31 @@ SvNIOK_off, SvNOK, SvNOKp, SvNOK_off, SvNOK_on, SvNOK_only, SvNV, SvNVx, SvNVX, SvOK, SvOOK, SvPOK, SvPOKp, SvPOK_off, SvPOK_on, SvPOK_only, SvPOK_only_UTF8, SvPV, SvPVbyte, SvPVbytex, SvPVbytex_force, SvPVbyte_force, SvPVbyte_nolen, SvPVutf8, SvPVutf8x, SvPVutf8x_force, -SvPVutf8_force, SvPVutf8_nolen, SvPVX, SvPVx, SvPV_force, SvPV_force_nomg, +SvPVutf8_force, SvPVutf8_nolen, SvPVx, SvPVX, SvPV_force, SvPV_force_nomg, SvPV_nolen, SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK, SvROK_off, SvROK_on, SvRV, SvSTASH, SvTAINT, SvTAINTED, SvTAINTED_off, SvTAINTED_on, SvTRUE, SvTYPE, SvUOK, SvUPGRADE, SvUTF8, SvUTF8_off, SvUTF8_on, SvUV, SvUVx, SvUVX, sv_2bool, sv_2cv, sv_2io, sv_2iv, sv_2mortal, sv_2nv, sv_2pvbyte, sv_2pvbyte_nolen, sv_2pvutf8, sv_2pvutf8_nolen, sv_2pv_flags, sv_2pv_nolen, sv_2uv, sv_backoff, sv_bless, sv_catpv, sv_catpvf, -sv_catpvf_mg, sv_catpvn, sv_catpvn_flags, sv_catpvn_mg, sv_catpv_mg, -sv_catsv, sv_catsv_flags, sv_catsv_mg, sv_chop, sv_clear, sv_cmp, -sv_cmp_locale, sv_collxfrm, sv_copypv, sv_dec, sv_derived_from, sv_eq, -sv_force_normal, sv_force_normal_flags, sv_free, sv_gets, sv_grow, sv_inc, -sv_insert, sv_isa, sv_isobject, sv_iv, sv_len, sv_len_utf8, sv_magic, -sv_magicext, sv_mortalcopy, sv_newmortal, sv_newref, sv_nv, sv_pos_b2u, -sv_pos_u2b, sv_pv, sv_pvbyte, sv_pvbyten, sv_pvbyten_force, sv_pvn, -sv_pvn_force, sv_pvn_force_flags, sv_pvutf8, sv_pvutf8n, sv_pvutf8n_force, -sv_reftype, sv_replace, sv_report_used, sv_reset, sv_rvweaken, sv_setiv, -sv_setiv_mg, sv_setnv, sv_setnv_mg, sv_setpv, sv_setpvf, sv_setpvf_mg, -sv_setpviv, sv_setpviv_mg, sv_setpvn, sv_setpvn_mg, sv_setpv_mg, -sv_setref_iv, sv_setref_nv, sv_setref_pv, sv_setref_pvn, sv_setref_uv, -sv_setsv, sv_setsv_flags, sv_setsv_mg, sv_setuv, sv_setuv_mg, sv_taint, -sv_tainted, sv_true, sv_unmagic, sv_unref, sv_unref_flags, sv_untaint, -sv_upgrade, sv_usepvn, sv_usepvn_mg, sv_utf8_decode, sv_utf8_downgrade, -sv_utf8_encode, sv_utf8_upgrade, sv_utf8_upgrade_flags, sv_uv, sv_vcatpvfn, -sv_vsetpvfn +sv_catpvf_mg, sv_catpvn, sv_catpvn_flags, sv_catpvn_mg, sv_catpvn_nomg, +sv_catpv_mg, sv_catsv, sv_catsv_flags, sv_catsv_mg, sv_catsv_nomg, sv_chop, +sv_clear, sv_cmp, sv_cmp_locale, sv_collxfrm, sv_copypv, sv_dec, +sv_derived_from, sv_eq, sv_force_normal, sv_force_normal_flags, sv_free, +sv_gets, sv_grow, sv_inc, sv_insert, sv_isa, sv_isobject, sv_iv, sv_len, +sv_len_utf8, sv_magic, sv_magicext, sv_mortalcopy, sv_newmortal, sv_newref, +sv_nv, sv_pos_b2u, sv_pos_u2b, sv_pv, sv_pvbyte, sv_pvbyten, +sv_pvbyten_force, sv_pvn, sv_pvn_force, sv_pvn_force_flags, sv_pvutf8, +sv_pvutf8n, sv_pvutf8n_force, sv_reftype, sv_replace, sv_report_used, +sv_reset, sv_rvweaken, sv_setiv, sv_setiv_mg, sv_setnv, sv_setnv_mg, +sv_setpv, sv_setpvf, sv_setpvf_mg, sv_setpviv, sv_setpviv_mg, sv_setpvn, +sv_setpvn_mg, sv_setpv_mg, sv_setref_iv, sv_setref_nv, sv_setref_pv, +sv_setref_pvn, sv_setref_uv, sv_setsv, sv_setsv_flags, sv_setsv_mg, +sv_setsv_nomg, sv_setuv, sv_setuv_mg, sv_taint, sv_tainted, sv_true, +sv_unmagic, sv_unref, sv_unref_flags, sv_untaint, sv_upgrade, sv_usepvn, +sv_usepvn_mg, sv_utf8_decode, sv_utf8_downgrade, sv_utf8_encode, +sv_utf8_upgrade, sv_utf8_upgrade_flags, sv_uv, sv_vcatpvf, sv_vcatpvfn, +sv_vcatpvf_mg, sv_vsetpvf, sv_vsetpvfn, sv_vsetpvf_mg =item Unicode Support @@ -5029,7 +5033,7 @@ t/cmd t/run t/io t/op, t/lib ext lib coretest, test.deparse, test.taintwarn, minitest, test.valgrind check.valgrind utest.valgrind ucheck.valgrind, test.third check.third utest.third ucheck.third, test.torture torturetest, utest ucheck test.utf8 -check.utf8, test_harness +check.utf8, minitest.utf16 test.utf16, test_harness =item Running tests by hand @@ -5096,356 +5100,155 @@ I<The Road goes ever on and on, down from the door where it began.> =item DESCRIPTION -=item To do during 5.6.x - -=over 4 - -=item Support for I/O disciplines - -=item Autoload bytes.pm - -=item Make "\u{XXXX}" et al work - -=item Create a char *sv_pvprintify(sv, STRLEN *lenp, UV flags) - -=item Overloadable regex assertions - -=item Unicode - -=item Work out exit/die semantics for threads - -=item Better support for nonpreemptive threading systems like GNU pth - -=item Typed lexicals for compiler - -=item Compiler workarounds for Win32 - -=item AUTOLOADing in the compiler - -=item Fixing comppadlist when compiling - -=item Cleaning up exported namespace - -=item Complete signal handling - -=item Out-of-source builds - -=item POSIX realtime support - -=item UNIX98 support - -=item IPv6 Support - -=item Long double conversion - -=item Locales - -=item Arithmetic on non-Arabic numerals - -=item POSIX Unicode character classes - -=item Factoring out common suffices/prefices in regexps (trie optimization) - -=item Security audit shipped utilities - -=item Sort out the uid-setting mess - -=item Custom opcodes - -=item DLL Versioning - -=item Introduce @( and @) - -=item Floating point handling - -=item IV/UV preservation +=item assertions -=item Replace pod2html with something using Pod::Parser +=item iCOW -=item Automate module testing on CPAN +=item (?{...}) closures in regexps -=item sendmsg and recvmsg +=item A re-entrant regexp engine -=item Rewrite perlre documentation +=item pragmata -=item Convert example code to IO::Handle filehandles - -=item Document Win32 choices +=over 4 -=item Check new modules +=item lexical pragmas -=item Make roffitall find pods and libs itself +=item use less 'memory' =back -=item To do at some point +=item prototypes and functions =over 4 -=item Remove regular expression recursion - -=item Memory leaks after failed eval - -=item bitfields in pack - -=item Cross compilation - -=item Perl preprocessor / macros - -=item Perl lexer in Perl - -=item Using POSIX calls internally - -=item -i rename file when changed - -=item All ARGV input should act like E<lt>E<gt> - -=item Support for rerunning debugger - -=item Test Suite for the Debugger - -=item my sub foo { } - -=item One-pass global destruction - -=item Rewrite regexp parser - -=item Cache recently used regexps - -=item Cross-compilation support - -=item Bit-shifting bitvectors - -=item debugger pragma - -=item use less pragma - -=item switch structures - -=item Cache eval tree - -=item rcatmaybe - -=item Shrink opcode tables - -=item Optimize away @_ - -=item Prototypes versus indirect objects - -=item Install HTML - -=item Prototype method calls - -=item Return context prototype declarations - -=item magic_setisa - -=item Garbage collection - -=item IO tutorial - -=item Rewrite perldoc +=item _ prototype character -=item Install .3p manpages - -=item Unicode tutorial - -=item Update POSIX.pm for 1003.1-2 - -=item Retargetable installation - -=item POSIX emulation on non-POSIX systems - -=item Rename Win32 headers +=item inlining autoloaded constants =item Finish off lvalue functions -=item Update sprintf documentation - -=item Use fchown/fchmod internally - -=item Make v-strings overloaded objects - -=item Allow restricted hash assignment - -=item Should overload be inheritable? - -=item Taint rethink - -=item Perform correctly when XSUBs call subroutines that exit via -goto(LABEL) and friends - =back -=item Vague ideas +=item Unicode and UTF8 =over 4 -=item ref() in list context - -=item Make tr/// return histogram of characters in list context - -=item Compile to real threaded code - -=item Structured types - -=item Modifiable $1 et al. - -=item Procedural interfaces for IO::*, etc. +=item Implicit Latin 1 => Unicode translation -=item RPC modules +=item UTF8 caching code -=item Attach/detach debugger from running program - -=item GUI::Native - -=item foreach(reverse ...) - -=item Constant function cache +=item Unicode in Filenames -=item Approximate regular expression matching +=item Unicode in %ENV =back -=item Ongoing +=item Regexps =over 4 -=item Update guts documentation - -=item Add more tests - -=item Update auxiliary tools - -=item Create debugging macros +=item regexp optimiser optional -=item truncate to the people - -=item Unicode in Filenames +=item common suffices/prefices in regexps (trie optimization) =back -=item Unicode in %ENV - -=item Recently done things +=item POD =over 4 -=item Alternative RE syntax module - -=item Safe signal handling - -=item Tie Modules - -=item gettimeofday +=item POD -> HTML conversion still sucks -=item setitimer and getimiter - -=item Testing __DIE__ hook - -=item CPP equivalent in Perl - -=item Explicit switch statements - -=item autocroak - -=item UTF/EBCDIC - -=item UTF Regexes - -=item perlcc to produce executable - -=item END blocks saved in compiled output +=back -=item Secure temporary file module +=item Misc medium sized projects -=item Integrate Time::HiRes +=over 4 -=item Turn Cwd into XS +=item UNITCHECK -=item Mmap for input +=item optional optimizer -=item Byte to/from UTF-8 and UTF-8 to/from local conversion +=item You WANT *how* many -=item Add sockatmark support +=item lexical aliases -=item Mailing list archives +=item no 6 -=item Bug tracking +=item IPv6 -=item Integrate MacPerl +=item entersub XS vs Perl -=item Web "nerve center" for Perl +=item @INC source filter to Filter::Simple -=item Regular expression tutorial +=item bincompat functions -=item Debugging Tutorial +=item Use fchown/fchmod internally -=item Integrate new modules +=back -=item Integrate profiler +=item Tests -=item Y2K error detection +=over 4 -=item Regular expression debugger +=item Make Schwern poorer -=item POD checker +=item test B -=item "Dynamic" lexicals +=item Improve tests for Config.pm -=item Cache precompiled modules +=item common test code for timed bailout =back -=item Deprecated Wishes +=item Installation =over 4 -=item Loop control on do{} - -=item Lexically scoped typeglobs +=item compressed man pages -=item format BOTTOM +=item Make Config.pm cope with differences between build and installed perl -=item report HANDLE +=item Relocatable perl -=item Generalised want()/caller()) +=item make HTML install work -=item Named prototypes +=item put patchlevel in -v -=item Built-in globbing +=back -=item Regression tests for suidperl +=item Incremental things -=item Cached hash values +=over 4 -=item Add compression modules +=item autovivification -=item Reorganise documentation into tutorials/references +=item fix tainting bugs -=item Remove distinction between functions and operators +=item Make tainting consistent -=item Make XS easier to use +=item Dual life everything -=item Make embedding easier to use +=back -=item man for perl +=item Vague things -=item my $Package::variable +=over 4 -=item "or" tests defined, not truth +=item threads -=item "class"-based lexicals +=item POSIX memory footprint -=item byteperl +=item Optimize away @_ -=item Lazy evaluation / tail recursion removal +=item switch ops -=item Make "use utf8" the default +=item Attach/detach debugger from running program -=item Unicode collation and normalization +=item A decent benchmark -=item pack/unpack tutorial +=item readpipe(LIST) =back @@ -5506,7 +5309,7 @@ B<-V> =back -=head2 perldelta, perl584delta - what is new for perl v5.8.4 +=head2 perldelta - what is new for perl v5.8.5 =over 4 @@ -5516,36 +5319,52 @@ B<-V> =item Core Enhancements -=over 4 +=item Modules and Pragmata -=item Malloc wrapping +=item Utility Changes -=item Unicode Character Database 4.0.1 +=item New Documentation -=item suidperl less insecure +=item Performance Enhancements -=item format +=item Installation and Configuration Improvements + +=item Selected Bug Fixes + +=item New or Changed Diagnostics + +=item Changed Internals + +=item New Tests + +=item Known Problems + +=item Platform Specific Problems + +=item Reporting Bugs + +=item SEE ALSO =back -=item Modules and Pragmata +=head2 perl586delta, perldelta - what is new for perl v5.8.5 =over 4 -=item Updated modules +=item DESCRIPTION -Attribute::Handlers, B, Benchmark, CGI, Carp, Cwd, Exporter, File::Find, -IO, IPC::Open3, Local::Maketext, Math::BigFloat, Math::BigInt, -Math::BigRat, MIME::Base64, ODBM_File, POSIX, Shell, Socket, Storable, -Switch, Sys::Syslog, Term::ANSIColor, Time::HiRes, Unicode::UCD, Win32, -base, open, threads, utf8 +=item Incompatible Changes -=back +=item Core Enhancements -=item Performance Enhancements +=item Modules and Pragmata =item Utility Changes +=item New Documentation + +=item Performance Enhancements + =item Installation and Configuration Improvements =item Selected Bug Fixes @@ -5554,7 +5373,9 @@ base, open, threads, utf8 =item Changed Internals -=item Future Directions +=item New Tests + +=item Known Problems =item Platform Specific Problems @@ -5564,7 +5385,7 @@ base, open, threads, utf8 =back -=head2 perl585delta, perldelta - what is new for perl v5.8.5 +=head2 perl585delta - what is new for perl v5.8.5 =over 4 @@ -5586,10 +5407,6 @@ base, open, threads, utf8 =back -=item New Documentation - -=item Performance Enhancements - =item Installation and Configuration Improvements =item Selected Bug Fixes @@ -5598,8 +5415,6 @@ base, open, threads, utf8 =item Changed Internals -=item New Tests - =item Known Problems =item Platform Specific Problems @@ -8138,18 +7953,18 @@ DJGPP, Pthreads =item PA-RISC +=item Portability Between PA-RISC Versions + =item PA-RISC 1.0 =item PA-RISC 1.1 =item PA-RISC 2.0 -=item Itanium & Itanium 2 - -=item Portability Between PA-RISC Versions - =item Itanium Processor Family and HP-UX +=item Itanium & Itanium 2 + =item Building Dynamic Extensions on HP-UX =item The HP ANSI C Compiler @@ -9106,8 +8921,9 @@ LIST, waitpid PID,FLAGS =item Setting Up Perl on Win32 -Make, Command Shell, Borland C++, Microsoft Visual C++, Microsoft Platform -SDK 64-bit Compiler, MinGW release 3 with gcc, MinGW release 1 with gcc +Make, Command Shell, Borland C++, Microsoft Visual C++, Microsoft Visual +C++ Toolkit 2003, Microsoft Platform SDK 64-bit Compiler, MinGW release 3 +with gcc, MinGW release 1 with gcc =item Building @@ -9123,7 +8939,7 @@ Extensions, Notes on 64-bit Windows =item Running Perl Scripts -Miscellaneous Things +=item Miscellaneous Things =back @@ -9595,6 +9411,12 @@ Legend of characters above literals in regex that are longer than 127 bytes, EBCDIC, format +=over 4 + +=item The Logic of :locale + +=back + =item HISTORY =item SEE ALSO @@ -10218,7 +10040,8 @@ FILL, MAX, KEYS, RITER, NAME, PMROOT, ARRAY =item B::OP Methods -next, sibling, name, ppaddr, desc, targ, type, seq, flags, private +next, sibling, name, ppaddr, desc, targ, type, opt, static, flags, private, +spare =item B::UNOP METHOD @@ -10427,30 +10250,40 @@ B<-base>I<n>, B<-bigendian>, B<-littleendian> =item Other options -B<-main>, B<-banner> +B<-main>, B<-nomain>, B<-nobanner>, B<-banner>, B<-banneris> => subref =item Option Stickiness =back +=item ABBREVIATIONS + +=over 4 + +=item OP class abbreviations + +=item OP flags abbreviations + +=back + =item FORMATTING SPECIFICATIONS +=over 4 + +=item Special Patterns + B<(x(>I<exec_text>B<;>I<basic_text>B<)x)>, B<(*(>I<text>B<)*)>, B<(*(>I<text1>B<;>I<text2>B<)*)>, B<(?(>I<text1>B<#>I<var>I<Text2>B<)?)>, -B<#>I<var>, B<#>I<var>I<N>, B<~>, B<#addr>, B<#arg>, B<#class>, +B<~> + +=item # Variables + +B<#>I<var>, B<#>I<var>I<N>, B<#>I<Var>, B<#addr>, B<#arg>, B<#class>, B<#classsym>, B<#coplabel>, B<#exname>, B<#extarg>, B<#firstaddr>, B<#flags>, B<#flagval>, B<#hyphseq>, B<#label>, B<#lastaddr>, B<#name>, B<#NAME>, B<#next>, B<#nextaddr>, B<#noise>, B<#private>, B<#privval>, -B<#seq>, B<#seqnum>, B<#sibaddr>, B<#svaddr>, B<#svclass>, B<#svval>, -B<#targ>, B<#targarg>, B<#targarglife>, B<#typenum> - -=item ABBREVIATIONS - -=over 4 - -=item OP flags abbreviations - -=item OP class abbreviations +B<#seq>, B<#seqnum>, B<#opt>, B<#static>, B<#sibaddr>, B<#svaddr>, +B<#svclass>, B<#svval>, B<#targ>, B<#targarg>, B<#targarglife>, B<#typenum> =back @@ -10591,6 +10424,18 @@ B<-u Package> =item DESCRIPTION +=item EXAMPLES + +=over 4 + +=item OPTIONS + +=back + +=item SEE ALSO + +=item TODO + =item AUTHOR =back @@ -11338,6 +11183,30 @@ module =back +=back + +=over 4 + +=item GLOBAL VARIABLES + +=over 4 + +=item $Carp::CarpLevel + +=item $Carp::MaxEvalLen + +=item $Carp::MaxArgLen + +=item $Carp::MaxArgNums + +=item $Carp::Verbose + +=back + +=back + +=over 4 + =item BUGS =back @@ -12078,13 +11947,45 @@ Dumper =over 4 +=item Why use ppport.h? + +You should use F<ppport.h> in modern code so that your code will work +with the widest range of Perl interpreters possible, without significant +additional work. + +=item How to use ppport.h + +=item Running ppport.h + +=back + +=item FUNCTIONS + +=over 4 + =item WriteFile =back -=item ppport.h +=item COMPATIBILITY -=item AUTHOR +=over 4 + +=item Provided Perl compatibility API + +=item Perl API not supported by ppport.h + +perl 5.9.2, perl 5.9.1, perl 5.9.0, perl 5.8.3, perl 5.8.1, perl 5.8.0, +perl 5.7.3, perl 5.7.2, perl 5.7.1, perl 5.6.1, perl 5.6.0, perl 5.005_03, +perl 5.005, perl 5.004_05, perl 5.004_04, perl 5.004 + +=back + +=item BUGS + +=item AUTHORS + +=item COPYRIGHT =item SEE ALSO @@ -13057,6 +12958,12 @@ Legend of characters above literals in regex that are longer than 127 bytes, EBCDIC, format +=over 4 + +=item The Logic of :locale + +=back + =item HISTORY =item SEE ALSO @@ -14657,7 +14564,7 @@ splitdir, catpath(), abs2rel, rel2abs() =item SEE ALSO -=item AUTHORS +=item AUTHOR =back @@ -16587,7 +16494,8 @@ of quoted-printable strings =item DESCRIPTION -encode_qp($str), encode_qp($str, $eol), decode_qp($str); +encode_qp($str), encode_qp($str, $eol), encode_qp($str, $eol, $binmode), +decode_qp($str); =item COPYRIGHT @@ -16604,7 +16512,8 @@ strings =item DESCRIPTION -encode_qp($str), encode_qp($str, $eol), decode_qp($str); +encode_qp($str), encode_qp($str, $eol), encode_qp($str, $eol, $binmode), +decode_qp($str); =item COPYRIGHT diff --git a/gnu/usr.bin/perl/pod/perlvar.pod b/gnu/usr.bin/perl/pod/perlvar.pod index 9078a2021ed..73a5be5c957 100644 --- a/gnu/usr.bin/perl/pod/perlvar.pod +++ b/gnu/usr.bin/perl/pod/perlvar.pod @@ -778,7 +778,9 @@ you may use the CPAN module C<Linux::Pid>. The real uid of this process. (Mnemonic: it's the uid you came I<from>, if you're running setuid.) You can change both the real uid and -the effective uid at the same time by using POSIX::setuid(). +the effective uid at the same time by using POSIX::setuid(). Since +changes to $< require a system call, check $! after a change attempt to +detect any possible errors. =item $EFFECTIVE_USER_ID @@ -792,7 +794,8 @@ The effective uid of this process. Example: ($<,$>) = ($>,$<); # swap real and effective uid You can change both the effective uid and the real uid at the same -time by using POSIX::setuid(). +time by using POSIX::setuid(). Changes to $> require a check to $! +to detect any possible errors after an attempted change. (Mnemonic: it's the uid you went I<to>, if you're running setuid.) C<< $< >> and C<< $> >> can be swapped only on machines @@ -815,7 +818,8 @@ set the real gid. So the value given by C<$(> should I<not> be assigned back to C<$(> without being forced numeric, such as by adding zero. You can change both the real gid and the effective gid at the same -time by using POSIX::setgid(). +time by using POSIX::setgid(). Changes to $( require a check to $! +to detect any possible errors after an attempted change. (Mnemonic: parentheses are used to I<group> things. The real gid is the group you I<left>, if you're running setgid.) @@ -841,6 +845,8 @@ list, say C< $) = "5 5" >. You can change both the effective gid and the real gid at the same time by using POSIX::setgid() (use only a single numeric argument). +Changes to $) require a check to $! to detect any possible errors +after an attempted change. (Mnemonic: parentheses are used to I<group> things. The effective gid is the group that's I<right> for you, if you're running setgid.) |