diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 02:44:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 02:44:33 +0000 |
commit | e23207ad2917dd19288f703418eb2fadce16894b (patch) | |
tree | 35a06cd7f1a8f1cb1f3a1f89c471b5f765151f72 /gnu/usr.bin/perl | |
parent | 3349091e2048a52ce7723c41e37b65cd735d2caf (diff) |
perl 5.8.2 from CPAN
Diffstat (limited to 'gnu/usr.bin/perl')
-rw-r--r-- | gnu/usr.bin/perl/ext/Socket/t/Socket.t | 47 | ||||
-rw-r--r-- | gnu/usr.bin/perl/ext/Socket/t/socketpair.t | 17 | ||||
-rw-r--r-- | gnu/usr.bin/perl/pod.lst | 96 | ||||
-rw-r--r-- | gnu/usr.bin/perl/pod/perl573delta.pod | 6 | ||||
-rw-r--r-- | gnu/usr.bin/perl/pod/perldoc.pod | 66 | ||||
-rw-r--r-- | gnu/usr.bin/perl/regen_lib.pl | 47 |
6 files changed, 64 insertions, 215 deletions
diff --git a/gnu/usr.bin/perl/ext/Socket/t/Socket.t b/gnu/usr.bin/perl/ext/Socket/t/Socket.t index 9a6d31f5c90..dba6cf3e16b 100644 --- a/gnu/usr.bin/perl/ext/Socket/t/Socket.t +++ b/gnu/usr.bin/perl/ext/Socket/t/Socket.t @@ -1,6 +1,8 @@ #!./perl BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bSocket\b/ && !(($^O eq 'VMS') && $Config{d_socket})) { @@ -10,9 +12,9 @@ BEGIN { $has_alarm = $Config{d_alarm}; } -use Socket qw(:all); +use Socket; -print "1..21\n"; +print "1..16\n"; $has_echo = $^O ne 'MSWin32'; $alarmed = 0; @@ -20,7 +22,7 @@ sub arm { $alarmed = 0; alarm(shift) if $has_alarm } sub alarmed { $alarmed = 1 } $SIG{ALRM} = 'alarmed' if $has_alarm; -if (socket(T, PF_INET, SOCK_STREAM, IPPROTO_TCP)) { +if (socket(T,PF_INET,SOCK_STREAM,6)) { print "ok 1\n"; arm(5); @@ -68,7 +70,7 @@ else { print "not ok 1\n"; } -if( socket(S, PF_INET,SOCK_STREAM, IPPROTO_TCP) ){ +if( socket(S,PF_INET,SOCK_STREAM,6) ){ print "ok 4\n"; arm(5); @@ -147,40 +149,3 @@ if (sockaddr_family(pack_sockaddr_in(100,inet_aton("10.250.230.10"))) == AF_INET eval { sockaddr_family("") }; print (($@ =~ /^Bad arg length for Socket::sockaddr_family, length is 0, should be at least \d+/) ? "ok 16\n" : "not ok 16\n"); - -if ($^O eq 'linux') { - # see if we can handle abstract sockets - my $test_abstract_socket = chr(0) . '/org/perl/hello'. chr(0) . 'world'; - my $addr = sockaddr_un ($test_abstract_socket); - my ($path) = sockaddr_un ($addr); - if ($test_abstract_socket eq $path) { - print "ok 17\n"; - } - else { - $path =~ s/\0/\\0/g; - print "# got <$path>\n"; - print "not ok 17\n"; - } - - # see if we calculate the address structure length correctly - if (length ($test_abstract_socket) + 2 == length $addr) { - print "ok 18\n"; - } else { - print "# got ".(length $addr)."\n"; - print "not ok 18\n"; - } - -} else { - # doesn't have abstract socket support - print "ok 17 - skipped on this platform\n"; - print "ok 18 - skipped on this platform\n"; -} - -if($Config{d_inetntop} && $Config{d_inetaton}){ - print ((inet_ntop(AF_INET, inet_pton(AF_INET, "10.20.30.40")) eq "10.20.30.40") ? "ok 19\n" : "not ok 19\n"); - print ((inet_ntop(AF_INET, inet_aton("10.20.30.40")) eq "10.20.30.40") ? "ok 20\n" : "not ok 20\n"); - print (lc(inet_ntop(AF_INET6, inet_pton(AF_INET6, "2001:503:BA3E::2:30")) eq "2001:503:ba3e::2:30") ? "ok 21\n" : "not ok 21\n"); -} else { - # no IPv6 - print "ok $_ - skipped on this platform\n" for 19 .. 21; -} diff --git a/gnu/usr.bin/perl/ext/Socket/t/socketpair.t b/gnu/usr.bin/perl/ext/Socket/t/socketpair.t index 997628c3bd7..95d424a5c55 100644 --- a/gnu/usr.bin/perl/ext/Socket/t/socketpair.t +++ b/gnu/usr.bin/perl/ext/Socket/t/socketpair.t @@ -5,23 +5,26 @@ my $can_fork; my $has_perlio; BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; require Config; import Config; - $can_fork = $Config{'d_fork'} || $Config{'d_pseudofork'}; + $can_fork = $Config{'d_fork'} + || ($^O eq 'MSWin32' && $Config{useithreads} + && $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS\b/); + if ($^O eq "hpux" or $Config{'extensions'} !~ /\bSocket\b/ && !(($^O eq 'VMS') && $Config{d_socket})) { print "1..0\n"; exit 0; - } -} - -{ - # This was in the BEGIN block, but since Test::More 0.47 added support to - # detect forking, we don't need to fork before Test::More initialises. + } # Too many things in this test will hang forever if something is wrong, # so we need a self destruct timer. And IO can hang despite an alarm. + # This is convoluted, but we must fork before Test::More, else child's + # Test::More thinks that it ran no tests, and prints a message to that + # effect if( $can_fork) { my $parent = $$; $child = fork; diff --git a/gnu/usr.bin/perl/pod.lst b/gnu/usr.bin/perl/pod.lst index 83a0d11ec75..46112a47b46 100644 --- a/gnu/usr.bin/perl/pod.lst +++ b/gnu/usr.bin/perl/pod.lst @@ -1,19 +1,18 @@ -# h - Header -# o - Omit from toc +# O - Header, omit from toc +# o - Item, omit from toc +# I - Header, include in toc # r - top level READMEs to be copied/symlinked -# g - other autogenerated pods -# a - for auxiliary documentation +# a - Item, for auxiliary documentation +# a - Header for auxiliary documentation # number - indent by -# D - this version's perldelta -# d - copied to this name -h Overview +I Overview perl Perl overview (this section) perlintro Perl introduction for beginners -go perltoc Perl documentation table of contents + perltoc Perl documentation table of contents -h Tutorials +I Tutorials perlreftut Perl references short introduction perldsc Perl data structures intro @@ -27,8 +26,6 @@ h Tutorials perltooc Perl OO tutorial, part 2 perlbot Perl OO tricks and examples - perlperf Perl Performance and Optimization Techniques - perlstyle Perl style guide perlcheat Perl cheat sheet @@ -46,7 +43,7 @@ h Tutorials 2 perlfaq8 System Interaction 2 perlfaq9 Networking -h Reference Manual +I Reference Manual perlsyn Perl syntax perldata Perl data structures @@ -63,8 +60,6 @@ h Reference Manual perldebug Perl debugging perlvar Perl predefined variables perlre Perl regular expressions, the rest of the story - perlrebackslash Perl regular expression backslash sequences - perlrecharclass Perl regular expression character classes perlreref Perl regular expressions quick reference perlref Perl references, the rest of the story perlform Perl formats @@ -77,24 +72,21 @@ h Reference Manual perlnumber Perl number semantics perlthrtut Perl threads tutorial +2 perlothrtut Old Perl threads tutorial perlport Perl portability guide perllocale Perl locale support perluniintro Perl Unicode introduction perlunicode Perl Unicode support - perlunifaq Perl Unicode FAQ -g perluniprops Index of Unicode Version 5.2.0 properties in Perl - perlunitut Perl Unicode tutorial perlebcdic Considerations for running Perl on EBCDIC platforms perlsec Perl security perlmod Perl modules: how they work -g perlmodlib Perl modules: how to write and use + perlmodlib Perl modules: how to write and use perlmodstyle Perl modules: how to write modules with style perlmodinstall Perl modules: how to install from CPAN perlnewmod Perl modules: preparing a new module for distribution - perlpragma Perl modules: writing a user pragma perlutil utilities packaged with the Perl distribution @@ -102,9 +94,7 @@ g perlmodlib Perl modules: how to write and use perlfilter Perl source filters - perlglossary Perl Glossary - -h Internals and C Language Interface +I Internals and C Language Interface perlembed Perl ways to embed perl in your C or C++ application perldebguts Perl debugging guts and tips @@ -113,54 +103,23 @@ h Internals and C Language Interface perlclib Internal replacements for standard C library functions perlguts Perl internal functions for those doing extensions perlcall Perl calling conventions from C - perlmroapi Perl method resolution plugin interface - perlreapi Perl regular expression plugin interface - perlreguts Perl regular expression engine internals -g perlapi Perl API listing (autogenerated) -g perlintern Perl internal functions (autogenerated) + perlapi Perl API listing (autogenerated) + perlintern Perl internal functions (autogenerated) perliol C API for Perl's implementation of IO in Layers perlapio Perl internal IO abstraction interface perlhack Perl hackers guide - perlpolicy Perl development policies - perlrepository Perl source repository -h Miscellaneous +I Miscellaneous perlbook Perl book information - perlcommunity Perl community information perltodo Perl things to do perldoc Look up Perl documentation in Pod format perlhist Perl history records -d perldelta Perl changes since previous version -D perl5122delta Perl changes in version 5.12.2 - perl5121delta Perl changes in version 5.12.1 - perl5120delta Perl changes in version 5.12.0 - perl5115delta Perl changes in version 5.11.5 - perl5114delta Perl changes in version 5.11.4 - perl5113delta Perl changes in version 5.11.3 - perl5112delta Perl changes in version 5.11.2 - perl5111delta Perl changes in version 5.11.1 - perl5110delta Perl changes in version 5.11.0 - perl5101delta Perl changes in version 5.10.1 - perl5100delta Perl changes in version 5.10.0 - perl595delta Perl changes in version 5.9.5 - perl594delta Perl changes in version 5.9.4 - perl593delta Perl changes in version 5.9.3 - perl592delta Perl changes in version 5.9.2 - perl591delta Perl changes in version 5.9.1 - perl590delta Perl changes in version 5.9.0 - perl589delta Perl changes in version 5.8.9 - perl588delta Perl changes in version 5.8.8 - perl587delta Perl changes in version 5.8.7 - perl586delta Perl changes in version 5.8.6 - 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 + perldelta Perl changes since previous version perl581delta Perl changes in version 5.8.1 perl58delta Perl changes in version 5.8.0 perl573delta Perl changes in version 5.7.3 @@ -175,14 +134,14 @@ D perl5122delta Perl changes in version 5.12.2 perlartistic Perl Artistic License perlgpl GNU General Public License -ho Language-Specific +O Language-Specific -ro perlcn Perl for Simplified Chinese (in EUC-CN) -ro perljp Perl for Japanese (in EUC-JP) -ro perlko Perl for Korean (in EUC-KR) -ro perltw Perl for Traditional Chinese (in Big5) +or perlcn Perl for Simplified Chinese (in EUC-CN) +or perljp Perl for Japanese (in EUC-JP) +or perlko Perl for Korean (in EUC-KR) +or perltw Perl for Traditional Chinese (in Big5) -h Platform-Specific +I Platform-Specific r perlaix Perl notes for AIX r perlamiga Perl notes for AmigaOS @@ -195,32 +154,29 @@ r perldgux Perl notes for DG/UX r perldos Perl notes for DOS r perlepoc Perl notes for EPOC r perlfreebsd Perl notes for FreeBSD -r perlhaiku Perl notes for Haiku r perlhpux Perl notes for HP-UX r perlhurd Perl notes for Hurd r perlirix Perl notes for Irix -r perllinux Perl notes for Linux +r perlmachten Perl notes for Power MachTen r perlmacos Perl notes for Mac OS (Classic) r perlmacosx Perl notes for Mac OS X +r perlmint Perl notes for MiNT r perlmpeix Perl notes for MPE/iX r perlnetware Perl notes for NetWare -r perlopenbsd Perl notes for OpenBSD r perlos2 Perl notes for OS/2 r perlos390 Perl notes for OS/390 r perlos400 Perl notes for OS/400 r perlplan9 Perl notes for Plan 9 r perlqnx Perl notes for QNX -r perlriscos Perl notes for RISC OS r perlsolaris Perl notes for Solaris -r perlsymbian Perl notes for Symbian r perltru64 Perl notes for Tru64 r perluts Perl notes for UTS r perlvmesa Perl notes for VM/ESA - perlvms Perl notes for VMS +r perlvms Perl notes for VMS r perlvos Perl notes for Stratus VOS r perlwin32 Perl notes for Windows -aoh Auxiliary Documentation +AO Auxiliary Documentation ao a2p ao c2ph diff --git a/gnu/usr.bin/perl/pod/perl573delta.pod b/gnu/usr.bin/perl/pod/perl573delta.pod index 00e73fed8bf..1121eb5ca92 100644 --- a/gnu/usr.bin/perl/pod/perl573delta.pod +++ b/gnu/usr.bin/perl/pod/perl573delta.pod @@ -20,7 +20,7 @@ The numbers refer to the Perl repository change numbers; see L<Changes58> (or L<Changes> in Perl 5.8.1). In addition to these changes, lots of work took place in integrating threads, PerlIO, and Unicode; general code cleanup; and last but not least porting to -non-Unix lands such as Win32, VMS, Cygwin, DJGPP, VOS, MacOS Classic, +non-UNIX lands such as Win32, VMS, Cygwin, DJGPP, VOS, MacOS Classic, and EBCDIC. =over 4 @@ -103,7 +103,7 @@ document that use utf8 is not the right way most of the time =item 11656 -allow building perl with -DUSE_UTF8_SCRIPTS which makes UTF-8 +allow builing perl with -DUSE_UTF8_SCRIPTS which makes UTF-8 the default script encoding (not the default since that would break all scripts having legacy eight-bit data in them) @@ -149,7 +149,7 @@ unpack("Z*Z*", pack("Z*Z*", ..)) was broken =item 12243 -Devel::Peek: display UTF-8 SVs also as \x{...} +Devel::Peek: display UTF-8 SVs also also as \x{...} =item 12288 diff --git a/gnu/usr.bin/perl/pod/perldoc.pod b/gnu/usr.bin/perl/pod/perldoc.pod index 883a6184603..123dea10dfe 100644 --- a/gnu/usr.bin/perl/pod/perldoc.pod +++ b/gnu/usr.bin/perl/pod/perldoc.pod @@ -5,7 +5,7 @@ perldoc - Look up Perl documentation in Pod format. =head1 SYNOPSIS -B<perldoc> [B<-h>] [B<-D>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>] +B<perldoc> [B<-h>] [B<-v>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>] [B<-i>] [B<-V>] [B<-T>] [B<-r>] [B<-dI<destination_file>>] [B<-oI<formatname>>] @@ -13,19 +13,12 @@ B<perldoc> [B<-h>] [B<-D>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>] [B<-wI<formatteroption:value>>] [B<-n>I<nroff-replacement>] [B<-X>] -[B<-L> I<language_code>] PageName|ModuleName|ProgramName B<perldoc> B<-f> BuiltinFunction -B<perldoc> B<-L> it B<-f> BuiltinFunction - B<perldoc> B<-q> FAQ Keyword -B<perldoc> B<-L> fr B<-q> FAQ Keyword - -B<perldoc> B<-v> PerlVariable - See below for more description of the switches. =head1 DESCRIPTION @@ -50,9 +43,9 @@ documentation, see the L<perltoc> page. Prints out a brief B<h>elp message. -=item B<-D> +=item B<-v> -B<D>escribes search for the item in B<d>etail. +Describes search for the item in detail (B<v>erbosely). =item B<-t> @@ -87,29 +80,11 @@ Example: perldoc -f sprintf - =item B<-q> I<perlfaq-search-regexp> The B<-q> option takes a regular expression as an argument. It will search the B<q>uestion headings in perlfaq[1-9] and print the entries matching -the regular expression. - -Example: - - perldoc -q shuffle - - -=item B<-v> I<perlvar> - -The B<-v> option followed by the name of a Perl predefined variable will -extract the documentation of this variable from L<perlvar>. - -Examples: - - perldoc -v '$"' - perldoc -v @+ - perldoc -v DATA - +the regular expression. Example: C<perldoc -q shuffle> =item B<-T> @@ -140,7 +115,7 @@ Pod::LATEX. =item B<-M> I<module-name> This specifies the module that you want to try using for formatting the -pod. The class must at least provide a C<parse_from_file> method. +pod. The class must must at least provide a C<parse_from_file> method. For example: C<perldoc -MPod::Perldoc::ToChecker>. You can specify several classes to try by joining them with commas @@ -165,31 +140,17 @@ might be more (or less) convenient, depending on what shell you use. =item B<-X> -Use an index if it is present. The B<-X> option looks for an entry +Use an index if it is present -- the B<-X> option looks for an entry whose basename matches the name given on the command line in the file C<$Config{archlib}/pod.idx>. The F<pod.idx> file should contain fully qualified filenames, one per line. -=item B<-L> I<language_code> - -This allows to specify the I<language code> for desired language translation. -If C<POD2::E<lt>language_codeE<gt>> package doesn't exist (or isn't installed -in your system), the switch will be ignored. -All available translation packages should be found under the C<POD2::> -namespace. See L<POD2::IT> (or L<POD2::FR>) in order to see how to create and -integrate new localized C<POD2::*> pod documentation packages in -L<Pod::Perldoc>. - =item B<PageName|ModuleName|ProgramName> The item you want to look up. Nested modules (such as C<File::Basename>) are specified either as C<File::Basename> or C<File/Basename>. You may also give a descriptive name of a page, such as C<perlfunc>. -For simple names like 'foo', when the normal search fails to find -a matching page, a search with the "perl" prefix is tried as well. -So "perldoc intro" is enough to find/render "perlintro.pod". - =item B<-n> I<some-formatter> Specify replacement for nroff @@ -243,25 +204,14 @@ plain text or unformatted pod.) One useful value for C<PERLDOC_PAGER> is C<less -+C -E>. Having PERLDOCDEBUG set to a positive integer will make perldoc emit -even more descriptive output than the C<-v> switch does; the higher the +even more descriptive output than the C<-v> switch does -- the higher the number, the more it emits. - -=head1 CHANGES - -Up to 3.14_05, the switch B<-v> was used to produce verbose -messages of B<perldoc> operation, which is now enabled by B<-D>. - -=head1 SEE ALSO - -L<perlpod>, L<Pod::Perldoc> - =head1 AUTHOR -Current maintainer: Adriano R. Ferreira <ferreira@cpan.org> +Current maintainer: Sean M. Burke, <sburke@cpan.org> Past contributors are: -Sean M. Burke <sburke@cpan.org>, Kenneth Albanowski <kjahds@kjahds.com>, Andy Dougherty <doughera@lafcol.lafayette.edu>, and many others. diff --git a/gnu/usr.bin/perl/regen_lib.pl b/gnu/usr.bin/perl/regen_lib.pl index 7d396c04472..1c830a2cdcf 100644 --- a/gnu/usr.bin/perl/regen_lib.pl +++ b/gnu/usr.bin/perl/regen_lib.pl @@ -1,21 +1,20 @@ #!/usr/bin/perl -w use strict; -use vars qw($Needs_Write $Verbose @Changed); -use File::Compare; -use Symbol; +use vars qw($Is_W32 $Is_OS2 $Is_Cygwin $Is_NetWare $Needs_Write); +use Config; # Remember, this is running using an existing perl # Common functions needed by the regen scripts -$Needs_Write = $^O eq 'cygwin' || $^O eq 'os2' || $^O eq 'MSWin32'; - -$Verbose = 0; -@ARGV = grep { not($_ eq '-q' and $Verbose = -1) } - grep { not($_ eq '-v' and $Verbose = 1) } @ARGV; - -END { - print STDOUT "Changed: @Changed\n" if @Changed; +$Is_W32 = $^O eq 'MSWin32'; +$Is_OS2 = $^O eq 'os2'; +$Is_Cygwin = $^O eq 'cygwin'; +$Is_NetWare = $Config{osname} eq 'NetWare'; +if ($Is_NetWare) { + $Is_W32 = 0; } +$Needs_Write = $Is_OS2 || $Is_W32 || $Is_Cygwin || $Is_NetWare; + sub safer_unlink { my @names = @_; my $cnt = 0; @@ -39,32 +38,8 @@ sub safer_rename_silent { rename $from, $to; } -sub rename_if_different { +sub safer_rename { my ($from, $to) = @_; - - if (compare($from, $to) == 0) { - warn "no changes between '$from' & '$to'\n" if $Verbose > 0; - safer_unlink($from); - return; - } - warn "changed '$from' to '$to'\n" if $Verbose > 0; - push @Changed, $to unless $Verbose < 0; safer_rename_silent($from, $to) or die "renaming $from to $to: $!"; } - -# Saf*er*, but not totally safe. And assumes always open for output. -sub safer_open { - my $name = shift; - my $fh = gensym; - open $fh, ">$name" or die "Can't create $name: $!"; - *{$fh}->{SCALAR} = $name; - binmode $fh; - $fh; -} - -sub safer_close { - my $fh = shift; - close $fh or die 'Error closing ' . *{$fh}->{SCALAR} . ": $!"; -} - 1; |