From: Nick Ing-Simmons Date: Fri, 21 Jun 2002 13:30:07 +0000 (+0000) Subject: Integrate mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0111df86b68202837d8ca044a27bbc00d7895fb1;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline p4raw-id: //depot/perlio@17342 --- diff --git a/Configure b/Configure index 4f522cf..128f003 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Jun 18 06:36:23 EET DST 2002 [metaconfig 3.0 PL70] +# Generated on Fri Jun 21 16:37:53 EET DST 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <" $ WS "#endif" $ WS "#include " diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod index 7b18fe5..286df40 100644 --- a/ext/POSIX/POSIX.pod +++ b/ext/POSIX/POSIX.pod @@ -385,7 +385,7 @@ integer value less than or equal to the numerical argument. This is identical to the C function C. - $r = modf($x, $y); + $r = fmod($x, $y); It returns the remainder C<$r = $x - $n*$y>, where C<$n = trunc($x/$y)>. The C<$r> has the same sign as C<$x> and magnitude (absolute value) diff --git a/hints/amigaos.sh b/hints/amigaos.sh index 52ba0bd..c5ba6ff 100644 --- a/hints/amigaos.sh +++ b/hints/amigaos.sh @@ -7,6 +7,7 @@ archname='m68k-amigaos' cc='gcc' firstmakefile='GNUmakefile' usenm='true' +d_fork='undef' # available but ENOSYS usemymalloc='n' useperlio='true' diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index 2c3247e..7e1663d 100644 --- a/lib/Getopt/Long.pm +++ b/lib/Getopt/Long.pm @@ -2,12 +2,12 @@ package Getopt::Long; -# RCS Status : $Id: GetoptLong.pm,v 2.57 2002-05-03 17:03:38+02 jv Exp $ +# RCS Status : $Id: GetoptLong.pm,v 2.58 2002-06-20 09:32:09+02 jv Exp $ # Author : Johan Vromans # Created On : Tue Sep 11 15:00:12 1990 # Last Modified By: Johan Vromans -# Last Modified On: Fri May 3 17:01:26 2002 -# Update Count : 1080 +# Last Modified On: Thu Jun 20 07:48:05 2002 +# Update Count : 1083 # Status : Released ################ Copyright ################ @@ -35,10 +35,10 @@ use 5.004; use strict; use vars qw($VERSION); -$VERSION = 2.31; +$VERSION = 2.32; # For testing versions only. use vars qw($VERSION_STRING); -$VERSION_STRING = "2.31"; +$VERSION_STRING = "2.32"; use Exporter; @@ -132,30 +132,9 @@ ConfigDefaults(); package Getopt::Long::Parser; -# Make Getopt::Long thread-safe for ithreads. -BEGIN { - use Config; - if( $] >= 5.008 && $Config{useithreads} ) { - require threads; - require threads::shared; - threads::shared->import; - share(\$Getopt::Long::error); - } - else { - *lock = sub { 0 }; - } -} - - -# NOTE: The object oriented routines use $error for thread locking. -my $_lock = sub { - lock ($Getopt::Long::error) if $] >= 5.005 -}; - # Store a copy of the default configuration. Since ConfigDefaults has # just been called, what we get from Configure is the default. my $default_config = do { - &$_lock; Getopt::Long::Configure () }; @@ -171,7 +150,6 @@ sub new { # Process config attributes. if ( defined $atts{config} ) { - &$_lock; my $save = Getopt::Long::Configure ($default_config, @{$atts{config}}); $self->{settings} = Getopt::Long::Configure ($save); delete ($atts{config}); @@ -192,8 +170,6 @@ sub new { sub configure { my ($self) = shift; - &$_lock; - # Restore settings, merge new settings in. my $save = Getopt::Long::Configure ($self->{settings}, @_); @@ -204,8 +180,6 @@ sub configure { sub getoptions { my ($self) = shift; - &$_lock; - # Restore config settings. my $save = Getopt::Long::Configure ($self->{settings}); @@ -275,7 +249,7 @@ sub GetOptions { $error = ''; print STDERR ("GetOpt::Long $Getopt::Long::VERSION (", - '$Revision: 2.57 $', ") ", + '$Revision: 2.58 $', ") ", "called from package \"$pkg\".", "\n ", "ARGV: (@ARGV)", @@ -924,7 +898,8 @@ sub FindOption ($$$$) { # Get key if this is a "name=value" pair for a hash option. my $key; if ($ctl->[CTL_DEST] == CTL_DEST_HASH && defined $arg) { - ($key, $arg) = ($arg =~ /^([^=]*)=(.*)$/s) ? ($1, $2) : ($arg, 1); + ($key, $arg) = ($arg =~ /^([^=]*)=(.*)$/s) ? ($1, $2) + : ($arg, defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] : 1); } #### Check if the argument is valid for this option #### @@ -1538,9 +1513,11 @@ Configuration options can be passed to the constructor: $p = new Getopt::Long::Parser config => [...configuration options...]; -For thread safety, each method call will acquire an exclusive lock to -the Getopt::Long module. So don't call these methods from a callback -routine! +=head2 Thread Safety + +Getopt::Long is thread safe when using ithreads as of Perl 5.8. It is +I thread safe when using the older (experimental and now +obsolete) threads implementation that was added to Perl 5.005. =head2 Documentation and help texts diff --git a/lib/Getopt/Long/CHANGES b/lib/Getopt/Long/CHANGES index 95489d5..5ed7d90 100644 --- a/lib/Getopt/Long/CHANGES +++ b/lib/Getopt/Long/CHANGES @@ -1,3 +1,12 @@ +Changes in version 2.32 +----------------------- + +* Fix a bug where the initial value for a optional numeric argument +was not used for value of a hash option. + +* Remove 5.005 thread safety code. Getopt::Long is completely thread +safe when using the 5.8 ithreads. + Changes in version 2.29 ----------------------- diff --git a/lib/warnings.pm b/lib/warnings.pm index 5cb6eff..8aa7748 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -294,17 +294,30 @@ sub Croaker croak @_ ; } -sub bits { - my $mask ; +sub bits +{ + # called from B::Deparse.pm + + push @_, 'all' unless @_; + + my $mask; my $catmask ; my $fatal = 0 ; - foreach my $word (@_) { - if ($word eq 'FATAL') { + my $no_fatal = 0 ; + + foreach my $word ( @_ ) { + if ($word eq 'FATAL') { $fatal = 1; + $no_fatal = 0; + } + elsif ($word eq 'NONFATAL') { + $fatal = 0; + $no_fatal = 1; } elsif ($catmask = $Bits{$word}) { $mask |= $catmask ; $mask |= $DeadBits{$word} if $fatal ; + $mask &= ~($DeadBits{$word}|$All) if $no_fatal ; } else { Croaker("Unknown warnings category '$word'")} @@ -313,24 +326,70 @@ sub bits { return $mask ; } -sub import { +sub import +{ shift; + + my $catmask ; + my $fatal = 0 ; + my $no_fatal = 0 ; + my $mask = ${^WARNING_BITS} ; + if (vec($mask, $Offsets{'all'}, 1)) { $mask |= $Bits{'all'} ; $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1); } - ${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ; + + push @_, 'all' unless @_; + + foreach my $word ( @_ ) { + if ($word eq 'FATAL') { + $fatal = 1; + $no_fatal = 0; + } + elsif ($word eq 'NONFATAL') { + $fatal = 0; + $no_fatal = 1; + } + elsif ($catmask = $Bits{$word}) { + $mask |= $catmask ; + $mask |= $DeadBits{$word} if $fatal ; + $mask &= ~($DeadBits{$word}|$All) if $no_fatal ; + } + else + { Croaker("Unknown warnings category '$word'")} + } + + ${^WARNING_BITS} = $mask ; } -sub unimport { +sub unimport +{ shift; + + my $catmask ; my $mask = ${^WARNING_BITS} ; + if (vec($mask, $Offsets{'all'}, 1)) { $mask |= $Bits{'all'} ; $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1); } - ${^WARNING_BITS} = $mask & ~ (bits('FATAL' => (@_ ? @_ : 'all')) | $All) ; + + push @_, 'all' unless @_; + + foreach my $word ( @_ ) { + if ($word eq 'FATAL') { + next; + } + elsif ($catmask = $Bits{$word}) { + $mask &= ~($catmask | $DeadBits{$word} | $All); + } + else + { Croaker("Unknown warnings category '$word'")} + } + + ${^WARNING_BITS} = $mask ; } sub __chk diff --git a/numeric.c b/numeric.c index 135e86a..b193e0c 100644 --- a/numeric.c +++ b/numeric.c @@ -727,10 +727,6 @@ S_mulexp10(NV value, I32 exponent) if (exponent == 0) return value; - else if (exponent < 0) { - negative = 1; - exponent = -exponent; - } /* On OpenVMS VAX we by default use the D_FLOAT double format, * and that format does not have *easy* capabilities [1] for @@ -743,11 +739,6 @@ S_mulexp10(NV value, I32 exponent) * * [1] Trying to establish a condition handler to trap floating point * exceptions is not a good idea. */ - /* UNICOS fp is similarly non-IEEE. */ -#if ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS)) && defined(NV_MAX_10_EXP) - if ((log10(value) + exponent) >= (NV_MAX_10_EXP)) - return negative ? 0.0 : NV_MAX; -#endif /* In UNICOS and in certain Cray models (such as T90) there is no * IEEE fp, and no way at all from C to catch fp overflows gracefully. @@ -756,12 +747,28 @@ S_mulexp10(NV value, I32 exponent) * disable *all* floating point interrupts, a little bit too large * a hammer. Therefore we need to catch potential overflows before * it's too late. */ -#if defined(_UNICOS) && defined(NV_MAX_10_EXP) - if (!negative && - (log10(value) + exponent) >= NV_MAX_10_EXP) - return NV_MAX; + +#if ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS)) && defined(NV_MAX_10_EXP) + STMT_START { + NV exp_v = log10(value); + if (exponent >= NV_MAX_10_EXP || exponent + exp_v >= NV_MAX_10_EXP) + return NV_MAX; + if (exponent < 0) { + if (-(exponent + exp_v) >= NV_MAX_10_EXP) + return 0.0; + while (-exponent >= NV_MAX_10_EXP) { + /* combination does not overflow, but 10^(-exponent) does */ + value /= 10; + ++exponent; + } + } + } STMT_END; #endif + if (exponent < 0) { + negative = 1; + exponent = -exponent; + } for (bit = 1; exponent; bit <<= 1) { if (exponent & bit) { exponent ^= bit; diff --git a/perl.h b/perl.h index be0706c..d2f10c8 100644 --- a/perl.h +++ b/perl.h @@ -25,7 +25,11 @@ #include #endif +#ifdef VOIDUSED +# undef VOIDUSED +#endif #define VOIDUSED 1 + #ifdef PERL_MICRO # include "uconfig.h" #else diff --git a/pod/perldelta.pod b/pod/perldelta.pod index b8751a3..b4c008a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1052,7 +1052,7 @@ C is a new pragma for controlling the behaviour of sort(). C gives persistence to Perl data structures by allowing the storage and retrieval of Perl data to and from files in a fast and compact binary format. Because in effect Storable does serialisation -of Perl data structues, with it you can also clone deep, hierarchical +of Perl data structures, with it you can also clone deep, hierarchical datastructures. Storable was originally created by Raphael Manfredi, but it is now maintained by Abhijit Menon-Sen. Storable has been enhanced to understand the two new hash features, Unicode keys and @@ -1265,7 +1265,7 @@ enjoy the fixes. The arguments of WriteMakefile() in Makefile.PL are now checked for sanity much more carefully than before. This may cause new -warnings when modules are being insalled. See L +warnings when modules are being installed. See L for more details. =item * @@ -1982,8 +1982,8 @@ See L. =item * -The DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near -osvers 4.5.2. +The DYNIX/ptx platform (also known as dynixptx) is supported at or +near osvers 4.5.2. =item * diff --git a/pod/perliol.pod b/pod/perliol.pod index da4abe7..604da50 100644 --- a/pod/perliol.pod +++ b/pod/perliol.pod @@ -328,9 +328,9 @@ to change during one "get".) Size_t fsize; -Size of the function table. This is compared against the value PerlIO code "knows" -as a compatibility check. Future versions I be able to tolerate layers -compiled against an old version of the headers. +Size of the function table. This is compared against the value PerlIO +code "knows" as a compatibility check. Future versions I be able +to tolerate layers compiled against an old version of the headers. =item name @@ -352,9 +352,9 @@ The size of the per-instance data structure, e.g.: sizeof(PerlIOAPR) -If this field is zero then C does not malloc anything and assumes -layer's Pushed function will do any required layer stack manipulation - used -to avoid malloc/free overhead for dummy layers. +If this field is zero then C does not malloc anything +and assumes layer's Pushed function will do any required layer stack +manipulation - used to avoid malloc/free overhead for dummy layers. If the field is non-zero it must be at least the size of C, C will allocate memory for the layer's data structures and link new layer onto the stream's stack. (If the layer's Pushed @@ -454,10 +454,10 @@ special C calls; the C<'#'> prefix means that this is C and that I and I should be passed to C; C<'r'> means Bead, C<'w'> means Brite and C<'a'> means Bppend. The C<'+'> suffix means that both reading and -writing/appending are permitted. The C<'b'> suffix means file should -be binary, and C<'t'> means it is text. (Binary/Text should be ignored -by almost all layers and binary IO done, with PerlIO. The C<:crlf> -layer should be pushed to handle the distinction.) +writing/appending are permitted. The C<'b'> suffix means file should +be binary, and C<'t'> means it is text. (Almost all layers should do +the IO in binary mode, and ignore the b/t bits. The C<:crlf> layer +should be pushed to handle the distinction.) If I is not C then this is a C. Perl itself does not use this (yet?) and semantics are a little vague. @@ -509,8 +509,8 @@ Returns the Unix/Posix numeric file descriptor for the handle. Normally C (which just asks next layer down) will suffice for this. -Returns -1 on error, which is considered to include the case where the layer cannot -provide such a file descriptor. +Returns -1 on error, which is considered to include the case where the +layer cannot provide such a file descriptor. =item Dup @@ -519,8 +519,9 @@ provide such a file descriptor. XXX: Needs more docs. -Used as part of the "clone" process when a thread is spawned (in which case -param will be non-NULL) and when a stream is being duplicated via '&' in the C. +Used as part of the "clone" process when a thread is spawned (in which +case param will be non-NULL) and when a stream is being duplicated via +'&' in the C. Similar to C, returns PerlIO* on success, C on failure. diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index 7b3ce3c..8ee7fc3 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -351,13 +351,20 @@ The scope where C is used has escalated the C warnings category into a fatal error, so the program terminates immediately it encounters the warning. -To explicitly disable a "FATAL" warning you just disable the warning it is -associated with. So, for example, to disable the "void" warning in the -example above, either of these will do the trick: +To explicitly turn off a "FATAL" warning you just disable the warning +it is associated with. So, for example, to disable the "void" warning +in the example above, either of these will do the trick: no warnings qw(void); no warnings FATAL => qw(void); +If you want to downgrade a warning that has been escalated into a fatal +error back to a normal warning, you can use the "NONFATAL" keyword. For +example, the code below will promote all warnings into fatal errors, +except for those in the "syntax" category. + + use warnings FATAL => 'all', NONFATAL => 'syntax'; + =head2 Reporting Warnings from a Module The C pragma provides a number of functions that are useful for diff --git a/pod/perlmodlib.pod b/pod/perlmodlib.pod index beb6a42..a7fdb8f 100644 --- a/pod/perlmodlib.pod +++ b/pod/perlmodlib.pod @@ -567,10 +567,6 @@ Portably perform operations on file names File::Spec for Mac OS (Classic) -=item File::Spec::NW5 - -Methods for NW5 file specs - =item File::Spec::OS2 Methods for OS/2 file specs diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 2ebc671..3890cfc 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -950,7 +950,7 @@ default. (To turn off that behaviour use C<:bytes> layer.) =item :win32 -On Win32 platfroms this I layer uses native "handle" IO +On Win32 platforms this I layer uses native "handle" IO rather than unix-like numeric file descriptor layer. Known to be buggy in this release. @@ -958,7 +958,7 @@ buggy in this release. On all platforms the default set of layers should give acceptable results. -For UNIX platfroms that will equivalent of "unix perlio" or "stdio". +For UNIX platforms that will equivalent of "unix perlio" or "stdio". Configure is setup to prefer "stdio" implementation if system's library provides for fast access to the buffer, otherwise it uses the "unix perlio" implementation. diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 52cdd6a..190e5f8 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -960,8 +960,8 @@ subname [condition], b postpone subname [condition], b load filename, b compile subname, B line, B *, a [line] command, A line, A *, w expr, W expr, W *, o, o booloption .., o anyoption? .., o option=value .., < ?, < [ command ], << command, > ?, > command, >> command, { ?, { [ command ], {{ -command, ! number, ! -number, ! pattern, !! cmd, @ file, H -number, q or -^D, R, |dbcmd, ||dbcmd, command, m expr, M, man [manpage] +command, ! number, ! -number, ! pattern, !! cmd, source file, H -number, q +or ^D, R, |dbcmd, ||dbcmd, command, m expr, M, man [manpage] =item Configurable Options @@ -4661,10 +4661,11 @@ PERLIO_F_TEMP, PERLIO_F_OPEN, PERLIO_F_FASTGETS =item Methods in Detail -name, size, kind, PERLIO_K_BUFFERED, PERLIO_K_CANCRLF, PERLIO_K_FASTGETS, -PERLIO_K_MULTIARG, PERLIO_K_RAW, Pushed, Popped, Open, Getarg, Fileno, Dup, -Read, Write, Seek, Tell, Close, Flush, Fill, Eof, Error, Clearerr, -Setlinebuf, Get_base, Get_bufsiz, Get_ptr, Get_cnt, Set_ptrcnt +size, name, size, kind, PERLIO_K_BUFFERED, PERLIO_K_RAW, PERLIO_K_CANCRLF, +PERLIO_K_FASTGETS, PERLIO_K_MULTIARG, Pushed, Popped, Open, Binmode, +Getarg, Fileno, Dup, Read, Write, Seek, Tell, Close, Flush, Fill, Eof, +Error, Clearerr, Setlinebuf, Get_base, Get_bufsiz, Get_ptr, Get_cnt, +Set_ptrcnt =item Core Layers @@ -5351,7 +5352,7 @@ I =item FreeBSD built with ithreads coredumps reading large directories -=item FreeBSD Failing locale Test 117 For ISO8859-15 Locales +=item FreeBSD Failing locale Test 117 For ISO 8859-15 Locales =item IRIX fails ext/List/Util/t/shuffle.t @@ -5389,6 +5390,8 @@ I =item Timing problems +=item Unicode in package/class and subroutine names does not work + =item UNICOS/mk =item UTS @@ -7441,7 +7444,7 @@ DJGPP, Pthreads =item Malloc in Irix -=item Building with threads +=item Building with threads in Irix =back @@ -9130,6 +9133,8 @@ utf8::valid(STRING) =back +=item BUGS + =item SEE ALSO =back @@ -12980,15 +12985,15 @@ INSTALLDIRS, INSTALLMAN1DIR, INSTALLMAN3DIR, INSTALLPRIVLIB, INSTALLSCRIPT, INSTALLSITEARCH, INSTALLSITEBIN, INSTALLSITELIB, INSTALLSITEMAN1DIR, INSTALLSITEMAN3DIR, INSTALLVENDORARCH, INSTALLVENDORBIN, INSTALLVENDORLIB, INSTALLVENDORMAN1DIR, INSTALLVENDORMAN3DIR, INST_ARCHLIB, INST_BIN, -INST_LIB, INST_MAN1DIR, INST_MAN3DIR, INST_SCRIPT, LDFROM, LIB, LIBPERL_A, -LIBS, LINKTYPE, MAKEAPERL, MAKEFILE, MAN1PODS, MAN3PODS, MAP_TARGET, -MYEXTLIB, NAME, NEEDS_LINKING, NOECHO, NORECURS, NO_VC, OBJECT, OPTIMIZE, -PERL, PERL_CORE, PERLMAINCC, PERL_ARCHLIB, PERL_LIB, PERL_MALLOC_OK, -PERLRUN, PERLRUNINST, PERL_SRC, PERM_RW, PERM_RWX, PL_FILES, PM, PMLIBDIRS, -PM_FILTER, POLLUTE, PPM_INSTALL_EXEC, PPM_INSTALL_SCRIPT, PREFIX, -PREREQ_FATAL, PREREQ_PM, PREREQ_PRINT, PRINT_PREREQ, SITEPREFIX, SKIP, -TYPEMAPS, VENDORPREFIX, VERBINST, VERSION, VERSION_FROM, XS, XSOPT, -XSPROTOARG, XS_VERSION +INST_LIB, INST_MAN1DIR, INST_MAN3DIR, INST_SCRIPT, LDDLFLAGS, LDFROM, LIB, +LIBPERL_A, LIBS, LINKTYPE, MAKEAPERL, MAKEFILE, MAN1PODS, MAN3PODS, +MAP_TARGET, MYEXTLIB, NAME, NEEDS_LINKING, NOECHO, NORECURS, NO_VC, OBJECT, +OPTIMIZE, PERL, PERL_CORE, PERLMAINCC, PERL_ARCHLIB, PERL_LIB, +PERL_MALLOC_OK, PERLRUN, PERLRUNINST, PERL_SRC, PERM_RW, PERM_RWX, +PL_FILES, PM, PMLIBDIRS, PM_FILTER, POLLUTE, PPM_INSTALL_EXEC, +PPM_INSTALL_SCRIPT, PREFIX, PREREQ_FATAL, PREREQ_PM, PREREQ_PRINT, +PRINT_PREREQ, SITEPREFIX, SKIP, TYPEMAPS, VENDORPREFIX, VERBINST, VERSION, +VERSION_FROM, XS, XSOPT, XSPROTOARG, XS_VERSION =item Additional lowercase attributes @@ -12997,6 +13002,10 @@ tool_autosplit =item Overriding MakeMaker Methods +=item The End Of Cargo Cult Programming + +C< ' '>> + =item Hintsfile support =item Distribution Support @@ -13421,36 +13430,6 @@ rel2abs =back -=head2 File::Spec::NW5 - methods for NW5 file specs - -=over 4 - -=item SYNOPSIS - -=item DESCRIPTION - -devnull - -=back - -tmpdir - -catfile - -canonpath - -splitpath - -splitdir - -catpath - -=over 4 - -=item SEE ALSO - -=back - canonpath splitpath @@ -13608,6 +13587,12 @@ catpath =over 4 +=item Note For File::Spec::Win32 Maintainers + +=back + +=over 4 + =item SEE ALSO =back @@ -13914,6 +13899,8 @@ B<$_>, B<$status>, B and B, B =item Object oriented interface +=item Thread Safety + =item Documentation and help texts =item Storing options in a hash @@ -16563,6 +16550,8 @@ unix, stdio, perlio, crlf, utf8, bytes, raw =over 4 +=item Alternatives to raw + =item Defaults and how to override them =back @@ -16592,12 +16581,13 @@ unix, stdio, perlio, crlf, utf8, bytes, raw =item DESCRIPTION $class->PUSHED([$mode[,$fh]]), $obj->POPPED([$fh]), -$class->OPEN($path,$mode[,$fh]), $class->FDOPEN($fd), -$class->SYSOPEN($path,$imode,$perm,$fh), $obj->FILENO($fh), -$obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh), $obj->FILL($fh), -$obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh), $obj->TELL($fh), -$obj->UNREAD($buffer,$fh), $obj->FLUSH($fh), $obj->SETLINEBUF($fh), -$obj->CLEARERR($fh), $obj->ERROR($fh), $obj->EOF($fh) +$class->OPEN($path,$mode[,$fh]), $obj->BINMODE([,$fh]), +$class->FDOPEN($fd), $class->SYSOPEN($path,$imode,$perm,$fh), +$obj->FILENO($fh), $obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh), +$obj->FILL($fh), $obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh), +$obj->TELL($fh), $obj->UNREAD($buffer,$fh), $obj->FLUSH($fh), +$obj->SETLINEBUF($fh), $obj->CLEARERR($fh), $obj->ERROR($fh), +$obj->EOF($fh) =over 4 @@ -18409,6 +18399,8 @@ B<_my_exit> =over 4 +=item THREADS + =item EXAMPLES =item SEE ALSO @@ -18671,6 +18663,8 @@ B B, B +When do I use SKIP vs. TODO? + =over 4 =item Comparison functions diff --git a/t/lib/warnings/7fatal b/t/lib/warnings/7fatal index 23c88d8..a3e70f8 100644 --- a/t/lib/warnings/7fatal +++ b/t/lib/warnings/7fatal @@ -356,3 +356,71 @@ my $b ; chop $b; print STDERR "The End.\n" ; EXPECT Use of uninitialized value in scalar chop at - line 7. +######## + +use warnings FATAL => 'syntax', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings FATAL => 'all', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings FATAL => 'all', NONFATAL => 'void' ; + +my $a ; chomp $a; +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 5. +Use of uninitialized value in scalar chomp at - line 4. +######## + +use warnings FATAL => 'void', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings NONFATAL => 'void', FATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +######## + +use warnings FATAL => 'all', NONFATAL => 'io'; +no warnings 'once'; + +open(F, " 'all', NONFATAL => 'io', FATAL => 'unopened' ; +no warnings 'once'; + +open(F, " (@_ ? @_ : 'all')) | $All) ; + + push @_, 'all' unless @_; + + foreach my $word ( @_ ) { + if ($word eq 'FATAL') { + next; + } + elsif ($catmask = $Bits{$word}) { + $mask &= ~($catmask | $DeadBits{$word} | $All); + } + else + { Croaker("Unknown warnings category '$word'")} + } + + ${^WARNING_BITS} = $mask ; } sub __chk diff --git a/win32/config_H.bc b/win32/config_H.bc index 3e4e80c..3d08698 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -1748,7 +1748,8 @@ /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. + * the GNU C library is being used. A better check is to use + * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ /*#define HAS_GNULIBC /**/ #if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) diff --git a/win32/config_H.gc b/win32/config_H.gc index a968ec6..b65a45d 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -1748,7 +1748,8 @@ /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. + * the GNU C library is being used. A better check is to use + * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ /*#define HAS_GNULIBC /**/ #if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) diff --git a/win32/config_H.vc b/win32/config_H.vc index bc81d7c..7d64e6b 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -1748,7 +1748,8 @@ /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. + * the GNU C library is being used. A better check is to use + * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ /*#define HAS_GNULIBC /**/ #if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) diff --git a/win32/config_H.vc64 b/win32/config_H.vc64 index ac25851..d2b6bc6 100644 --- a/win32/config_H.vc64 +++ b/win32/config_H.vc64 @@ -1748,7 +1748,8 @@ /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. + * the GNU C library is being used. A better check is to use + * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ /*#define HAS_GNULIBC /**/ #if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) diff --git a/wince/config_H.ce b/wince/config_H.ce index 364ea11..30e855a 100644 --- a/wince/config_H.ce +++ b/wince/config_H.ce @@ -1748,7 +1748,8 @@ /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. + * the GNU C library is being used. A better check is to use + * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ /*#define HAS_GNULIBC /**/ #if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)