<LI><A HREF="#deprecated: inherited autoload for nonmethods">Deprecated: Inherited <CODE>AUTOLOAD</CODE> for non-methods</A></LI>
<LI><A HREF="#previously deprecated %overload is no longer usable">Previously deprecated %OVERLOAD is no longer usable</A></LI>
<LI><A HREF="#subroutine arguments created only when they're modified">Subroutine arguments created only when they're modified</A></LI>
<LI><A HREF="#group vector changeable with $)">Group vector changeable with <CODE>$)</CODE></A></LI>
<LI><A HREF="#fixed parsing of $$<digit>, &$<digit>, etc.">Fixed parsing of $$<digit>, &$<digit>, etc.</A></LI>
<LI><A HREF="#fixed localization of $<digit>, $&, etc.">Fixed localization of $<digit>, $&, etc.</A></LI>
<LI><A HREF="#no resetting of $. on implicit close">No resetting of $. on implicit close</A></LI>
<LI><A HREF="#wantarray may return undef"><A HREF="../../lib/Pod/perlfunc.html#item_wantarray"><CODE>wantarray</CODE></A> may return undef</A></LI>
<LI><A HREF="#eval expr determines value of expr in scalar context"><A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval EXPR</CODE></A> determines value of EXPR in scalar context</A></LI>
<LI><A HREF="#changes to tainting checks">Changes to tainting checks</A></LI>
<LI><A HREF="#new opcode module and revised safe module">New Opcode module and revised Safe module</A></LI>
<P>If you removed the <STRONG>-w</STRONG> option from your Perl 5.003 scripts because it
made Perl too verbose, we recommend that you try putting it back when
you upgrade to Perl 5.004. Each new perl version tends to remove some
undesirable warnings, while adding new warnings that may catch bugs in
your scripts.</P>
<P>
<H2><A NAME="deprecated: inherited autoload for nonmethods">Deprecated: Inherited <CODE>AUTOLOAD</CODE> for non-methods</A></H2>
<P>Before Perl 5.004, <CODE>AUTOLOAD</CODE> functions were looked up as methods
(using the <CODE>@ISA</CODE> hierarchy), even when the function to be autoloaded
was called as a plain function (e.g. <CODE>Foo::bar()</CODE>), not a method
(e.g. <CODE>Foo->bar()</CODE> or <CODE>$obj->bar()</CODE>).</P>
<P>Perl 5.005 will use method lookup only for methods' <CODE>AUTOLOAD</CODE>s.
However, there is a significant base of existing code that may be using
the old behavior. So, as an interim step, Perl 5.004 issues an optional
warning when a non-method uses an inherited <CODE>AUTOLOAD</CODE>.</P>
<P>The simple rule is: Inheritance will not work when autoloading
non-methods. The simple fix for old code is: In any module that used to
depend on inheriting <CODE>AUTOLOAD</CODE> for non-methods from a base class named
<CODE>BaseClass</CODE>, execute <CODE>*AUTOLOAD = \&BaseClass::AUTOLOAD</CODE> during startup.</P>
<P>
<H2><A NAME="previously deprecated %overload is no longer usable">Previously deprecated %OVERLOAD is no longer usable</A></H2>
<P>Using %OVERLOAD to define overloading was deprecated in 5.003.
Overloading is now defined using the overload pragma. %OVERLOAD is
still used internally but should not be used by Perl scripts. See
<A HREF="../../lib/overload.html">the overload manpage</A> for more details.</P>
<P>
<H2><A NAME="subroutine arguments created only when they're modified">Subroutine arguments created only when they're modified</A></H2>
<P>In Perl 5.004, nonexistent array and hash elements used as subroutine
parameters are brought into existence only if they are actually
assigned to (via <CODE>@_</CODE>).</P>
<P>Earlier versions of Perl vary in their handling of such arguments.
Perl versions 5.002 and 5.003 always brought them into existence.
Perl versions 5.000 and 5.001 brought them into existence only if
they were not the first argument (which was almost certainly a bug).
Earlier versions of Perl never brought them into existence.</P>
<P>For example, given this code:</P>
<PRE>
undef @a; undef %a;
sub show { print $_[0] };
sub change { $_[0]++ };
show($a[2]);
change($a{b});</PRE>
<P>After this code executes in Perl 5.004, $a{b} exists but $a[2] does
not. In Perl 5.002 and 5.003, both $a{b} and $a[2] would have existed
(but $a[2]'s value would have been undefined).</P>
<P>
<H2><A NAME="group vector changeable with $)">Group vector changeable with <CODE>$)</CODE></A></H2>
<P>The <CODE>$)</CODE> special variable has always (well, in Perl 5, at least)
reflected not only the current effective group, but also the group list
as returned by the <CODE>getgroups()</CODE> C function (if there is one).
However, until this release, there has not been a way to call the
<CODE>setgroups()</CODE> C function from Perl.</P>
<P>In Perl 5.004, assigning to <CODE>$)</CODE> is exactly symmetrical with examining
it: The first number in its string value is used as the effective gid;
if there are any numbers after the first one, they are passed to the
<CODE>setgroups()</CODE> C function (if there is one).</P>
<P>
<H2><A NAME="fixed parsing of $$<digit>, &$<digit>, etc.">Fixed parsing of $$<digit>, &$<digit>, etc.</A></H2>
<P>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.</P>
<P>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 ``$$<digit>'' 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.</P>
<P>
<H2><A NAME="fixed localization of $<digit>, $&, etc.">Fixed localization of $<digit>, $&, etc.</A></H2>
<P>Perl versions before 5.004 did not always properly localize the
regex-related special variables. Perl 5.004 does localize them, as
the documentation has always said it should. This may result in $1,
$2, etc. no longer being set where existing programs use them.</P>
<P>
<H2><A NAME="no resetting of $. on implicit close">No resetting of $. on implicit close</A></H2>
<P>The documentation for Perl 5.0 has always stated that <CODE>$.</CODE> is <EM>not</EM>
reset when an already-open file handle is reopened with no intervening
call to <A HREF="../../lib/Pod/perlfunc.html#item_close"><CODE>close</CODE></A>. Due to a bug, perl versions 5.000 through 5.003
<EM>did</EM> reset <CODE>$.</CODE> under that circumstance; Perl 5.004 does not.</P>
<P>
<H2><A NAME="wantarray may return undef"><A HREF="../../lib/Pod/perlfunc.html#item_wantarray"><CODE>wantarray</CODE></A> may return undef</A></H2>
<P>The <A HREF="../../lib/Pod/perlfunc.html#item_wantarray"><CODE>wantarray</CODE></A> operator returns true if a subroutine is expected to
return a list, and false otherwise. In Perl 5.004, <A HREF="../../lib/Pod/perlfunc.html#item_wantarray"><CODE>wantarray</CODE></A> can
also return the undefined value if a subroutine's return value will
not be used at all, which allows subroutines to avoid a time-consuming
calculation of a return value if it isn't going to be used.</P>
<P>
<H2><A NAME="eval expr determines value of expr in scalar context"><A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval EXPR</CODE></A> determines value of EXPR in scalar context</A></H2>
<P>Perl (version 5) used to determine the value of EXPR inconsistently,
sometimes incorrectly using the surrounding context for the determination.
Now, the value of EXPR (before being parsed by eval) is always determined in
a scalar context. Once parsed, it is executed as before, by providing
the context that the scope surrounding the eval provided. This change
makes the behavior Perl4 compatible, besides fixing bugs resulting from
the inconsistent behavior. This program:</P>
<PRE>
@a = qw(time now is time);
print eval @a;
print '|', scalar eval @a;</PRE>
<P>used to print something like ``timenowis881399109|4'', but now (and in perl4)
prints ``4|4''.</P>
<P>
<H2><A NAME="changes to tainting checks">Changes to tainting checks</A></H2>
<P>A bug in previous versions may have failed to detect some insecure
conditions when taint checks are turned on. (Taint checks are used
in setuid or setgid scripts, or when explicitly turned on with the
<CODE>-T</CODE> invocation option.) Although it's unlikely, this may cause a
previously-working script to now fail -- which should be construed
as a blessing, since that indicates a potentially-serious security
hole was just plugged.</P>
<P>The new restrictions when tainting include:</P>
<DL>
<DT><STRONG><A NAME="item_glob">No <CODE>glob()</CODE> or <*></A></STRONG><BR>
<DD>
These operators may spawn the C shell (csh), which cannot be made
safe. This restriction will be lifted in a future version of Perl
when globbing is implemented without the use of an external program.
<P></P>
<DT><STRONG><A NAME="item_No_spawning_if_tainted_%24CDPATH%2C_%24ENV%2C_%24B">No spawning if tainted $CDPATH, $ENV, $BASH_ENV</A></STRONG><BR>
<DD>
These environment variables may alter the behavior of spawned programs
(especially shells) in ways that subvert security. So now they are
treated as dangerous, in the manner of $IFS and $PATH.
<P></P>
<DT><STRONG><A NAME="item_No_spawning_if_tainted_%24TERM_doesn%27t_look_like">No spawning if tainted $TERM doesn't look like a terminal name</A></STRONG><BR>
<DD>
Some termcap libraries do unsafe things with $TERM. However, it would be
unnecessarily harsh to treat all $TERM values as unsafe, since only shell
metacharacters can cause trouble in $TERM. So a tainted $TERM is
considered to be safe if it contains only alphanumerics, underscores,
dashes, and colons, and unsafe if it contains other characters (including
whitespace).
<P></P></DL>
<P>
<H2><A NAME="new opcode module and revised safe module">New Opcode module and revised Safe module</A></H2>
<P>A new Opcode module supports the creation, manipulation and
application of opcode masks. The revised Safe module has a new API
and is implemented using the new Opcode module. Please read the new
is now supported on more platforms, prefers fcntl to lockf when
emulating, and always flushes before (un)locking.
<P></P>
<DT><STRONG><A NAME="item_printf_and_sprintf">printf and sprintf</A></STRONG><BR>
<DD>
Perl now implements these functions itself; it doesn't use the C
library function <A HREF="../../lib/Pod/perlfunc.html#item_sprintf"><CODE>sprintf()</CODE></A> any more, except for floating-point
numbers, and even then only known flags are allowed. As a result, it
is now possible to know which conversions and flags will work, and
what they will do.
<P>The new conversions in Perl's <A HREF="../../lib/Pod/perlfunc.html#item_sprintf"><CODE>sprintf()</CODE></A> are:</P>
<PRE>
%i a synonym for %d
%p a pointer (the address of the Perl value, in hexadecimal)
%n special: *stores* the number of characters output so far
into the next variable in the parameter list</PRE>
<P>The new flags that go between the <CODE>%</CODE> and the conversion are:</P>
<PRE>
# prefix octal with "0", hex with "0x"
h interpret integer as C type "short" or "unsigned short"
V interpret integer as Perl's standard integer type</PRE>
<P>Also, where a number would appear in the flags, an asterisk (``*'') may
be used instead, in which case Perl uses the next item in the
parameter list as the given number (that is, as the field width or
precision). If a field width obtained through ``*'' is negative, it has
the same effect as the '-' flag: left-justification.</P>
<P>See <A HREF="../../lib/Pod/perlfunc.html#sprintf">sprintf in the perlfunc manpage</A> for a complete list of conversion and flags.</P>
<P></P>
<DT><STRONG><A NAME="item_keys_as_an_lvalue">keys as an lvalue</A></STRONG><BR>
<DD>
As an lvalue, <A HREF="../../lib/Pod/perlfunc.html#item_keys"><CODE>keys</CODE></A> allows you to increase the number of hash buckets
allocated for the given hash. This can gain you a measure of efficiency if
you know the hash is going to get big. (This is similar to pre-extending
an array by assigning a larger number to $#array.) If you say
<PRE>
keys %hash = 200;</PRE>
<P>then <CODE>%hash</CODE> will have at least 200 buckets allocated for it. These
buckets will be retained even if you do <CODE>%hash = ()</CODE>; use <CODE>undef
%hash</CODE> if you want to free the storage while <CODE>%hash</CODE> is still in scope.
You can't shrink the number of buckets allocated for the hash using
<A HREF="../../lib/Pod/perlfunc.html#item_keys"><CODE>keys</CODE></A> in this way (but you needn't worry about doing this by accident,
as trying has no effect).</P>
<P></P>
<DT><STRONG><A NAME="item_my"><CODE>my()</CODE> in Control Structures</A></STRONG><BR>
<DD>
You can now use <A HREF="#item_my"><CODE>my()</CODE></A> (with or without the parentheses) in the control
expressions of control structures such as:
<PRE>
while (defined(my $line = <>)) {
$line = lc $line;
} continue {
print $line;
}</PRE>
<PRE>
if ((my $answer = <STDIN>) =~ /^y(es)?$/i) {
user_agrees();
} elsif ($answer =~ /^n(o)?$/i) {
user_disagrees();
} else {
chomp $answer;
die "`$answer' is neither `yes' nor `no'";
}</PRE>
<P>Also, you can declare a foreach loop control variable as lexical by
preceding it with the word ``my''. For example, in:</P>
<PRE>
foreach my $i (1, 2, 3) {
some_function();
}</PRE>
<P>$i is a lexical variable, and the scope of $i extends to the end of
the loop, but not beyond it.</P>
<P>Note that you still cannot use <A HREF="#item_my"><CODE>my()</CODE></A> on global punctuation variables
such as $_ and the like.</P>
<P></P>
<DT><STRONG><A NAME="item_pack"><CODE>pack()</CODE> and <A HREF="../../lib/Pod/perlfunc.html#item_unpack"><CODE>unpack()</CODE></A></A></STRONG><BR>
<DD>
A new format 'w' represents a BER compressed integer (as defined in
ASN.1). Its format is a sequence of one or more bytes, each of which
provides seven bits of the total value, with the most significant
first. Bit eight of each byte is set, except for the last byte, in
which bit eight is clear.
<P>If 'p' or 'P' are given undef as values, they now generate a NULL
pointer.</P>
<P>Both <A HREF="#item_pack"><CODE>pack()</CODE></A> and <A HREF="../../lib/Pod/perlfunc.html#item_unpack"><CODE>unpack()</CODE></A> now fail when their templates contain invalid
The new <A HREF="#item_sysseek"><CODE>sysseek()</CODE></A> operator is a variant of <A HREF="../../lib/Pod/perlfunc.html#item_seek"><CODE>seek()</CODE></A> that sets and gets the
file's system read/write position, using the <CODE>lseek(2)</CODE> system call. It is
the only reliable way to seek before using <A HREF="../../lib/Pod/perlfunc.html#item_sysread"><CODE>sysread()</CODE></A> or syswrite(). Its
return value is the new position, or the undefined value on failure.
The default seed for <A HREF="#item_srand"><CODE>srand</CODE></A>, which used to be <A HREF="../../lib/Pod/perlfunc.html#item_time"><CODE>time</CODE></A>, has been changed.
Now it's a heady mix of difficult-to-predict system-dependent values,
which should be sufficient for most everyday purposes.
<P>Previous to version 5.004, calling <A HREF="../../lib/Pod/perlfunc.html#item_rand"><CODE>rand</CODE></A> without first calling <A HREF="#item_srand"><CODE>srand</CODE></A>
would yield the same sequence of random numbers on most or all machines.
Now, when perl sees that you're calling <A HREF="../../lib/Pod/perlfunc.html#item_rand"><CODE>rand</CODE></A> and haven't yet called
<A HREF="#item_srand"><CODE>srand</CODE></A>, it calls <A HREF="#item_srand"><CODE>srand</CODE></A> with the default seed. You should still call
<A HREF="#item_srand"><CODE>srand</CODE></A> manually if your code might ever be run on a pre-5.004 system,
of course, or if you want a seed other than the default.</P>
<P></P>
<DT><STRONG><A NAME="item_%24__as_Default">$_ as Default</A></STRONG><BR>
<DD>
Functions documented in the Camel to default to $_ now in
fact do, and all those that do are so documented in <A HREF="../../lib/Pod/perlfunc.html">the perlfunc manpage</A>.
<P></P>
<DT><STRONG><A NAME="item_m%2F%2Fgc_does_not_reset_search_position_on_failur"><CODE>m//gc</CODE> does not reset search position on failure</A></STRONG><BR>
<DD>
The <CODE>m//g</CODE> match iteration construct has always reset its target
string's search position (which is visible through the <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> operator)
when a match fails; as a result, the next <CODE>m//g</CODE> match after a failure
starts again at the beginning of the string. With Perl 5.004, this
reset may be disabled by adding the ``c'' (for ``continue'') modifier,
i.e. <CODE>m//gc</CODE>. This feature, in conjunction with the <CODE>\G</CODE> zero-width
assertion, makes it possible to chain matches together. See <A HREF="../../lib/Pod/perlop.html">the perlop manpage</A>
and <A HREF="../../lib/Pod/perlre.html">the perlre manpage</A>.
<P></P>
<DT><STRONG><A NAME="item_m%2F%2Fx_ignores_whitespace_before_%3F%2A%2B%7B%7D"><CODE>m//x</CODE> ignores whitespace before ?*+{}</A></STRONG><BR>
<DD>
The <CODE>m//x</CODE> construct has always been intended to ignore all unescaped
whitespace. However, before Perl 5.004, whitespace had the effect of
escaping repeat modifiers like ``*'' or ``?''; for example, <CODE>/a *b/x</CODE> was
(mis)interpreted as <CODE>/a\*b/x</CODE>. This bug has been fixed in 5.004.
<P></P>
<DT><STRONG><A NAME="item_nested_sub%7B%7D_closures_work_now">nested <A HREF="../../lib/Pod/perlfunc.html#item_sub"><CODE>sub{}</CODE></A> closures work now</A></STRONG><BR>
<DD>
Prior to the 5.004 release, nested anonymous functions didn't work
right. They do now.
<P></P>
<DT><STRONG><A NAME="item_formats_work_right_on_changing_lexicals">formats work right on changing lexicals</A></STRONG><BR>
<DD>
Just like anonymous functions that contain lexical variables
that change (like a lexical index variable for a <CODE>foreach</CODE> loop),
formats now work properly. For example, this silently failed
before (printed only zeros), but is fine now:
<PRE>
my $i;
foreach $i ( 1 .. 10 ) {
write;
}
format =
my i is @#
$i
.</PRE>
<P>However, it still fails (without a warning) if the foreach is within a
<DT><STRONG><A NAME="item_Sends_converted_HTML_to_standard_output">Sends converted HTML to standard output</A></STRONG><BR>
<DD>
The <EM>pod2html</EM> 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 <EM>pod2html</EM> did.
Use the <STRONG>--outfile=FILENAME</STRONG> option to write to a file.
<P></P></DL>
<P>
<H2><A NAME="xsubpp">xsubpp</A></H2>
<DL>
<DT><STRONG><A NAME="item_void_XSUBs_now_default_to_returning_nothing"><A HREF="../../lib/Pod/perlguts.html#item_void"><CODE>void</CODE></A> XSUBs now default to returning nothing</A></STRONG><BR>
<DD>
Due to a documentation/implementation bug in previous versions of
Perl, XSUBs with a return type of <A HREF="../../lib/Pod/perlguts.html#item_void"><CODE>void</CODE></A> 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.
<P>In Perl 5.004, if an XSUB is declared as returning <A HREF="../../lib/Pod/perlguts.html#item_void"><CODE>void</CODE></A>, 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 <CODE>SV *</CODE>.</P>
<P>For backward compatibility, <EM>xsubpp</EM> tries to guess whether a
<A HREF="../../lib/Pod/perlguts.html#item_void"><CODE>void</CODE></A> XSUB is really <A HREF="../../lib/Pod/perlguts.html#item_void"><CODE>void</CODE></A> or if it wants to return an <CODE>SV *</CODE>.
It does so by examining the text of the XSUB: if <EM>xsubpp</EM> finds
what looks like an assignment to <CODE>ST(0)</CODE>, it assumes that the
XSUB's return type is really <CODE>SV *</CODE>.</P>
<P></P></DL>
<P>
<HR>
<H1><A NAME="c language api changes">C Language API Changes</A></H1>
<DL>
<DT><STRONG><A NAME="item_gv_fetchmethod_and_perl_call_sv"><CODE>gv_fetchmethod</CODE> and <CODE>perl_call_sv</CODE></A></STRONG><BR>
<DD>
The <CODE>gv_fetchmethod</CODE> 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 <CODE>perl_call_sv</CODE>.
Instead, you should use the <CODE>GvCV</CODE> macro on the GV to extract its CV,
and pass the CV to <CODE>perl_call_sv</CODE>.
<P>The most likely symptom of passing the result of <CODE>gv_fetchmethod</CODE> to
<CODE>perl_call_sv</CODE> is Perl's producing an ``Undefined subroutine called''
error on the <EM>second</EM> call to a given method (since there is no cache
<P>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):</P>
<PRE>
(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).</PRE>
<DL>
<DT><STRONG><A NAME="item_%22my%22_variable_%25s_masks_earlier_declaration_i">``my'' variable %s masks earlier declaration in same scope</A></STRONG><BR>
<DD>
(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.
<P></P>
<DT><STRONG><A NAME="item_%s">%s argument is not a HASH element or slice</A></STRONG><BR>
<DD>
(F) The argument to <A HREF="../../lib/Pod/perlfunc.html#item_delete"><CODE>delete()</CODE></A> must be either a hash element, such as
<PRE>
$foo{$bar}
$ref->[12]->{"susie"}</PRE>
<P>or a hash slice, such as</P>
<PRE>
@foo{$bar, $baz, $xyzzy}
@{$ref->[12]}{"susie", "queue"}</PRE>
<P></P>
<DT><STRONG><A NAME="item_Allocation_too_large%3A_%25lx">Allocation too large: %lx</A></STRONG><BR>
<DD>
(X) You can't allocate more than 64K on an MS-DOS machine.
<P></P>
<DT><STRONG><A NAME="item_Allocation_too_large">Allocation too large</A></STRONG><BR>
<DD>
(F) You can't allocate more than 2^31+``small amount'' bytes.
<P></P>
<DT><STRONG><A NAME="item_scalar">Applying %s to %s will act on <CODE>scalar(%s)</CODE></A></STRONG><BR>
<DD>
(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
<A HREF="../../lib/Pod/perlfunc.html#grep">grep in the perlfunc manpage</A> and <A HREF="../../lib/Pod/perlfunc.html#map">map in the perlfunc manpage</A> for alternatives.
<P></P>
<DT><STRONG><A NAME="item_Attempt_to_free_nonexistent_shared_string">Attempt to free nonexistent shared string</A></STRONG><BR>
<DD>
(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.
<P></P>
<DT><STRONG><A NAME="item_Attempt_to_use_reference_as_lvalue_in_substr">Attempt to use reference as lvalue in substr</A></STRONG><BR>
<DD>
(W) You supplied a reference as the first argument to <A HREF="../../lib/Pod/perlfunc.html#item_substr"><CODE>substr()</CODE></A> used
as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See <A HREF="../../lib/Pod/perlfunc.html#substr">substr in the perlfunc manpage</A>.
<P></P>
<DT><STRONG><A NAME="item_Bareword_%22%25s%22_refers_to_nonexistent_package">Bareword ``%s'' refers to nonexistent package</A></STRONG><BR>
<DD>
(W) You used a qualified bareword of the form <CODE>Foo::</CODE>, but
the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?
<P></P>
<DT><STRONG><A NAME="item_Can%27t_redefine_active_sort_subroutine_%25s">Can't redefine active sort subroutine %s</A></STRONG><BR>
<DD>
(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 <CODE>sort { &func } @x</CODE> instead of <CODE>sort func @x</CODE>.
<P></P>
<DT><STRONG><A NAME="item_bareword">Can't use bareword (``%s'') as %s ref while ``strict refs'' in use</A></STRONG><BR>
<DD>
(F) Only hard references are allowed by ``strict refs''. Symbolic references
are disallowed. See <A HREF="../../lib/Pod/perlref.html">the perlref manpage</A>.
<P></P>
<DT><STRONG><A NAME="item_Cannot_resolve_method_%60%25s%27_overloading_%60%2">Cannot resolve method `%s' overloading `%s' in package `%s'</A></STRONG><BR>
<DD>
(P) Internal error trying to resolve overloading specified by a method
(P) The library function <CODE>frexp()</CODE> failed, making <A HREF="../../lib/Pod/perlfunc.html#item_printf"><CODE>printf(``%f'')</CODE></A> impossible.
<P></P>
<DT><STRONG>Possible attempt to put comments in <CODE>qw()</CODE> list</STRONG><BR>
<DD>
(W) <A HREF="#item_qw"><CODE>qw()</CODE></A> 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.)
<P>You probably wrote something like this:</P>
<PRE>
@list = qw(
a # a comment
b # another comment
);</PRE>
<P>when you should have written this:</P>
<PRE>
@list = qw(
a
b
);</PRE>
<P>If you really want comments, build your list the
old-fashioned way, with quotes and commas:</P>
<PRE>
@list = (
'a', # a comment
'b', # another comment
);</PRE>
<P></P>
<DT><STRONG><A NAME="item_Possible_attempt_to_separate_words_with_commas">Possible attempt to separate words with commas</A></STRONG><BR>
aren't needed to separate the items. (You may have used different
delimiters than the parentheses shown here; braces are also frequently
used.)
<P>You probably wrote something like this:</P>
<PRE>
qw! a, b, c !;</PRE>
<P>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:</P>
<PRE>
qw! a b c !;</PRE>
<P></P>
<DT><STRONG><A NAME="item_Scalar_value_%40%25s%7B%25s%7D_better_written_as_%">Scalar value @%s{%s} better written as $%s{%s}</A></STRONG><BR>
<DD>
(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 <CODE>$foo{&bar}</CODE> always behaves like a scalar, both when
assigning to it and when evaluating its argument, while <CODE>@foo{&bar}</CODE> 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.
<P></P>
<DT><STRONG><A NAME="item_Stub_found_while_resolving_method_%60%25s%27_overl">Stub found while resolving method `%s' overloading `%s' in package `%s'</A></STRONG><BR>
<DD>
(P) Overloading resolution over @ISA tree may be broken by importing stubs.
Stubs should never be implicitly created, but explicit calls to <A HREF="#item_can"><CODE>can</CODE></A>
may break this.
<P></P>
<DT><STRONG><A NAME="item_Too_late_for_%22%2DT%22_option">Too late for ``<STRONG>-T</STRONG>'' option</A></STRONG><BR>
<DD>
(X) The #! line (or local equivalent) in a Perl script contains the
<STRONG>-T</STRONG> option, but Perl was not invoked with <STRONG>-T</STRONG> in its argument
list. This is an error because, by the time Perl discovers a <STRONG>-T</STRONG> in
a script, it's too late to properly taint everything from the
environment. So Perl gives up.
<P></P>
<DT><STRONG><A NAME="item_untie_attempted_while_%25d_inner_references_still_">untie attempted while %d inner references still exist</A></STRONG><BR>
<DD>
(W) A copy of the object returned from <A HREF="../../lib/Pod/perlfunc.html#item_tie"><CODE>tie</CODE></A> (or <A HREF="../../lib/Pod/perlfunc.html#item_tied"><CODE>tied</CODE></A>) was still
valid when <A HREF="../../lib/Pod/perlfunc.html#item_untie"><CODE>untie</CODE></A> was called.
<P></P>
<DT><STRONG><A NAME="item_Unrecognized_character_%25s">Unrecognized character %s</A></STRONG><BR>
<DD>
(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.
<P></P>
<DT><STRONG><A NAME="item_Unsupported_function_fork">Unsupported function fork</A></STRONG><BR>
<DD>
(F) Your version of executable does not support forking.
<P>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 <CODE>perl_</CODE>, <CODE>perl__</CODE>, and so on.</P>
<P></P>
<DT><STRONG><A NAME="item_Use_of_%22%24%24%3Cdigit%3E%22_to_mean_%22%24%7B%2">Use of ``$$<digit>'' to mean ``${$}<digit>'' is deprecated</A></STRONG><BR>
<DD>
(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.
<P>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 ``$$<digit>'' 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.</P>
<P></P>
<DT><STRONG><A NAME="item_defined">Value of %s can be ``0''; test with <CODE>defined()</CODE></A></STRONG><BR>
<DD>
(W) In a conditional expression, you used <HANDLE>, <*> (glob), <A HREF="../../lib/Pod/perlfunc.html#item_each"><CODE>each()</CODE></A>,
or <A HREF="../../lib/Pod/perlfunc.html#item_readdir"><CODE>readdir()</CODE></A> 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 <A HREF="#item_defined"><CODE>defined</CODE></A> operator.
<P></P>
<DT><STRONG><A NAME="item_Variable_%22%25s%22_may_be_unavailable">Variable ``%s'' may be unavailable</A></STRONG><BR>
<DD>
(W) An inner (nested) <EM>anonymous</EM> subroutine is inside a <EM>named</EM>
subroutine, and outside that is another subroutine; and the anonymous
(innermost) subroutine is referencing a lexical variable defined in
the outermost subroutine. For example:
<PRE>
sub outermost { my $a; sub middle { sub { $a } } }</PRE>
<P>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.</P>
<P>In these circumstances, it is usually best to make the middle
subroutine anonymous, using the <A HREF="../../lib/Pod/perlfunc.html#item_sub"><CODE>sub {}</CODE></A> syntax. Perl has specific
support for shared variables in nested anonymous subroutines; a named
subroutine in between interferes with this feature.</P>
<P></P>
<DT><STRONG><A NAME="item_Variable_%22%25s%22_will_not_stay_shared">Variable ``%s'' will not stay shared</A></STRONG><BR>
<DD>
(W) An inner (nested) <EM>named</EM> subroutine is referencing a lexical
variable defined in an outer subroutine.
<P>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.</P>
<P>Furthermore, if the outer subroutine is anonymous and references a
lexical variable outside itself, then the outer and inner subroutines
will <EM>never</EM> share the given variable.</P>
<P>This problem can usually be solved by making the inner subroutine
anonymous, using the <A HREF="../../lib/Pod/perlfunc.html#item_sub"><CODE>sub {}</CODE></A> 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