Mass Deface
.
=head2 Limitations on B<-M>, B<-m>, and B<-T> options
The C<-M> and C<-m> options are no longer allowed on the C<#!> line of
a script. If a script needs a module, it should invoke it with the
C was
(mis)interpreted as C. This bug has been fixed in 5.004.
=item nested C closures work now
Prior to the 5.004 release, nested anonymous functions didn't work
right. They do now.
=item formats work right on changing lexicals
Just like anonymous functions that contain lexical variables
that change (like a lexical index variable for a C loop),
formats now work properly. For example, this silently failed
before (printed only zeros), but is fine now:
my $i;
foreach $i ( 1 .. 10 ) {
write;
}
format =
my i is @#
$i
.
However, it still fails (without a warning) if the foreach is within a
subroutine:
my $i;
sub foo {
foreach $i ( 1 .. 10 ) {
write;
}
}
foo;
format =
my i is @#
$i
.
=back
=head2 New builtin methods
The C package automatically contains the following methods that
are inherited by all other classes:
=over 4
=item isa(CLASS)
C returns I if its object is blessed into a subclass of C
C is also exportable and can be called as a sub with two arguments. This
allows the ability to check what a reference points to. Example:
use UNIVERSAL qw(isa);
if(isa($ref, 'ARRAY')) {
...
}
=item can(METHOD)
C checks to see if its object has a method called C,
if it does then a reference to the sub is returned; if it does not then
I is returned.
=item VERSION( [NEED] )
C returns the version number of the class (package). If the
NEED argument is given then it will check that the current version (as
defined by the $VERSION variable in the given package) not less than
NEED; it will die if this is not the case. This method is normally
called as a class method. This method is called automatically by the
C form of C.
use A 1.2 qw(some imported subs);
# implies:
A->VERSION(1.2);
=back
B C directly uses Perl's internal code for method lookup, and
C uses a very similar method and caching strategy. This may cause
strange effects if the Perl code dynamically changes @ISA in any package.
You may add other methods to the UNIVERSAL class via Perl or XS code.
You do not need to C in order to make these methods
available to your program. This is necessary only if you wish to
have C available as a plain subroutine in the current package.
=head2 TIEHANDLE now supported
See L for other kinds of tie()s.
=over 4
=item TIEHANDLE classname, LIST
This is the constructor for the class. That means it is expected to
return an object of some sort. The reference can be used to
hold some internal information.
sub TIEHANDLE {
print "\n";
my $i;
return bless \$i, shift;
}
=item PRINT this, LIST
This method will be triggered every time the tied handle is printed to.
Beyond its self reference it also expects the list that was passed to
the print function.
sub PRINT {
$r = shift;
$$r++;
return print join( $, => map {uc} @_), $\;
}
=item PRINTF this, LIST
This method will be triggered every time the tied handle is printed to
with the C function.
Beyond its self reference it also expects the format and list that was
passed to the printf function.
sub PRINTF {
shift;
my $fmt = shift;
print sprintf($fmt, @_)."\n";
}
=item READ this LIST
This method will be called when the handle is read from via the C
or C functions.
sub READ {
$r = shift;
my($buf,$len,$offset) = @_;
print "READ called, \$buf=$buf, \$len=$len, \$offset=$offset";
}
=item READLINE this
This method will be called when the handle is read from. The method
should return undef when there is no more data.
sub READLINE {
$r = shift;
return "PRINT called $$r times\n"
}
=item GETC this
This method will be called when the C function is called.
sub GETC { print "Don't GETC, Get Perl"; return "a"; }
=item DESTROY this
As with the other types of ties, this method will be called when the
tied handle is about to be destroyed. This is useful for debugging and
possibly for cleaning up.
sub DESTROY {
print "\n";
}
=back
=head2 Malloc enhancements
If perl is compiled with the malloc included with the perl distribution
(that is, if C is 'define') then you can print
memory statistics at runtime by running Perl thusly:
env PERL_DEBUG_MSTATS=2 perl your_script_here
The value of 2 means to print statistics after compilation and on
exit; with a value of 1, the statistics are printed only on exit.
(If you want the statistics at an arbitrary time, you'll need to
install the optional module Devel::Peek.)
Three new compilation flags are recognized by malloc.c. (They have no
effect if perl is compiled with system malloc().)
=over 4
=item -DPERL_EMERGENCY_SBRK
If this macro is defined, running out of memory need not be a fatal
error: a memory pool can allocated by assigning to the special
variable C<$^M>. See L<"$^M">.
=item -DPACK_MALLOC
Perl memory allocation is by bucket with sizes close to powers of two.
Because of these malloc overhead may be big, especially for data of
size exactly a power of two. If C is defined, perl uses
a slightly different algorithm for small allocations (up to 64 bytes
long), which makes it possible to have overhead down to 1 byte for
allocations which are powers of two (and appear quite often).
Expected memory savings (with 8-byte alignment in C) is
about 20% for typical Perl usage. Expected slowdown due to additional
malloc overhead is in fractions of a percent (hard to measure, because
of the effect of saved memory on speed).
=item -DTWO_POT_OPTIMIZE
Similarly to C, this macro improves allocations of data
with size close to a power of two; but this works for big allocations
(starting with 16K by default). Such allocations are typical for big
hashes and special-purpose scripts, especially image processing.
On recent systems, the fact that perl requires 2M from system for 1M
allocation will not affect speed of execution, since the tail of such
a chunk is not going to be touched (and thus will not require real
memory). However, it may result in a premature out-of-memory error.
So if you will be manipulating very large blocks with sizes close to
powers of two, it would be wise to define this macro.
Expected saving of memory is 0-100% (100% in applications which
require most memory in such 2**n chunks); expected slowdown is
negligible.
=back
=head2 Miscellaneous efficiency enhancements
Functions that have an empty prototype and that do nothing but return
a fixed value are now inlined (e.g. C).
Each unique hash key is only allocated once, no matter how many hashes
have an entry with that key. So even if you have 100 copies of the
same hash, the hash keys never have to be reallocated.
=head1 Support for More Operating Systems
Support for the following operating systems is new in Perl 5.004.
=head2 Win32
Perl 5.004 now includes support for building a "native" perl under
Windows NT, using the Microsoft Visual C++ compiler (versions 2.0
and above) or the Borland C++ compiler (versions 5.02 and above).
The resulting perl can be used under Windows 95 (if it
is installed in the same directory locations as it got installed
in Windows NT). This port includes support for perl extension
building tools like L and L, so that many extensions
available on the Comprehensive Perl Archive Network (CPAN) can now be
readily built under Windows NT. See http://www.perl.com/ for more
information on CPAN and F in the perl distribution for more
details on how to get started with building this port.
There is also support for building perl under the Cygwin32 environment.
Cygwin32 is a set of GNU tools that make it possible to compile and run
many Unix programs under Windows NT by providing a mostly Unix-like
interface for compilation and execution. See F in the
perl distribution for more details on this port and how to obtain the
Cygwin32 toolkit.
=head2 Plan 9
See F in the perl distribution.
=head2 QNX
See F in the perl distribution.
=head2 AmigaOS
See F in the perl distribution.
=head1 Pragmata
Six new pragmatic modules exist:
=over 4
=item use autouse MODULE => qw(sub1 sub2 sub3)
Defers C until someone calls one of the specified
subroutines (which must be exported by MODULE). This pragma should be
used with caution, and only when necessary.
=item use blib
=item use blib 'dir'
Looks for MakeMaker-like I<'blib'> directory structure starting in
I (or current directory) and working back up to five levels of
parent directories.
Intended for use on command line with B<-M> option as a way of testing
arbitrary scripts against an uninstalled version of a package.
=item use constant NAME => VALUE
Provides a convenient interface for creating compile-time constants,
See L.
=item use locale
Tells the compiler to enable (or disable) the use of POSIX locales for
builtin operations.
When C is in effect, the current LC_CTYPE locale is used
for regular expressions and case mapping; LC_COLLATE for string
ordering; and LC_NUMERIC for numeric formatting in printf and sprintf
(but B in print). LC_NUMERIC is always used in write, since
lexical scoping of formats is problematic at best.
Each C or C affects statements to the end of
the enclosing BLOCK or, if not inside a BLOCK, to the end of the
current file. Locales can be switched and queried with
POSIX::setlocale().
See L for more information.
=item use ops
Disable unsafe opcodes, or any named opcodes, when compiling Perl code.
=item use vmsish
Enable VMS-specific language features. Currently, there are three
VMS-specific features available: 'status', which makes C<$?> and
C return genuine VMS status values instead of emulating POSIX;
'exit', which makes C take a genuine VMS status value instead of
assuming that C is an error; and 'time', which makes all times
relative to the local time zone, in the VMS tradition.
=back
=head1 Modules
=head2 Required Updates
Though Perl 5.004 is compatible with almost all modules that work
with Perl 5.003, there are a few exceptions:
Module Required Version for Perl 5.004
------ -------------------------------
Filter Filter-1.12
LWP libwww-perl-5.08
Tk Tk400.202 (-w makes noise)
Also, the majordomo mailing list program, version 1.94.1, doesn't work
with Perl 5.004 (nor with perl 4), because it executes an invalid
regular expression. This bug is fixed in majordomo version 1.94.2.
=head2 Installation directories
The I script now places the Perl source files for
extensions in the architecture-specific library directory, which is
where the shared libraries for extensions have always been. This
change is intended to allow administrators to keep the Perl 5.004
library directory unchanged from a previous version, without running
the risk of binary incompatibility between extensions' Perl source and
shared libraries.
=head2 Module information summary
Brand new modules, arranged by topic rather than strictly
alphabetically:
CGI.pm Web server interface ("Common Gateway Interface")
CGI/Apache.pm Support for Apache's Perl module
CGI/Carp.pm Log server errors with helpful context
CGI/Fast.pm Support for FastCGI (persistent server process)
CGI/Push.pm Support for server push
CGI/Switch.pm Simple interface for multiple server types
CPAN Interface to Comprehensive Perl Archive Network
CPAN::FirstTime Utility for creating CPAN configuration file
CPAN::Nox Runs CPAN while avoiding compiled extensions
IO.pm Top-level interface to IO::* classes
IO/File.pm IO::File extension Perl module
IO/Handle.pm IO::Handle extension Perl module
IO/Pipe.pm IO::Pipe extension Perl module
IO/Seekable.pm IO::Seekable extension Perl module
IO/Select.pm IO::Select extension Perl module
IO/Socket.pm IO::Socket extension Perl module
Opcode.pm Disable named opcodes when compiling Perl code
ExtUtils/Embed.pm Utilities for embedding Perl in C programs
ExtUtils/testlib.pm Fixes up @INC to use just-built extension
FindBin.pm Find path of currently executing program
Class/Struct.pm Declare struct-like datatypes as Perl classes
File/stat.pm By-name interface to Perl's builtin stat
Net/hostent.pm By-name interface to Perl's builtin gethost*
Net/netent.pm By-name interface to Perl's builtin getnet*
Net/protoent.pm By-name interface to Perl's builtin getproto*
Net/servent.pm By-name interface to Perl's builtin getserv*
Time/gmtime.pm By-name interface to Perl's builtin gmtime
Time/localtime.pm By-name interface to Perl's builtin localtime
Time/tm.pm Internal object for Time::{gm,local}time
User/grent.pm By-name interface to Perl's builtin getgr*
User/pwent.pm By-name interface to Perl's builtin getpw*
Tie/RefHash.pm Base class for tied hashes with references as keys
UNIVERSAL.pm Base class for *ALL* classes
=head2 Fcntl
New constants in the existing Fcntl modules are now supported,
provided that your operating system happens to support them:
F_GETOWN F_SETOWN
O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC
O_EXLOCK O_SHLOCK
These constants are intended for use with the Perl operators sysopen()
and fcntl() and the basic database modules like SDBM_File. For the
exact meaning of these and other Fcntl constants please refer to your
operating system's documentation for fcntl() and open().
In addition, the Fcntl module now provides these constants for use
with the Perl operator flock():
LOCK_SH LOCK_EX LOCK_NB LOCK_UN
These constants are defined in all environments (because where there is
no flock() system call, Perl emulates it). However, for historical
reasons, these constants are not exported unless they are explicitly
requested with the ":flock" tag (e.g. C).
=head2 IO
The IO module provides a simple mechanism to load all the IO modules at one
go. Currently this includes:
IO::Handle
IO::Seekable
IO::File
IO::Pipe
IO::Socket
For more information on any of these modules, please see its
respective documentation.
=head2 Math::Complex
The Math::Complex module has been totally rewritten, and now supports
more operations. These are overloaded:
+ - * / ** <=> neg ~ abs sqrt exp log sin cos atan2 "" (stringify)
And these functions are now exported:
pi i Re Im arg
log10 logn ln cbrt root
tan
csc sec cot
asin acos atan
acsc asec acot
sinh cosh tanh
csch sech coth
asinh acosh atanh
acsch asech acoth
cplx cplxe
=head2 Math::Trig
This new module provides a simpler interface to parts of Math::Complex for
those who need trigonometric functions only for real numbers.
=head2 DB_File
There have been quite a few changes made to DB_File. Here are a few of
the highlights:
=over 4
=item *
Fixed a handful of bugs.
=item *
By public demand, added support for the standard hash function exists().
=item *
Made it compatible with Berkeley DB 1.86.
=item *
Made negative subscripts work with RECNO interface.
=item *
Changed the default flags from O_RDWR to O_CREAT|O_RDWR and the default
mode from 0640 to 0666.
=item *
Made DB_File automatically import the open() constants (O_RDWR,
O_CREAT etc.) from Fcntl, if available.
=item *
Updated documentation.
=back
Refer to the HISTORY section in DB_File.pm for a complete list of
changes. Everything after DB_File 1.01 has been added since 5.003.
=head2 Net::Ping
Major rewrite - support added for both udp echo and real icmp pings.
=head2 Object-oriented overrides for builtin operators
Many of the Perl builtins returning lists now have
object-oriented overrides. These are:
File::stat
Net::hostent
Net::netent
Net::protoent
Net::servent
Time::gmtime
Time::localtime
User::grent
User::pwent
For example, you can now say
use File::stat;
use User::pwent;
$his = (stat($filename)->st_uid == pwent($whoever)->pw_uid);
=head1 Utility Changes
=head2 pod2html
=over 4
=item Sends converted HTML to standard output
The I utility included with Perl 5.004 is entirely new.
By default, it sends the converted HTML to its standard output,
instead of writing it to a file like Perl 5.003's I did.
Use the B<--outfile=FILENAME> option to write to a file.
=back
=head2 xsubpp
=over 4
=item C XSUBs now default to returning nothing
Due to a documentation/implementation bug in previous versions of
Perl, XSUBs with a return type of C have actually been
returning one value. Usually that value was the GV for the XSUB,
but sometimes it was some already freed or reused value, which would
sometimes lead to program failure.
In Perl 5.004, if an XSUB is declared as returning C, it
actually returns no value, i.e. an empty list (though there is a
backward-compatibility exception; see below). If your XSUB really
does return an SV, you should give it a return type of C.
For backward compatibility, I tries to guess whether a
C XSUB is really C or if it wants to return an C.
It does so by examining the text of the XSUB: if I finds
what looks like an assignment to C, it assumes that the
XSUB's return type is really C.
=back
=head1 C Language API Changes
=over 4
=item C and C
The C function finds a method for an object, just like
in Perl 5.003. The GV it returns may be a method cache entry.
However, in Perl 5.004, method cache entries are not visible to users;
therefore, they can no longer be passed directly to C.
Instead, you should use the C macro on the GV to extract its CV,
and pass the CV to C.
The most likely symptom of passing the result of C to
C is Perl's producing an "Undefined subroutine called"
error on the I call to a given method (since there is no cache
on the first call).
=item C
A new function handy for eval'ing strings of Perl code inside C code.
This function returns the value from the eval statement, which can
be used instead of fetching globals from the symbol table. See
L, L and L for details and examples.
=item Extended API for manipulating hashes
Internal handling of hash keys has changed. The old hashtable API is
still fully supported, and will likely remain so. The additions to the
API allow passing keys as Cs, so that C hashes can be given
real scalars as keys rather than plain strings (nontied hashes still
can only use strings as keys). New extensions must use the new hash
access functions and macros if they wish to use C keys. These
additions also make it feasible to manipulate Cs (hash entries),
which can be more efficient. See L for details.
=back
=head1 Documentation Changes
Many of the base and library pods were updated. These
new pods are included in section 1:
=over 4
=item L
This document.
=item L
Frequently asked questions.
=item L
Locale support (internationalization and localization).
=item L
Tutorial on Perl OO programming.
=item L
Perl internal IO abstraction interface.
=item L
Perl module library and recommended practice for module creation.
Extracted from L (which is much smaller as a result).
=item L
Although not new, this has been massively updated.
=item L
Although not new, this has been massively updated.
=back
=head1 New Diagnostics
Several new conditions will trigger warnings that were
silent before. Some only affect certain platforms.
The following new warnings and errors outline these.
These messages are classified as follows (listed in
increasing order of desperation):
(W) A warning (optional).
(D) A deprecation (optional).
(S) A severe warning (mandatory).
(F) A fatal error (trappable).
(P) An internal error you should never see (trappable).
(X) A very fatal error (nontrappable).
(A) An alien error message (not generated by Perl).
=over 4
=item "my" variable %s masks earlier declaration in same scope
(W) A lexical variable has been redeclared in the same scope, effectively
eliminating all access to the previous instance. This is almost always
a typographical error. Note that the earlier variable will still exist
until the end of the scope or until all closure referents to it are
destroyed.
=item %s argument is not a HASH element or slice
(F) The argument to delete() must be either a hash element, such as
$foo{$bar}
$ref->[12]->{"susie"}
or a hash slice, such as
@foo{$bar, $baz, $xyzzy}
@{$ref->[12]}{"susie", "queue"}
=item Allocation too large: %lx
(X) You can't allocate more than 64K on an MS-DOS machine.
=item Allocation too large
(F) You can't allocate more than 2^31+"small amount" bytes.
=item Applying %s to %s will act on scalar(%s)
(W) The pattern match (//), substitution (s///), and transliteration (tr///)
operators work on scalar values. If you apply one of them to an array
or a hash, it will convert the array or hash to a scalar value (the
length of an array or the population info of a hash) and then work on
that scalar value. This is probably not what you meant to do. See
L and L for alternatives.
=item Attempt to free nonexistent shared string
(P) Perl maintains a reference counted internal table of strings to
optimize the storage and access of hash keys and other strings. This
indicates someone tried to decrement the reference count of a string
that can no longer be found in the table.
=item Attempt to use reference as lvalue in substr
(W) You supplied a reference as the first argument to substr() used
as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See L.
=item Bareword "%s" refers to nonexistent package
(W) You used a qualified bareword of the form C, but
the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?
=item Can't redefine active sort subroutine %s
(F) Perl optimizes the internal handling of sort subroutines and keeps
pointers into them. You tried to redefine one such sort subroutine when it
was currently active, which is not allowed. If you really want to do
this, you should write C instead of C.
=item Can't use bareword ("%s") as %s ref while "strict refs" in use
(F) Only hard references are allowed by "strict refs". Symbolic references
are disallowed. See L.
=item Cannot resolve method `%s' overloading `%s' in package `%s'
(P) Internal error trying to resolve overloading specified by a method
name (as opposed to a subroutine reference).
=item Constant subroutine %s redefined
(S) You redefined a subroutine which had previously been eligible for
inlining. See L for commentary and
workarounds.
=item Constant subroutine %s undefined
(S) You undefined a subroutine which had previously been eligible for
inlining. See L for commentary and
workarounds.
=item Copy method did not return a reference
(F) The method which overloads "=" is buggy. See L.
=item Died
(F) You passed die() an empty string (the equivalent of C) or
you called it with no args and both C<$@> and C<$_> were empty.
=item Exiting pseudo-block via %s
(W) You are exiting a rather special block construct (like a sort block or
subroutine) by unconventional means, such as a goto, or a loop control
statement. See L.
=item Identifier too long
(F) Perl limits identifiers (names for variables, functions, etc.) to
252 characters for simple names, somewhat more for compound names (like
C<$A::B>). You've exceeded Perl's limits. Future versions of Perl are
likely to eliminate these arbitrary limitations.
=item Illegal character %s (carriage return)
(F) A carriage return character was found in the input. This is an
error, and not a warning, because carriage return characters can break
multi-line strings, including here documents (e.g., C).
=item Illegal switch in PERL5OPT: %s
(X) The PERL5OPT environment variable may only be used to set the
following switches: B<-[DIMUdmw]>.
=item Integer overflow in hex number
(S) The literal hex number you have specified is too big for your
architecture. On a 32-bit architecture the largest hex literal is
0xFFFFFFFF.
=item Integer overflow in octal number
(S) The literal octal number you have specified is too big for your
architecture. On a 32-bit architecture the largest octal literal is
037777777777.
=item internal error: glob failed
(P) Something went wrong with the external program(s) used for C
and C<< <*.c> >>. This may mean that your csh (C shell) is
broken. If so, you should change all of the csh-related variables in
config.sh: If you have tcsh, make the variables refer to it as if it
were csh (e.g. C); otherwise, make them all
empty (except that C should be C<'undef'>) so that Perl will
think csh is missing. In either case, after editing config.sh, run
C<./Configure -S> and rebuild Perl.
=item Invalid conversion in %s: "%s"
(W) Perl does not understand the given format conversion.
See L.
=item Invalid type in pack: '%s'
(F) The given character is not a valid pack type. See L.
=item Invalid type in unpack: '%s'
(F) The given character is not a valid unpack type. See L.
=item Name "%s::%s" used only once: possible typo
(W) Typographical errors often show up as unique variable names.
If you had a good reason for having a unique name, then just mention
it again somehow to suppress the message (the C pragma is
provided for just this purpose).
=item Null picture in formline
(F) The first argument to formline must be a valid format picture
specification. It was found to be empty, which probably means you
supplied it an uninitialized value. See L.
=item Offset outside string
(F) You tried to do a read/write/send/recv operation with an offset
pointing outside the buffer. This is difficult to imagine.
The sole exception to this is that Cing past the buffer
will extend the buffer and zero pad the new area.
=item Out of memory!
(X|F) The malloc() function returned 0, indicating there was insufficient
remaining memory (or virtual memory) to satisfy the request.
The request was judged to be small, so the possibility to trap it
depends on the way Perl was compiled. By default it is not trappable.
However, if compiled for this, Perl may use the contents of C<$^M> as
an emergency pool after die()ing with this message. In this case the
error is trappable I.
=item Out of memory during request for %s
(F) The malloc() function returned 0, indicating there was insufficient
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 panic: frexp
(P) The library function frexp() failed, making printf("%f") impossible.
=item Possible attempt to put comments in qw() list
(W) qw() lists contain items separated by whitespace; as with literal
strings, comment characters are not ignored, but are instead treated
as literal data. (You may have used different delimiters than the
parentheses shown here; braces are also frequently used.)
You probably wrote something like this:
@list = qw(
a # a comment
b # another comment
);
when you should have written this:
@list = qw(
a
b
);
If you really want comments, build your list the
old-fashioned way, with quotes and commas:
@list = (
'a', # a comment
'b', # another comment
);
=item Possible attempt to separate words with commas
(W) qw() lists contain items separated by whitespace; therefore commas
aren't needed to separate the items. (You may have used different
delimiters than the parentheses shown here; braces are also frequently
used.)
You probably wrote something like this:
qw! a, b, c !;
which puts literal commas into some of the list items. Write it without
commas if you don't want them to appear in your data:
qw! a b c !;
=item Scalar value @%s{%s} better written as $%s{%s}
(W) You've used a hash slice (indicated by @) to select a single element of
a hash. Generally it's better to ask for a scalar value (indicated by $).
The difference is that C<$foo{&bar}> always behaves like a scalar, both when
assigning to it and when evaluating its argument, while C<@foo{&bar}> behaves
like a list when you assign to it, and provides a list context to its
subscript, which can do weird things if you're expecting only one subscript.
=item Stub found while resolving method `%s' overloading `%s' in %s
(P) Overloading resolution over @ISA tree may be broken by importing stubs.
Stubs should never be implicitly created, but explicit calls to C
may break this.
=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 argument
list. 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.
=item untie attempted while %d inner references still exist
(W) A copy of the object returned from C (or C) was still
valid when C was called.
=item Unrecognized character %s
(F) The Perl parser has no idea what to do with the specified character
in your Perl script (or eval). Perhaps you tried to run a compressed
script, a binary program, or a directory as a Perl program.
=item Unsupported function fork
(F) Your version of executable does not support forking.
Note that under some systems, like OS/2, there may be different flavors of
Perl executables, some of which may support fork, some not. Try changing
the name you call Perl by to C, C, and so on.
=item Use of "$$" to mean "${$}" is deprecated
(D) Perl versions before 5.004 misinterpreted any type marker followed
by "$" and a digit. For example, "$$0" was incorrectly taken to mean
"${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.
However, the developers of Perl 5.004 could not fix this bug completely,
because at least two widely-used modules depend on the old meaning of
"$$0" in a string. So Perl 5.004 still interprets "$$" in the
old (broken) way inside strings; but it generates this message as a
warning. And in Perl 5.005, this special treatment will cease.
=item Value of %s can be "0"; test with defined()
(W) In a conditional expression, you used , <*> (glob), C,
or C as a boolean value. Each of these constructs can return a
value of "0"; that would make the conditional expression false, which is
probably not what you intended. When using these constructs in conditional
expressions, test their values with the C operator.
=item Variable "%s" may be unavailable
(W) An inner (nested) I subroutine is inside a I
subroutine, and outside that is another subroutine; and the anonymous
(innermost) subroutine is referencing a lexical variable defined in
the outermost subroutine. For example:
sub outermost { my $a; sub middle { sub { $a } } }
If the anonymous subroutine is called or referenced (directly or
indirectly) from the outermost subroutine, it will share the variable
as you would expect. But if the anonymous subroutine is called or
referenced when the outermost subroutine is not active, it will see
the value of the shared variable as it was before and during the
*first* call to the outermost subroutine, which is probably not what
you want.
In these circumstances, it is usually best to make the middle
subroutine anonymous, using the C syntax. Perl has specific
support for shared variables in nested anonymous subroutines; a named
subroutine in between interferes with this feature.
=item Variable "%s" will not stay shared
(W) An inner (nested) I subroutine is referencing a lexical
variable defined in an outer subroutine.
When the inner subroutine is called, it will probably see the value of
the outer subroutine's variable as it was before and during the
*first* call to the outer subroutine; in this case, after the first
call to the outer subroutine is complete, the inner and outer
subroutines will no longer share a common value for the variable. In
other words, the variable will no longer be shared.
Furthermore, if the outer subroutine is anonymous and references a
lexical variable outside itself, then the outer and inner subroutines
will I share the given variable.
This problem can usually be solved by making the inner subroutine
anonymous, using the C syntax. When inner anonymous subs that
reference variables in outer subroutines are called or referenced,
they are automatically rebound to the current values of such
variables.
=item Warning: something's wrong
(W) You passed warn() an empty string (the equivalent of C) or
you called it with no args and C<$_> was empty.
=item Ill-formed logical name |%s| in prime_env_iter
(W) A warning peculiar to VMS. A logical name was encountered when preparing
to iterate over %ENV which violates the syntactic rules governing logical
names. Since it cannot be translated normally, it is skipped, and will not
appear in %ENV. This may be a benign occurrence, as some software packages
might directly modify logical name tables and introduce nonstandard names,
or it may indicate that a logical name table has been corrupted.
=item Got an error from DosAllocMem
(P) An error peculiar to OS/2. Most probably you're using an obsolete
version of Perl, and this should not happen anyway.
=item Malformed PERLLIB_PREFIX
(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form
prefix1;prefix2
or
prefix1 prefix2
with nonempty prefix1 and prefix2. If C is indeed a prefix
of a builtin library search path, prefix2 is substituted. The error
may appear if components are not found, or are too long. See
"PERLLIB_PREFIX" in F.
=item PERL_SH_DIR too long
(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
C-shell in. See "PERL_SH_DIR" in F.
=item Process terminated by SIG%s
(W) This is a standard message issued by OS/2 applications, while *nix
applications die in silence. It is considered a feature of the OS/2
port. One can easily disable this by appropriate sighandlers, see
L. See also "Process terminated by SIGTERM/SIGINT"
in F.
=back
=head1 BUGS
If you find what you think is a bug, you might check the headers of
recently posted articles in the comp.lang.perl.misc newsgroup.
There may also be information at http://www.perl.com/perl/ , the Perl
Home Page.
If you believe you have an unreported bug, please run the B
program included with your release. Make sure you trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C, will be sent off to > to be
analysed by the Perl porting team.
=head1 SEE ALSO
The F file for exhaustive details on what changed.
The F file for how to build Perl. This file has been
significantly updated for 5.004, so even veteran users should
look through it.
The F file for general stuff.
The F file for copyright information.
=head1 HISTORY
Constructed by Tom Christiansen, grabbing material with permission
from innumerable contributors, with kibitzing by more than a few Perl
porters.
Last update: Wed May 14 11:14:09 EDT 1997