# $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$$ <<EOF
/* 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)
# Package name : perl5
# Source directory : .
-# Configuration time: Fri Jun 14 18:00:35 EET DST 2002
+# Configuration time: Fri Jun 21 16:39:44 EET DST 2002
# Configured by : jhi
# Target system : osf1 alpha.hut.fi v4.0 878 alpha
ccversion='V5.6-082'
cf_by='jhi'
cf_email='yourname@yourhost.yourplace.com'
-cf_time='Fri Jun 14 18:00:35 EET DST 2002'
+cf_time='Fri Jun 21 16:39:44 EET DST 2002'
charsize='1'
chgrp=''
chmod='chmod'
path_sep=':'
perl5='perl'
perl=''
-perl_patchlevel='17237'
+perl_patchlevel='17302'
perladmin='yourname@yourhost.yourplace.com'
perllibs='-lm -lutil'
perlpath='/opt/perl/bin/perl'
vendorprefix=''
vendorprefixexp=''
version='5.8.0'
-version_patchlevel_string='version 8 subversion 0 patch 17237'
+version_patchlevel_string='version 8 subversion 0 patch 17302'
versiononly='undef'
vi=''
voidflags='15'
PERL_API_REVISION=5
PERL_API_VERSION=8
PERL_API_SUBVERSION=0
-PERL_PATCHLEVEL=17237
+PERL_PATCHLEVEL=17302
PERL_CONFIG_SH=true
# Variables propagated from previous config.sh file.
pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"'
/*
* Package name : perl5
* Source directory : .
- * Configuration time: Fri Jun 14 18:00:35 EET DST 2002
+ * Configuration time: Fri Jun 21 16:39:44 EET DST 2002
* Configured by : jhi
* Target system : osf1 alpha.hut.fi v4.0 878 alpha
*/
$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
$ THEN
$ echo ""
-$ echo "This version of Perl can be built with threads. While really nifty,"
-$ echo "they are a beta feature, and there is a speed penalty for perl"
-$ echo "programs if you build with threads *even if you do not use them*."
+$ echo "Perl can be built to take advantage of threads on some systems."
+$ echo "To do so, configure.com can be run with -""Dusethreads""."
+$ echo ""
+$ echo "Note that Perl built with threading support runs slightly slower"
+$ echo "and uses more memory than plain Perl. The current implementation"
+$ echo "is believed to be stable, but it is fairly new, and so should be"
+$ echo "treated with caution."
+$ echo ""
$ bool_dflt = "n"
$ if f$type(usethreads) .nes. ""
$ then
$ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
$ endif
-$ rp = "Build with threads? [''bool_dflt'] "
+$! Catch cases where user specified ithreads or 5005threads but
+$! forgot -Dusethreads
+$ if f$type(useithreads) .nes. ""
+$ then
+$ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
+$ endif
+$ if f$type(use5005threads) .nes. ""
+$ then
+$ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="y"
+$ endif
+$ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
+$ rp = "Build a threading Perl? [''bool_dflt'] "
$ GOSUB myread
$ if ans
$ THEN
$ use_threads="T"
-$ ! Shall we do the 5.005-stype threads, or IThreads?
-$ echo "As of 5.5.640, Perl has two different internal threading"
-$ echo "implementations, the 5.005 version (5005threads) and an"
-$ echo "interpreter-based version (ithreads) that has one"
-$ echo "interpreter per thread. Both are very experimental. This"
-$ echo "arrangement exists to help developers work out which one"
-$ echo "is better."
-$ echo ""
-$ echo "If you are a casual user, you probably do not want"
-$ echo "interpreter-threads at this time. There doesn't yet exist"
-$ echo "a way to create threads from within Perl in this model,"
-$ echo "i.e., ""use Thread;"" will NOT work."
+$ ! Shall we do the 5.005-type threads, or IThreads?
+$ echo "Since release 5.6, Perl has had two different threading implementations,"
+$ echo "the newer interpreter-based version (ithreads) with one interpreter per"
+$ echo "thread, and the older 5.005 version (5005threads)."
+$ echo "The 5005threads version is effectively unmaintained and will probably be"
+$ echo "removed in Perl 5.10, so there should be no need to build a Perl using it"
+$ echo "unless needed for backwards compatibility with some existing 5.005threads"
+$ echo "code."
$ echo ""
-$ bool_dflt = "n"
+$ bool_dflt = "y"
$ if f$type(useithreads) .nes. ""
$ then
-$ if useithreads .eqs. "define" then bool_dflt="y"
+$ if .not. useithreads .or. useithreads .eqs. "undef" then bool_dflt="n"
+$ endif
+$ if f$type(use5005threads) .nes. ""
+$ then
+$ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="n"
$ endif
-$ rp = "Build with Interpreter threads? [''bool_dflt'] "
+$ rp = "Use the newer intepreter-based ithreads? [''bool_dflt'] "
$ GOSUB myread
$ use_ithreads=ans
$ if use_ithreads
$!
$ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
+$ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
This is identical to the C function C<fmod()>.
- $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)
cc='gcc'
firstmakefile='GNUmakefile'
usenm='true'
+d_fork='undef' # available but ENOSYS
usemymalloc='n'
useperlio='true'
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 ################
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;
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 ()
};
# 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});
sub configure {
my ($self) = shift;
- &$_lock;
-
# Restore settings, merge new settings in.
my $save = Getopt::Long::Configure ($self->{settings}, @_);
sub getoptions {
my ($self) = shift;
- &$_lock;
-
# Restore config settings.
my $save = Getopt::Long::Configure ($self->{settings});
$error = '';
print STDERR ("GetOpt::Long $Getopt::Long::VERSION (",
- '$Revision: 2.57 $', ") ",
+ '$Revision: 2.58 $', ") ",
"called from package \"$pkg\".",
"\n ",
"ARGV: (@ARGV)",
# 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 ####
$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<not> thread safe when using the older (experimental and now
+obsolete) threads implementation that was added to Perl 5.005.
=head2 Documentation and help texts
+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
-----------------------
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'")}
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
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
*
* [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.
* 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;
#include <sys/fcntl.h>
#endif
+#ifdef VOIDUSED
+# undef VOIDUSED
+#endif
#define VOIDUSED 1
+
#ifdef PERL_MICRO
# include "uconfig.h"
#else
C<Storable> 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
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<ExtUtils::MakeMaker>
+warnings when modules are being installed. See L<ExtUtils::MakeMaker>
for more details.
=item *
=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 *
Size_t fsize;
-Size of the function table. This is compared against the value PerlIO code "knows"
-as a compatibility check. Future versions I<may> 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<may> be able
+to tolerate layers compiled against an old version of the headers.
=item name
sizeof(PerlIOAPR)
-If this field is zero then C<PerlIO_pushed> 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<PerlIO_pushed> 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<PerlIOl>,
C<PerlIO_pushed> will allocate memory for the layer's data structures
and link new layer onto the stream's stack. (If the layer's Pushed
C<sysopen> and that I<imode> and I<perm> should be passed to
C<PerlLIO_open3>; C<'r'> means B<r>ead, C<'w'> means B<w>rite and
C<'a'> means B<a>ppend. 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<old> is not C<NULL> then this is a C<PerlIO_reopen>. Perl itself
does not use this (yet?) and semantics are a little vague.
C<PerlIOBase_fileno()> (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
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<open>.
+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<open>.
Similar to C<Open>, returns PerlIO* on success, C<NULL> on failure.
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<warnings> pragma provides a number of functions that are useful for
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
=item :win32
-On Win32 platfroms this I<experimental> layer uses native "handle" IO
+On Win32 platforms this I<experimental> layer uses native "handle" IO
rather than unix-like numeric file descriptor layer. Known to be
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.
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
=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
=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
=item Timing problems
+=item Unicode in package/class and subroutine names does not work
+
=item UNICOS/mk
=item UTS
=item Malloc in Irix
-=item Building with threads
+=item Building with threads in Irix
=back
=back
+=item BUGS
+
=item SEE ALSO
=back
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
=item Overriding MakeMaker Methods
+=item The End Of Cargo Cult Programming
+
+C<<MAN3PODS => ' '>>
+
=item Hintsfile support
=item Distribution Support
=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
=over 4
+=item Note For File::Spec::Win32 Maintainers
+
+=back
+
+=over 4
+
=item SEE ALSO
=back
=item Object oriented interface
+=item Thread Safety
+
=item Documentation and help texts
=item Storing options in a hash
=over 4
+=item Alternatives to raw
+
=item Defaults and how to override them
=back
=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
=over 4
+=item THREADS
+
=item EXAMPLES
=item SEE ALSO
B<TODO: BLOCK>, B<todo_skip>
+When do I use SKIP vs. TODO?
+
=over 4
=item Comparison functions
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, "<true\ncd");
+close "fred" ;
+print STDERR "The End.\n" ;
+EXPECT
+Unsuccessful open on filename containing newline at - line 5.
+close() on unopened filehandle fred at - line 6.
+The End.
+########
+
+use warnings FATAL => 'all', NONFATAL => 'io', FATAL => 'unopened' ;
+no warnings 'once';
+
+open(F, "<true\ncd");
+close "fred" ;
+print STDERR "The End.\n" ;
+EXPECT
+Unsuccessful open on filename containing newline at - line 5.
+close() on unopened filehandle fred at - line 6.
/* 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)
/* 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)
/* 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)
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'")}
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
/* 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)
/* 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)
/* 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)
/* 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)
/* 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)