1N/A=head1 NAME
1N/A
1N/Aperl56delta - what's new for perl v5.6.0
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis document describes differences between the 5.005 release and the 5.6.0
1N/Arelease.
1N/A
1N/A=head1 Core Enhancements
1N/A
1N/A=head2 Interpreter cloning, threads, and concurrency
1N/A
1N/APerl 5.6.0 introduces the beginnings of support for running multiple
1N/Ainterpreters concurrently in different threads. In conjunction with
1N/Athe perl_clone() API call, which can be used to selectively duplicate
1N/Athe state of any given interpreter, it is possible to compile a
1N/Apiece of code once in an interpreter, clone that interpreter
1N/Aone or more times, and run all the resulting interpreters in distinct
1N/Athreads.
1N/A
1N/AOn the Windows platform, this feature is used to emulate fork() at the
1N/Ainterpreter level. See L<perlfork> for details about that.
1N/A
1N/AThis feature is still in evolution. It is eventually meant to be used
1N/Ato selectively clone a subroutine and data reachable from that
1N/Asubroutine in a separate interpreter and run the cloned subroutine
1N/Ain a separate thread. Since there is no shared data between the
1N/Ainterpreters, little or no locking will be needed (unless parts of
1N/Athe symbol table are explicitly shared). This is obviously intended
1N/Ato be an easy-to-use replacement for the existing threads support.
1N/A
1N/ASupport for cloning interpreters and interpreter concurrency can be
1N/Aenabled using the -Dusethreads Configure option (see win32/Makefile for
1N/Ahow to enable it on Windows.) The resulting perl executable will be
1N/Afunctionally identical to one that was built with -Dmultiplicity, but
1N/Athe perl_clone() API call will only be available in the former.
1N/A
1N/A-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn
1N/Aenables Perl source code changes that provide a clear separation between
1N/Athe op tree and the data it operates with. The former is immutable, and
1N/Acan therefore be shared between an interpreter and all of its clones,
1N/Awhile the latter is considered local to each interpreter, and is therefore
1N/Acopied for each clone.
1N/A
1N/ANote that building Perl with the -Dusemultiplicity Configure option
1N/Ais adequate if you wish to run multiple B<independent> interpreters
1N/Aconcurrently in different threads. -Dusethreads only provides the
1N/Aadditional functionality of the perl_clone() API call and other
1N/Asupport for running B<cloned> interpreters concurrently.
1N/A
1N/A NOTE: This is an experimental feature. Implementation details are
1N/A subject to change.
1N/A
1N/A=head2 Lexically scoped warning categories
1N/A
1N/AYou can now control the granularity of warnings emitted by perl at a finer
1N/Alevel using the C<use warnings> pragma. L<warnings> and L<perllexwarn>
1N/Ahave copious documentation on this feature.
1N/A
1N/A=head2 Unicode and UTF-8 support
1N/A
1N/APerl now uses UTF-8 as its internal representation for character
1N/Astrings. The C<utf8> and C<bytes> pragmas are used to control this support
1N/Ain the current lexical scope. See L<perlunicode>, L<utf8> and L<bytes> for
1N/Amore information.
1N/A
1N/AThis feature is expected to evolve quickly to support some form of I/O
1N/Adisciplines that can be used to specify the kind of input and output data
1N/A(bytes or characters). Until that happens, additional modules from CPAN
1N/Awill be needed to complete the toolkit for dealing with Unicode.
1N/A
1N/A NOTE: This should be considered an experimental feature. Implementation
1N/A details are subject to change.
1N/A
1N/A=head2 Support for interpolating named characters
1N/A
1N/AThe new C<\N> escape interpolates named characters within strings.
1N/AFor example, C<"Hi! \N{WHITE SMILING FACE}"> evaluates to a string
1N/Awith a unicode smiley face at the end.
1N/A
1N/A=head2 "our" declarations
1N/A
1N/AAn "our" declaration introduces a value that can be best understood
1N/Aas a lexically scoped symbolic alias to a global variable in the
1N/Apackage that was current where the variable was declared. This is
1N/Amostly useful as an alternative to the C<vars> pragma, but also provides
1N/Athe opportunity to introduce typing and other attributes for such
1N/Avariables. See L<perlfunc/our>.
1N/A
1N/A=head2 Support for strings represented as a vector of ordinals
1N/A
1N/ALiterals of the form C<v1.2.3.4> are now parsed as a string composed
1N/Aof characters with the specified ordinals. This is an alternative, more
1N/Areadable way to construct (possibly unicode) strings instead of
1N/Ainterpolating characters, as in C<"\x{1}\x{2}\x{3}\x{4}">. The leading
1N/AC<v> may be omitted if there are more than two ordinals, so C<1.2.3> is
1N/Aparsed the same as C<v1.2.3>.
1N/A
1N/AStrings written in this form are also useful to represent version "numbers".
1N/AIt is easy to compare such version "numbers" (which are really just plain
1N/Astrings) using any of the usual string comparison operators C<eq>, C<ne>,
1N/AC<lt>, C<gt>, etc., or perform bitwise string operations on them using C<|>,
1N/AC<&>, etc.
1N/A
1N/AIn conjunction with the new C<$^V> magic variable (which contains
1N/Athe perl version as a string), such literals can be used as a readable way
1N/Ato check if you're running a particular version of Perl:
1N/A
1N/A # this will parse in older versions of Perl also
1N/A if ($^V and $^V gt v5.6.0) {
1N/A # new features supported
1N/A }
1N/A
1N/AC<require> and C<use> also have some special magic to support such
1N/Aliterals, but this particular usage should be avoided because it leads to
1N/Amisleading error messages under versions of Perl which don't support vector
1N/Astrings. Using a true version number will ensure correct behavior in all
1N/Aversions of Perl:
1N/A
1N/A require 5.006; # run time check for v5.6
1N/A use 5.006_001; # compile time check for v5.6.1
1N/A
1N/AAlso, C<sprintf> and C<printf> support the Perl-specific format flag C<%v>
1N/Ato print ordinals of characters in arbitrary strings:
1N/A
1N/A printf "v%vd", $^V; # prints current version, such as "v5.5.650"
1N/A printf "%*vX", ":", $addr; # formats IPv6 address
1N/A printf "%*vb", " ", $bits; # displays bitstring
1N/A
1N/ASee L<perldata/"Scalar value constructors"> for additional information.
1N/A
1N/A=head2 Improved Perl version numbering system
1N/A
1N/ABeginning with Perl version 5.6.0, the version number convention has been
1N/Achanged to a "dotted integer" scheme that is more commonly found in open
1N/Asource projects.
1N/A
1N/AMaintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc.
1N/AThe next development series following v5.6.0 will be numbered v5.7.x,
1N/Abeginning with v5.7.0, and the next major production release following
1N/Av5.6.0 will be v5.8.0.
1N/A
1N/AThe English module now sets $PERL_VERSION to $^V (a string value) rather
1N/Athan C<$]> (a numeric value). (This is a potential incompatibility.
1N/ASend us a report via perlbug if you are affected by this.)
1N/A
1N/AThe v1.2.3 syntax is also now legal in Perl.
1N/ASee L<Support for strings represented as a vector of ordinals> for more on that.
1N/A
1N/ATo cope with the new versioning system's use of at least three significant
1N/Adigits for each version component, the method used for incrementing the
1N/Asubversion number has also changed slightly. We assume that versions older
1N/Athan v5.6.0 have been incrementing the subversion component in multiples of
1N/A10. Versions after v5.6.0 will increment them by 1. Thus, using the new
1N/Anotation, 5.005_03 is the "same" as v5.5.30, and the first maintenance
1N/Aversion following v5.6.0 will be v5.6.1 (which should be read as being
1N/Aequivalent to a floating point value of 5.006_001 in the older format,
1N/Astored in C<$]>).
1N/A
1N/A=head2 New syntax for declaring subroutine attributes
1N/A
1N/AFormerly, if you wanted to mark a subroutine as being a method call or
1N/Aas requiring an automatic lock() when it is entered, you had to declare
1N/Athat with a C<use attrs> pragma in the body of the subroutine.
1N/AThat can now be accomplished with declaration syntax, like this:
1N/A
1N/A sub mymethod : locked method ;
1N/A ...
1N/A sub mymethod : locked method {
1N/A ...
1N/A }
1N/A
1N/A sub othermethod :locked :method ;
1N/A ...
1N/A sub othermethod :locked :method {
1N/A ...
1N/A }
1N/A
1N/A
1N/A(Note how only the first C<:> is mandatory, and whitespace surrounding
1N/Athe C<:> is optional.)
1N/A
1N/AF<AutoSplit.pm> and F<SelfLoader.pm> have been updated to keep the attributes
1N/Awith the stubs they provide. See L<attributes>.
1N/A
1N/A=head2 File and directory handles can be autovivified
1N/A
1N/ASimilar to how constructs such as C<< $x->[0] >> autovivify a reference,
1N/Ahandle constructors (open(), opendir(), pipe(), socketpair(), sysopen(),
1N/Asocket(), and accept()) now autovivify a file or directory handle
1N/Aif the handle passed to them is an uninitialized scalar variable. This
1N/Aallows the constructs such as C<open(my $fh, ...)> and C<open(local $fh,...)>
1N/Ato be used to create filehandles that will conveniently be closed
1N/Aautomatically when the scope ends, provided there are no other references
1N/Ato them. This largely eliminates the need for typeglobs when opening
1N/Afilehandles that must be passed around, as in the following example:
1N/A
1N/A sub myopen {
1N/A open my $fh, "@_"
1N/A or die "Can't open '@_': $!";
1N/A return $fh;
1N/A }
1N/A
1N/A {
1N/A my $f = myopen("</etc/motd");
1N/A print <$f>;
1N/A # $f implicitly closed here
1N/A }
1N/A
1N/A=head2 open() with more than two arguments
1N/A
1N/AIf open() is passed three arguments instead of two, the second argument
1N/Ais used as the mode and the third argument is taken to be the file name.
1N/AThis is primarily useful for protecting against unintended magic behavior
1N/Aof the traditional two-argument form. See L<perlfunc/open>.
1N/A
1N/A=head2 64-bit support
1N/A
1N/AAny platform that has 64-bit integers either
1N/A
1N/A (1) natively as longs or ints
1N/A (2) via special compiler flags
1N/A (3) using long long or int64_t
1N/A
1N/Ais able to use "quads" (64-bit integers) as follows:
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/Aconstants (decimal, hexadecimal, octal, binary) in the code
1N/A
1N/A=item *
1N/A
1N/Aarguments to oct() and hex()
1N/A
1N/A=item *
1N/A
1N/Aarguments to print(), printf() and sprintf() (flag prefixes ll, L, q)
1N/A
1N/A=item *
1N/A
1N/Aprinted as such
1N/A
1N/A=item *
1N/A
1N/Apack() and unpack() "q" and "Q" formats
1N/A
1N/A=item *
1N/A
1N/Ain basic arithmetics: + - * / % (NOTE: operating close to the limits
1N/Aof the integer values may produce surprising results)
1N/A
1N/A=item *
1N/A
1N/Ain bit arithmetics: & | ^ ~ << >> (NOTE: these used to be forced
1N/Ato be 32 bits wide but now operate on the full native width.)
1N/A
1N/A=item *
1N/A
1N/Avec()
1N/A
1N/A=back
1N/A
1N/ANote that unless you have the case (a) you will have to configure
1N/Aand compile Perl using the -Duse64bitint Configure flag.
1N/A
1N/A NOTE: The Configure flags -Duselonglong and -Duse64bits have been
1N/A deprecated. Use -Duse64bitint instead.
1N/A
1N/AThere are actually two modes of 64-bitness: the first one is achieved
1N/Ausing Configure -Duse64bitint and the second one using Configure
1N/A-Duse64bitall. The difference is that the first one is minimal and
1N/Athe second one maximal. The first works in more places than the second.
1N/A
1N/AThe C<use64bitint> does only as much as is required to get 64-bit
1N/Aintegers into Perl (this may mean, for example, using "long longs")
1N/Awhile your memory may still be limited to 2 gigabytes (because your
1N/Apointers could still be 32-bit). Note that the name C<64bitint> does
1N/Anot imply that your C compiler will be using 64-bit C<int>s (it might,
1N/Abut it doesn't have to): the C<use64bitint> means that you will be
1N/Aable to have 64 bits wide scalar values.
1N/A
1N/AThe C<use64bitall> goes all the way by attempting to switch also
1N/Aintegers (if it can), longs (and pointers) to being 64-bit. This may
1N/Acreate an even more binary incompatible Perl than -Duse64bitint: the
1N/Aresulting executable may not run at all in a 32-bit box, or you may
1N/Ahave to reboot/reconfigure/rebuild your operating system to be 64-bit
1N/Aaware.
1N/A
1N/ANatively 64-bit systems like Alpha and Cray need neither -Duse64bitint
1N/Anor -Duse64bitall.
1N/A
1N/ALast but not least: note that due to Perl's habit of always using
1N/Afloating point numbers, the quads are still not true integers.
1N/AWhen quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
1N/A-9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
1N/Aare silently promoted to floating point numbers, after which they will
1N/Astart losing precision (in their lower digits).
1N/A
1N/A NOTE: 64-bit support is still experimental on most platforms.
1N/A Existing support only covers the LP64 data model. In particular, the
1N/A LLP64 data model is not yet supported. 64-bit libraries and system
1N/A APIs on many platforms have not stabilized--your mileage may vary.
1N/A
1N/A=head2 Large file support
1N/A
1N/AIf you have filesystems that support "large files" (files larger than
1N/A2 gigabytes), you may now also be able to create and access them from
1N/APerl.
1N/A
1N/A NOTE: The default action is to enable large file support, if
1N/A available on the platform.
1N/A
1N/AIf the large file support is on, and you have a Fcntl constant
1N/AO_LARGEFILE, the O_LARGEFILE is automatically added to the flags
1N/Aof sysopen().
1N/A
1N/ABeware that unless your filesystem also supports "sparse files" seeking
1N/Ato umpteen petabytes may be inadvisable.
1N/A
1N/ANote that in addition to requiring a proper file system to do large
1N/Afiles you may also need to adjust your per-process (or your
1N/Aper-system, or per-process-group, or per-user-group) maximum filesize
1N/Alimits before running Perl scripts that try to handle large files,
1N/Aespecially if you intend to write such files.
1N/A
1N/AFinally, in addition to your process/process group maximum filesize
1N/Alimits, you may have quota limits on your filesystems that stop you
1N/A(your user id or your user group id) from using large files.
1N/A
1N/AAdjusting your process/user/group/file system/operating system limits
1N/Ais outside the scope of Perl core language. For process limits, you
1N/Amay try increasing the limits using your shell's limits/limit/ulimit
1N/Acommand before running Perl. The BSD::Resource extension (not
1N/Aincluded with the standard Perl distribution) may also be of use, it
1N/Aoffers the getrlimit/setrlimit interface that can be used to adjust
1N/Aprocess resource usage limits, including the maximum filesize limit.
1N/A
1N/A=head2 Long doubles
1N/A
1N/AIn some systems you may be able to use long doubles to enhance the
1N/Arange and precision of your double precision floating point numbers
1N/A(that is, Perl's numbers). Use Configure -Duselongdouble to enable
1N/Athis support (if it is available).
1N/A
1N/A=head2 "more bits"
1N/A
1N/AYou can "Configure -Dusemorebits" to turn on both the 64-bit support
1N/Aand the long double support.
1N/A
1N/A=head2 Enhanced support for sort() subroutines
1N/A
1N/APerl subroutines with a prototype of C<($$)>, and XSUBs in general, can
1N/Anow be used as sort subroutines. In either case, the two elements to
1N/Abe compared are passed as normal parameters in @_. See L<perlfunc/sort>.
1N/A
1N/AFor unprototyped sort subroutines, the historical behavior of passing
1N/Athe elements to be compared as the global variables $a and $b remains
1N/Aunchanged.
1N/A
1N/A=head2 C<sort $coderef @foo> allowed
1N/A
1N/Asort() did not accept a subroutine reference as the comparison
1N/Afunction in earlier versions. This is now permitted.
1N/A
1N/A=head2 File globbing implemented internally
1N/A
1N/APerl now uses the File::Glob implementation of the glob() operator
1N/Aautomatically. This avoids using an external csh process and the
1N/Aproblems associated with it.
1N/A
1N/A NOTE: This is currently an experimental feature. Interfaces and
1N/A implementation are subject to change.
1N/A
1N/A=head2 Support for CHECK blocks
1N/A
1N/AIn addition to C<BEGIN>, C<INIT>, C<END>, C<DESTROY> and C<AUTOLOAD>,
1N/Asubroutines named C<CHECK> are now special. These are queued up during
1N/Acompilation and behave similar to END blocks, except they are called at
1N/Athe end of compilation rather than at the end of execution. They cannot
1N/Abe called directly.
1N/A
1N/A=head2 POSIX character class syntax [: :] supported
1N/A
1N/AFor example to match alphabetic characters use /[[:alpha:]]/.
1N/ASee L<perlre> for details.
1N/A
1N/A=head2 Better pseudo-random number generator
1N/A
1N/AIn 5.005_0x and earlier, perl's rand() function used the C library
1N/Arand(3) function. As of 5.005_52, Configure tests for drand48(),
1N/Arandom(), and rand() (in that order) and picks the first one it finds.
1N/A
1N/AThese changes should result in better random numbers from rand().
1N/A
1N/A=head2 Improved C<qw//> operator
1N/A
1N/AThe C<qw//> operator is now evaluated at compile time into a true list
1N/Ainstead of being replaced with a run time call to C<split()>. This
1N/Aremoves the confusing misbehaviour of C<qw//> in scalar context, which
1N/Ahad inherited that behaviour from split().
1N/A
1N/AThus:
1N/A
1N/A $foo = ($bar) = qw(a b c); print "$foo|$bar\n";
1N/A
1N/Anow correctly prints "3|a", instead of "2|a".
1N/A
1N/A=head2 Better worst-case behavior of hashes
1N/A
1N/ASmall changes in the hashing algorithm have been implemented in
1N/Aorder to improve the distribution of lower order bits in the
1N/Ahashed value. This is expected to yield better performance on
1N/Akeys that are repeated sequences.
1N/A
1N/A=head2 pack() format 'Z' supported
1N/A
1N/AThe new format type 'Z' is useful for packing and unpacking null-terminated
1N/Astrings. See L<perlfunc/"pack">.
1N/A
1N/A=head2 pack() format modifier '!' supported
1N/A
1N/AThe new format type modifier '!' is useful for packing and unpacking
1N/Anative shorts, ints, and longs. See L<perlfunc/"pack">.
1N/A
1N/A=head2 pack() and unpack() support counted strings
1N/A
1N/AThe template character '/' can be used to specify a counted string
1N/Atype to be packed or unpacked. See L<perlfunc/"pack">.
1N/A
1N/A=head2 Comments in pack() templates
1N/A
1N/AThe '#' character in a template introduces a comment up to
1N/Aend of the line. This facilitates documentation of pack()
1N/Atemplates.
1N/A
1N/A=head2 Weak references
1N/A
1N/AIn previous versions of Perl, you couldn't cache objects so as
1N/Ato allow them to be deleted if the last reference from outside
1N/Athe cache is deleted. The reference in the cache would hold a
1N/Areference count on the object and the objects would never be
1N/Adestroyed.
1N/A
1N/AAnother familiar problem is with circular references. When an
1N/Aobject references itself, its reference count would never go
1N/Adown to zero, and it would not get destroyed until the program
1N/Ais about to exit.
1N/A
1N/AWeak references solve this by allowing you to "weaken" any
1N/Areference, that is, make it not count towards the reference count.
1N/AWhen the last non-weak reference to an object is deleted, the object
1N/Ais destroyed and all the weak references to the object are
1N/Aautomatically undef-ed.
1N/A
1N/ATo use this feature, you need the Devel::WeakRef package from CPAN, which
1N/Acontains additional documentation.
1N/A
1N/A NOTE: This is an experimental feature. Details are subject to change.
1N/A
1N/A=head2 Binary numbers supported
1N/A
1N/ABinary numbers are now supported as literals, in s?printf formats, and
1N/AC<oct()>:
1N/A
1N/A $answer = 0b101010;
1N/A printf "The answer is: %b\n", oct("0b101010");
1N/A
1N/A=head2 Lvalue subroutines
1N/A
1N/ASubroutines can now return modifiable lvalues.
1N/ASee L<perlsub/"Lvalue subroutines">.
1N/A
1N/A NOTE: This is an experimental feature. Details are subject to change.
1N/A
1N/A=head2 Some arrows may be omitted in calls through references
1N/A
1N/APerl now allows the arrow to be omitted in many constructs
1N/Ainvolving subroutine calls through references. For example,
1N/AC<< $foo[10]->('foo') >> may now be written C<$foo[10]('foo')>.
1N/AThis is rather similar to how the arrow may be omitted from
1N/AC<< $foo[10]->{'foo'} >>. Note however, that the arrow is still
1N/Arequired for C<< foo(10)->('bar') >>.
1N/A
1N/A=head2 Boolean assignment operators are legal lvalues
1N/A
1N/AConstructs such as C<($a ||= 2) += 1> are now allowed.
1N/A
1N/A=head2 exists() is supported on subroutine names
1N/A
1N/AThe exists() builtin now works on subroutine names. A subroutine
1N/Ais considered to exist if it has been declared (even if implicitly).
1N/ASee L<perlfunc/exists> for examples.
1N/A
1N/A=head2 exists() and delete() are supported on array elements
1N/A
1N/AThe exists() and delete() builtins now work on simple arrays as well.
1N/AThe behavior is similar to that on hash elements.
1N/A
1N/Aexists() can be used to check whether an array element has been
1N/Ainitialized. This avoids autovivifying array elements that don't exist.
1N/AIf the array is tied, the EXISTS() method in the corresponding tied
1N/Apackage will be invoked.
1N/A
1N/Adelete() may be used to remove an element from the array and return
1N/Ait. The array element at that position returns to its uninitialized
1N/Astate, so that testing for the same element with exists() will return
1N/Afalse. If the element happens to be the one at the end, the size of
1N/Athe array also shrinks up to the highest element that tests true for
1N/Aexists(), or 0 if none such is found. If the array is tied, the DELETE()
1N/Amethod in the corresponding tied package will be invoked.
1N/A
1N/ASee L<perlfunc/exists> and L<perlfunc/delete> for examples.
1N/A
1N/A=head2 Pseudo-hashes work better
1N/A
1N/ADereferencing some types of reference values in a pseudo-hash,
1N/Asuch as C<< $ph->{foo}[1] >>, was accidentally disallowed. This has
1N/Abeen corrected.
1N/A
1N/AWhen applied to a pseudo-hash element, exists() now reports whether
1N/Athe specified value exists, not merely if the key is valid.
1N/A
1N/Adelete() now works on pseudo-hashes. When given a pseudo-hash element
1N/Aor slice it deletes the values corresponding to the keys (but not the keys
1N/Athemselves). See L<perlref/"Pseudo-hashes: Using an array as a hash">.
1N/A
1N/APseudo-hash slices with constant keys are now optimized to array lookups
1N/Aat compile-time.
1N/A
1N/AList assignments to pseudo-hash slices are now supported.
1N/A
1N/AThe C<fields> pragma now provides ways to create pseudo-hashes, via
1N/Afields::new() and fields::phash(). See L<fields>.
1N/A
1N/A NOTE: The pseudo-hash data type continues to be experimental.
1N/A Limiting oneself to the interface elements provided by the
1N/A fields pragma will provide protection from any future changes.
1N/A
1N/A=head2 Automatic flushing of output buffers
1N/A
1N/Afork(), exec(), system(), qx//, and pipe open()s now flush buffers
1N/Aof all files opened for output when the operation was attempted. This
1N/Amostly eliminates confusing buffering mishaps suffered by users unaware
1N/Aof how Perl internally handles I/O.
1N/A
1N/AThis is not supported on some platforms like Solaris where a suitably
1N/Acorrect implementation of fflush(NULL) isn't available.
1N/A
1N/A=head2 Better diagnostics on meaningless filehandle operations
1N/A
1N/AConstructs such as C<< open(<FH>) >> and C<< close(<FH>) >>
1N/Aare compile time errors. Attempting to read from filehandles that
1N/Awere opened only for writing will now produce warnings (just as
1N/Awriting to read-only filehandles does).
1N/A
1N/A=head2 Where possible, buffered data discarded from duped input filehandle
1N/A
1N/AC<< open(NEW, "<&OLD") >> now attempts to discard any data that
1N/Awas previously read and buffered in C<OLD> before duping the handle.
1N/AOn platforms where doing this is allowed, the next read operation
1N/Aon C<NEW> will return the same data as the corresponding operation
1N/Aon C<OLD>. Formerly, it would have returned the data from the start
1N/Aof the following disk block instead.
1N/A
1N/A=head2 eof() has the same old magic as <>
1N/A
1N/AC<eof()> would return true if no attempt to read from C<< <> >> had
1N/Ayet been made. C<eof()> has been changed to have a little magic of its
1N/Aown, it now opens the C<< <> >> files.
1N/A
1N/A=head2 binmode() can be used to set :crlf and :raw modes
1N/A
1N/Abinmode() now accepts a second argument that specifies a discipline
1N/Afor the handle in question. The two pseudo-disciplines ":raw" and
1N/A":crlf" are currently supported on DOS-derivative platforms.
1N/ASee L<perlfunc/"binmode"> and L<open>.
1N/A
1N/A=head2 C<-T> filetest recognizes UTF-8 encoded files as "text"
1N/A
1N/AThe algorithm used for the C<-T> filetest has been enhanced to
1N/Acorrectly identify UTF-8 content as "text".
1N/A
1N/A=head2 system(), backticks and pipe open now reflect exec() failure
1N/A
1N/AOn Unix and similar platforms, system(), qx() and open(FOO, "cmd |")
1N/Aetc., are implemented via fork() and exec(). When the underlying
1N/Aexec() fails, earlier versions did not report the error properly,
1N/Asince the exec() happened to be in a different process.
1N/A
1N/AThe child process now communicates with the parent about the
1N/Aerror in launching the external command, which allows these
1N/Aconstructs to return with their usual error value and set $!.
1N/A
1N/A=head2 Improved diagnostics
1N/A
1N/ALine numbers are no longer suppressed (under most likely circumstances)
1N/Aduring the global destruction phase.
1N/A
1N/ADiagnostics emitted from code running in threads other than the main
1N/Athread are now accompanied by the thread ID.
1N/A
1N/AEmbedded null characters in diagnostics now actually show up. They
1N/Aused to truncate the message in prior versions.
1N/A
1N/A$foo::a and $foo::b are now exempt from "possible typo" warnings only
1N/Aif sort() is encountered in package C<foo>.
1N/A
1N/AUnrecognized alphabetic escapes encountered when parsing quote
1N/Aconstructs now generate a warning, since they may take on new
1N/Asemantics in later versions of Perl.
1N/A
1N/AMany diagnostics now report the internal operation in which the warning
1N/Awas provoked, like so:
1N/A
1N/A Use of uninitialized value in concatenation (.) at (eval 1) line 1.
1N/A Use of uninitialized value in print at (eval 1) line 1.
1N/A
1N/ADiagnostics that occur within eval may also report the file and line
1N/Anumber where the eval is located, in addition to the eval sequence
1N/Anumber and the line number within the evaluated text itself. For
1N/Aexample:
1N/A
1N/A Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF
1N/A
1N/A=head2 Diagnostics follow STDERR
1N/A
1N/ADiagnostic output now goes to whichever file the C<STDERR> handle
1N/Ais pointing at, instead of always going to the underlying C runtime
1N/Alibrary's C<stderr>.
1N/A
1N/A=head2 More consistent close-on-exec behavior
1N/A
1N/AOn systems that support a close-on-exec flag on filehandles, the
1N/Aflag is now set for any handles created by pipe(), socketpair(),
1N/Asocket(), and accept(), if that is warranted by the value of $^F
1N/Athat may be in effect. Earlier versions neglected to set the flag
1N/Afor handles created with these operators. See L<perlfunc/pipe>,
1N/AL<perlfunc/socketpair>, L<perlfunc/socket>, L<perlfunc/accept>,
1N/Aand L<perlvar/$^F>.
1N/A
1N/A=head2 syswrite() ease-of-use
1N/A
1N/AThe length argument of C<syswrite()> has become optional.
1N/A
1N/A=head2 Better syntax checks on parenthesized unary operators
1N/A
1N/AExpressions such as:
1N/A
1N/A print defined(&foo,&bar,&baz);
1N/A print uc("foo","bar","baz");
1N/A undef($foo,&bar);
1N/A
1N/Aused to be accidentally allowed in earlier versions, and produced
1N/Aunpredictable behaviour. Some produced ancillary warnings
1N/Awhen used in this way; others silently did the wrong thing.
1N/A
1N/AThe parenthesized forms of most unary operators that expect a single
1N/Aargument now ensure that they are not called with more than one
1N/Aargument, making the cases shown above syntax errors. The usual
1N/Abehaviour of:
1N/A
1N/A print defined &foo, &bar, &baz;
1N/A print uc "foo", "bar", "baz";
1N/A undef $foo, &bar;
1N/A
1N/Aremains unchanged. See L<perlop>.
1N/A
1N/A=head2 Bit operators support full native integer width
1N/A
1N/AThe bit operators (& | ^ ~ << >>) now operate on the full native
1N/Aintegral width (the exact size of which is available in $Config{ivsize}).
1N/AFor example, if your platform is either natively 64-bit or if Perl
1N/Ahas been configured to use 64-bit integers, these operations apply
1N/Ato 8 bytes (as opposed to 4 bytes on 32-bit platforms).
1N/AFor portability, be sure to mask off the excess bits in the result of
1N/Aunary C<~>, e.g., C<~$x & 0xffffffff>.
1N/A
1N/A=head2 Improved security features
1N/A
1N/AMore potentially unsafe operations taint their results for improved
1N/Asecurity.
1N/A
1N/AThe C<passwd> and C<shell> fields returned by the getpwent(), getpwnam(),
1N/Aand getpwuid() are now tainted, because the user can affect their own
1N/Aencrypted password and login shell.
1N/A
1N/AThe variable modified by shmread(), and messages returned by msgrcv()
1N/A(and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted,
1N/Abecause other untrusted processes can modify messages and shared memory
1N/Asegments for their own nefarious purposes.
1N/A
1N/A=head2 More functional bareword prototype (*)
1N/A
1N/ABareword prototypes have been rationalized to enable them to be used
1N/Ato override builtins that accept barewords and interpret them in
1N/Aa special way, such as C<require> or C<do>.
1N/A
1N/AArguments prototyped as C<*> will now be visible within the subroutine
1N/Aas either a simple scalar or as a reference to a typeglob.
1N/ASee L<perlsub/Prototypes>.
1N/A
1N/A=head2 C<require> and C<do> may be overridden
1N/A
1N/AC<require> and C<do 'file'> operations may be overridden locally
1N/Aby importing subroutines of the same name into the current package
1N/A(or globally by importing them into the CORE::GLOBAL:: namespace).
1N/AOverriding C<require> will also affect C<use>, provided the override
1N/Ais visible at compile-time.
1N/ASee L<perlsub/"Overriding Built-in Functions">.
1N/A
1N/A=head2 $^X variables may now have names longer than one character
1N/A
1N/AFormerly, $^X was synonymous with ${"\cX"}, but $^XY was a syntax
1N/Aerror. Now variable names that begin with a control character may be
1N/Aarbitrarily long. However, for compatibility reasons, these variables
1N/AI<must> be written with explicit braces, as C<${^XY}> for example.
1N/AC<${^XYZ}> is synonymous with ${"\cXYZ"}. Variable names with more
1N/Athan one control character, such as C<${^XY^Z}>, are illegal.
1N/A
1N/AThe old syntax has not changed. As before, `^X' may be either a
1N/Aliteral control-X character or the two-character sequence `caret' plus
1N/A`X'. When braces are omitted, the variable name stops after the
1N/Acontrol character. Thus C<"$^XYZ"> continues to be synonymous with
1N/AC<$^X . "YZ"> as before.
1N/A
1N/AAs before, lexical variables may not have names beginning with control
1N/Acharacters. As before, variables whose names begin with a control
1N/Acharacter are always forced to be in package `main'. All such variables
1N/Aare reserved for future extensions, except those that begin with
1N/AC<^_>, which may be used by user programs and are guaranteed not to
1N/Aacquire special meaning in any future version of Perl.
1N/A
1N/A=head2 New variable $^C reflects C<-c> switch
1N/A
1N/AC<$^C> has a boolean value that reflects whether perl is being run
1N/Ain compile-only mode (i.e. via the C<-c> switch). Since
1N/ABEGIN blocks are executed under such conditions, this variable
1N/Aenables perl code to determine whether actions that make sense
1N/Aonly during normal running are warranted. See L<perlvar>.
1N/A
1N/A=head2 New variable $^V contains Perl version as a string
1N/A
1N/AC<$^V> contains the Perl version number as a string composed of
1N/Acharacters whose ordinals match the version numbers, i.e. v5.6.0.
1N/AThis may be used in string comparisons.
1N/A
1N/ASee C<Support for strings represented as a vector of ordinals> for an
1N/Aexample.
1N/A
1N/A=head2 Optional Y2K warnings
1N/A
1N/AIf Perl is built with the cpp macro C<PERL_Y2KWARN> defined,
1N/Ait emits optional warnings when concatenating the number 19
1N/Awith another number.
1N/A
1N/AThis behavior must be specifically enabled when running Configure.
1N/ASee F<INSTALL> and F<README.Y2K>.
1N/A
1N/A=head2 Arrays now always interpolate into double-quoted strings
1N/A
1N/AIn double-quoted strings, arrays now interpolate, no matter what. The
1N/Abehavior in earlier versions of perl 5 was that arrays would interpolate
1N/Ainto strings if the array had been mentioned before the string was
1N/Acompiled, and otherwise Perl would raise a fatal compile-time error.
1N/AIn versions 5.000 through 5.003, the error was
1N/A
1N/A Literal @example now requires backslash
1N/A
1N/AIn versions 5.004_01 through 5.6.0, the error was
1N/A
1N/A In string, @example now must be written as \@example
1N/A
1N/AThe idea here was to get people into the habit of writing
1N/AC<"fred\@example.com"> when they wanted a literal C<@> sign, just as
1N/Athey have always written C<"Give me back my \$5"> when they wanted a
1N/Aliteral C<$> sign.
1N/A
1N/AStarting with 5.6.1, when Perl now sees an C<@> sign in a
1N/Adouble-quoted string, it I<always> attempts to interpolate an array,
1N/Aregardless of whether or not the array has been used or declared
1N/Aalready. The fatal error has been downgraded to an optional warning:
1N/A
1N/A Possible unintended interpolation of @example in string
1N/A
1N/AThis warns you that C<"fred@example.com"> is going to turn into
1N/AC<fred.com> if you don't backslash the C<@>.
1N/ASee http://www.plover.com/~mjd/perl/at-error.html for more details
1N/Aabout the history here.
1N/A
1N/A=head1 Modules and Pragmata
1N/A
1N/A=head2 Modules
1N/A
1N/A=over 4
1N/A
1N/A=item attributes
1N/A
1N/AWhile used internally by Perl as a pragma, this module also
1N/Aprovides a way to fetch subroutine and variable attributes.
1N/ASee L<attributes>.
1N/A
1N/A=item B
1N/A
1N/AThe Perl Compiler suite has been extensively reworked for this
1N/Arelease. More of the standard Perl testsuite passes when run
1N/Aunder the Compiler, but there is still a significant way to
1N/Ago to achieve production quality compiled executables.
1N/A
1N/A NOTE: The Compiler suite remains highly experimental. The
1N/A generated code may not be correct, even when it manages to execute
1N/A without errors.
1N/A
1N/A=item Benchmark
1N/A
1N/AOverall, Benchmark results exhibit lower average error and better timing
1N/Aaccuracy.
1N/A
1N/AYou can now run tests for I<n> seconds instead of guessing the right
1N/Anumber of tests to run: e.g., timethese(-5, ...) will run each
1N/Acode for at least 5 CPU seconds. Zero as the "number of repetitions"
1N/Ameans "for at least 3 CPU seconds". The output format has also
1N/Achanged. For example:
1N/A
1N/A use Benchmark;$x=3;timethese(-5,{a=>sub{$x*$x},b=>sub{$x**2}})
1N/A
1N/Awill now output something like this:
1N/A
1N/A Benchmark: running a, b, each for at least 5 CPU seconds...
1N/A a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516)
1N/A b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)
1N/A
1N/ANew features: "each for at least N CPU seconds...", "wallclock secs",
1N/Aand the "@ operations/CPU second (n=operations)".
1N/A
1N/Atimethese() now returns a reference to a hash of Benchmark objects containing
1N/Athe test results, keyed on the names of the tests.
1N/A
1N/Atimethis() now returns the iterations field in the Benchmark result object
1N/Ainstead of 0.
1N/A
1N/Atimethese(), timethis(), and the new cmpthese() (see below) can also take
1N/Aa format specifier of 'none' to suppress output.
1N/A
1N/AA new function countit() is just like timeit() except that it takes a
1N/ATIME instead of a COUNT.
1N/A
1N/AA new function cmpthese() prints a chart comparing the results of each test
1N/Areturned from a timethese() call. For each possible pair of tests, the
1N/Apercentage speed difference (iters/sec or seconds/iter) is shown.
1N/A
1N/AFor other details, see L<Benchmark>.
1N/A
1N/A=item ByteLoader
1N/A
1N/AThe ByteLoader is a dedicated extension to generate and run
1N/APerl bytecode. See L<ByteLoader>.
1N/A
1N/A=item constant
1N/A
1N/AReferences can now be used.
1N/A
1N/AThe new version also allows a leading underscore in constant names, but
1N/Adisallows a double leading underscore (as in "__LINE__"). Some other names
1N/Aare disallowed or warned against, including BEGIN, END, etc. Some names
1N/Awhich were forced into main:: used to fail silently in some cases; now they're
1N/Afatal (outside of main::) and an optional warning (inside of main::).
1N/AThe ability to detect whether a constant had been set with a given name has
1N/Abeen added.
1N/A
1N/ASee L<constant>.
1N/A
1N/A=item charnames
1N/A
1N/AThis pragma implements the C<\N> string escape. See L<charnames>.
1N/A
1N/A=item Data::Dumper
1N/A
1N/AA C<Maxdepth> setting can be specified to avoid venturing
1N/Atoo deeply into deep data structures. See L<Data::Dumper>.
1N/A
1N/AThe XSUB implementation of Dump() is now automatically called if the
1N/AC<Useqq> setting is not in use.
1N/A
1N/ADumping C<qr//> objects works correctly.
1N/A
1N/A=item DB
1N/A
1N/AC<DB> is an experimental module that exposes a clean abstraction
1N/Ato Perl's debugging API.
1N/A
1N/A=item DB_File
1N/A
1N/ADB_File can now be built with Berkeley DB versions 1, 2 or 3.
1N/ASee C<ext/DB_File/Changes>.
1N/A
1N/A=item Devel::DProf
1N/A
1N/ADevel::DProf, a Perl source code profiler has been added. See
1N/AL<Devel::DProf> and L<dprofpp>.
1N/A
1N/A=item Devel::Peek
1N/A
1N/AThe Devel::Peek module provides access to the internal representation
1N/Aof Perl variables and data. It is a data debugging tool for the XS programmer.
1N/A
1N/A=item Dumpvalue
1N/A
1N/AThe Dumpvalue module provides screen dumps of Perl data.
1N/A
1N/A=item DynaLoader
1N/A
1N/ADynaLoader now supports a dl_unload_file() function on platforms that
1N/Asupport unloading shared objects using dlclose().
1N/A
1N/APerl can also optionally arrange to unload all extension shared objects
1N/Aloaded by Perl. To enable this, build Perl with the Configure option
1N/AC<-Accflags=-DDL_UNLOAD_ALL_AT_EXIT>. (This maybe useful if you are
1N/Ausing Apache with mod_perl.)
1N/A
1N/A=item English
1N/A
1N/A$PERL_VERSION now stands for C<$^V> (a string value) rather than for C<$]>
1N/A(a numeric value).
1N/A
1N/A=item Env
1N/A
1N/AEnv now supports accessing environment variables like PATH as array
1N/Avariables.
1N/A
1N/A=item Fcntl
1N/A
1N/AMore Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
1N/Alarge file (more than 4GB) access (NOTE: the O_LARGEFILE is
1N/Aautomatically added to sysopen() flags if large file support has been
1N/Aconfigured, as is the default), Free/Net/OpenBSD locking behaviour
1N/Aflags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
1N/Amask of O_RDONLY, O_WRONLY, and O_RDWR. The seek()/sysseek()
1N/Aconstants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
1N/AC<:seek> tag. The chmod()/stat() S_IF* constants and S_IS* functions
1N/Aare available via the C<:mode> tag.
1N/A
1N/A=item File::Compare
1N/A
1N/AA compare_text() function has been added, which allows custom
1N/Acomparison functions. See L<File::Compare>.
1N/A
1N/A=item File::Find
1N/A
1N/AFile::Find now works correctly when the wanted() function is either
1N/Aautoloaded or is a symbolic reference.
1N/A
1N/AA bug that caused File::Find to lose track of the working directory
1N/Awhen pruning top-level directories has been fixed.
1N/A
1N/AFile::Find now also supports several other options to control its
1N/Abehavior. It can follow symbolic links if the C<follow> option is
1N/Aspecified. Enabling the C<no_chdir> option will make File::Find skip
1N/Achanging the current directory when walking directories. The C<untaint>
1N/Aflag can be useful when running with taint checks enabled.
1N/A
1N/ASee L<File::Find>.
1N/A
1N/A=item File::Glob
1N/A
1N/AThis extension implements BSD-style file globbing. By default,
1N/Ait will also be used for the internal implementation of the glob()
1N/Aoperator. See L<File::Glob>.
1N/A
1N/A=item File::Spec
1N/A
1N/ANew methods have been added to the File::Spec module: devnull() returns
1N/Athe name of the null device (/dev/null on Unix) and tmpdir() the name of
1N/Athe temp directory (normally /tmp on Unix). There are now also methods
1N/Ato convert between absolute and relative filenames: abs2rel() and
1N/Arel2abs(). For compatibility with operating systems that specify volume
1N/Anames in file paths, the splitpath(), splitdir(), and catdir() methods
1N/Ahave been added.
1N/A
1N/A=item File::Spec::Functions
1N/A
1N/AThe new File::Spec::Functions modules provides a function interface
1N/Ato the File::Spec module. Allows shorthand
1N/A
1N/A $fullname = catfile($dir1, $dir2, $file);
1N/A
1N/Ainstead of
1N/A
1N/A $fullname = File::Spec->catfile($dir1, $dir2, $file);
1N/A
1N/A=item Getopt::Long
1N/A
1N/AGetopt::Long licensing has changed to allow the Perl Artistic License
1N/Aas well as the GPL. It used to be GPL only, which got in the way of
1N/Anon-GPL applications that wanted to use Getopt::Long.
1N/A
1N/AGetopt::Long encourages the use of Pod::Usage to produce help
1N/Amessages. For example:
1N/A
1N/A use Getopt::Long;
1N/A use Pod::Usage;
1N/A my $man = 0;
1N/A my $help = 0;
1N/A GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
1N/A pod2usage(1) if $help;
1N/A pod2usage(-exitstatus => 0, -verbose => 2) if $man;
1N/A
1N/A __END__
1N/A
1N/A =head1 NAME
1N/A
1N/A sample - Using Getopt::Long and Pod::Usage
1N/A
1N/A =head1 SYNOPSIS
1N/A
1N/A sample [options] [file ...]
1N/A
1N/A Options:
1N/A -help brief help message
1N/A -man full documentation
1N/A
1N/A =head1 OPTIONS
1N/A
1N/A =over 8
1N/A
1N/A =item B<-help>
1N/A
1N/A Print a brief help message and exits.
1N/A
1N/A =item B<-man>
1N/A
1N/A Prints the manual page and exits.
1N/A
1N/A =back
1N/A
1N/A =head1 DESCRIPTION
1N/A
1N/A B<This program> will read the given input file(s) and do something
1N/A useful with the contents thereof.
1N/A
1N/A =cut
1N/A
1N/ASee L<Pod::Usage> for details.
1N/A
1N/AA bug that prevented the non-option call-back <> from being
1N/Aspecified as the first argument has been fixed.
1N/A
1N/ATo specify the characters < and > as option starters, use ><. Note,
1N/Ahowever, that changing option starters is strongly deprecated.
1N/A
1N/A=item IO
1N/A
1N/Awrite() and syswrite() will now accept a single-argument
1N/Aform of the call, for consistency with Perl's syswrite().
1N/A
1N/AYou can now create a TCP-based IO::Socket::INET without forcing
1N/Aa connect attempt. This allows you to configure its options
1N/A(like making it non-blocking) and then call connect() manually.
1N/A
1N/AA bug that prevented the IO::Socket::protocol() accessor
1N/Afrom ever returning the correct value has been corrected.
1N/A
1N/AIO::Socket::connect now uses non-blocking IO instead of alarm()
1N/Ato do connect timeouts.
1N/A
1N/AIO::Socket::accept now uses select() instead of alarm() for doing
1N/Atimeouts.
1N/A
1N/AIO::Socket::INET->new now sets $! correctly on failure. $@ is
1N/Astill set for backwards compatibility.
1N/A
1N/A=item JPL
1N/A
1N/AJava Perl Lingo is now distributed with Perl. See jpl/README
1N/Afor more information.
1N/A
1N/A=item lib
1N/A
1N/AC<use lib> now weeds out any trailing duplicate entries.
1N/AC<no lib> removes all named entries.
1N/A
1N/A=item Math::BigInt
1N/A
1N/AThe bitwise operations C<<< << >>>, C<<< >> >>>, C<&>, C<|>,
1N/Aand C<~> are now supported on bigints.
1N/A
1N/A=item Math::Complex
1N/A
1N/AThe accessor methods Re, Im, arg, abs, rho, and theta can now also
1N/Aact as mutators (accessor $z->Re(), mutator $z->Re(3)).
1N/A
1N/AThe class method C<display_format> and the corresponding object method
1N/AC<display_format>, in addition to accepting just one argument, now can
1N/Aalso accept a parameter hash. Recognized keys of a parameter hash are
1N/AC<"style">, which corresponds to the old one parameter case, and two
1N/Anew parameters: C<"format">, which is a printf()-style format string
1N/A(defaults usually to C<"%.15g">, you can revert to the default by
1N/Asetting the format string to C<undef>) used for both parts of a
1N/Acomplex number, and C<"polar_pretty_print"> (defaults to true),
1N/Awhich controls whether an attempt is made to try to recognize small
1N/Amultiples and rationals of pi (2pi, pi/2) at the argument (angle) of a
1N/Apolar complex number.
1N/A
1N/AThe potentially disruptive change is that in list context both methods
1N/Anow I<return the parameter hash>, instead of only the value of the
1N/AC<"style"> parameter.
1N/A
1N/A=item Math::Trig
1N/A
1N/AA little bit of radial trigonometry (cylindrical and spherical),
1N/Aradial coordinate conversions, and the great circle distance were added.
1N/A
1N/A=item Pod::Parser, Pod::InputObjects
1N/A
1N/APod::Parser is a base class for parsing and selecting sections of
1N/Apod documentation from an input stream. This module takes care of
1N/Aidentifying pod paragraphs and commands in the input and hands off the
1N/Aparsed paragraphs and commands to user-defined methods which are free
1N/Ato interpret or translate them as they see fit.
1N/A
1N/APod::InputObjects defines some input objects needed by Pod::Parser, and
1N/Afor advanced users of Pod::Parser that need more about a command besides
1N/Aits name and text.
1N/A
1N/AAs of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned
1N/A"base parser code" recommended for use by all pod2xxx translators.
1N/APod::Text (pod2text) and Pod::Man (pod2man) have already been converted
1N/Ato use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already
1N/Aunderway. For any questions or comments about pod parsing and translating
1N/Aissues and utilities, please use the pod-people@perl.org mailing list.
1N/A
1N/AFor further information, please see L<Pod::Parser> and L<Pod::InputObjects>.
1N/A
1N/A=item Pod::Checker, podchecker
1N/A
1N/AThis utility checks pod files for correct syntax, according to
1N/AL<perlpod>. Obvious errors are flagged as such, while warnings are
1N/Aprinted for mistakes that can be handled gracefully. The checklist is
1N/Anot complete yet. See L<Pod::Checker>.
1N/A
1N/A=item Pod::ParseUtils, Pod::Find
1N/A
1N/AThese modules provide a set of gizmos that are useful mainly for pod
1N/Atranslators. L<Pod::Find|Pod::Find> traverses directory structures and
1N/Areturns found pod files, along with their canonical names (like
1N/AC<File::Spec::Unix>). L<Pod::ParseUtils|Pod::ParseUtils> contains
1N/AB<Pod::List> (useful for storing pod list information), B<Pod::Hyperlink>
1N/A(for parsing the contents of C<LE<lt>E<gt>> sequences) and B<Pod::Cache>
1N/A(for caching information about pod files, e.g., link nodes).
1N/A
1N/A=item Pod::Select, podselect
1N/A
1N/APod::Select is a subclass of Pod::Parser which provides a function
1N/Anamed "podselect()" to filter out user-specified sections of raw pod
1N/Adocumentation from an input stream. podselect is a script that provides
1N/Aaccess to Pod::Select from other scripts to be used as a filter.
1N/ASee L<Pod::Select>.
1N/A
1N/A=item Pod::Usage, pod2usage
1N/A
1N/APod::Usage provides the function "pod2usage()" to print usage messages for
1N/Aa Perl script based on its embedded pod documentation. The pod2usage()
1N/Afunction is generally useful to all script authors since it lets them
1N/Awrite and maintain a single source (the pods) for documentation, thus
1N/Aremoving the need to create and maintain redundant usage message text
1N/Aconsisting of information already in the pods.
1N/A
1N/AThere is also a pod2usage script which can be used from other kinds of
1N/Ascripts to print usage messages from pods (even for non-Perl scripts
1N/Awith pods embedded in comments).
1N/A
1N/AFor details and examples, please see L<Pod::Usage>.
1N/A
1N/A=item Pod::Text and Pod::Man
1N/A
1N/APod::Text has been rewritten to use Pod::Parser. While pod2text() is
1N/Astill available for backwards compatibility, the module now has a new
1N/Apreferred interface. See L<Pod::Text> for the details. The new Pod::Text
1N/Amodule is easily subclassed for tweaks to the output, and two such
1N/Asubclasses (Pod::Text::Termcap for man-page-style bold and underlining
1N/Ausing termcap information, and Pod::Text::Color for markup with ANSI color
1N/Asequences) are now standard.
1N/A
1N/Apod2man has been turned into a module, Pod::Man, which also uses
1N/APod::Parser. In the process, several outstanding bugs related to quotes
1N/Ain section headers, quoting of code escapes, and nested lists have been
1N/Afixed. pod2man is now a wrapper script around this module.
1N/A
1N/A=item SDBM_File
1N/A
1N/AAn EXISTS method has been added to this module (and sdbm_exists() has
1N/Abeen added to the underlying sdbm library), so one can now call exists
1N/Aon an SDBM_File tied hash and get the correct result, rather than a
1N/Aruntime error.
1N/A
1N/AA bug that may have caused data loss when more than one disk block
1N/Ahappens to be read from the database in a single FETCH() has been
1N/Afixed.
1N/A
1N/A=item Sys::Syslog
1N/A
1N/ASys::Syslog now uses XSUBs to access facilities from syslog.h so it
1N/Ano longer requires syslog.ph to exist.
1N/A
1N/A=item Sys::Hostname
1N/A
1N/ASys::Hostname now uses XSUBs to call the C library's gethostname() or
1N/Auname() if they exist.
1N/A
1N/A=item Term::ANSIColor
1N/A
1N/ATerm::ANSIColor is a very simple module to provide easy and readable
1N/Aaccess to the ANSI color and highlighting escape sequences, supported by
1N/Amost ANSI terminal emulators. It is now included standard.
1N/A
1N/A=item Time::Local
1N/A
1N/AThe timelocal() and timegm() functions used to silently return bogus
1N/Aresults when the date fell outside the machine's integer range. They
1N/Anow consistently croak() if the date falls in an unsupported range.
1N/A
1N/A=item Win32
1N/A
1N/AThe error return value in list context has been changed for all functions
1N/Athat return a list of values. Previously these functions returned a list
1N/Awith a single element C<undef> if an error occurred. Now these functions
1N/Areturn the empty list in these situations. This applies to the following
1N/Afunctions:
1N/A
1N/A Win32::FsType
1N/A Win32::GetOSVersion
1N/A
1N/AThe remaining functions are unchanged and continue to return C<undef> on
1N/Aerror even in list context.
1N/A
1N/AThe Win32::SetLastError(ERROR) function has been added as a complement
1N/Ato the Win32::GetLastError() function.
1N/A
1N/AThe new Win32::GetFullPathName(FILENAME) returns the full absolute
1N/Apathname for FILENAME in scalar context. In list context it returns
1N/Aa two-element list containing the fully qualified directory name and
1N/Athe filename. See L<Win32>.
1N/A
1N/A=item XSLoader
1N/A
1N/AThe XSLoader extension is a simpler alternative to DynaLoader.
1N/ASee L<XSLoader>.
1N/A
1N/A=item DBM Filters
1N/A
1N/AA new feature called "DBM Filters" has been added to all the
1N/ADBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File.
1N/ADBM Filters add four new methods to each DBM module:
1N/A
1N/A filter_store_key
1N/A filter_store_value
1N/A filter_fetch_key
1N/A filter_fetch_value
1N/A
1N/AThese can be used to filter key-value pairs before the pairs are
1N/Awritten to the database or just after they are read from the database.
1N/ASee L<perldbmfilter> for further information.
1N/A
1N/A=back
1N/A
1N/A=head2 Pragmata
1N/A
1N/AC<use attrs> is now obsolete, and is only provided for
1N/Abackward-compatibility. It's been replaced by the C<sub : attributes>
1N/Asyntax. See L<perlsub/"Subroutine Attributes"> and L<attributes>.
1N/A
1N/ALexical warnings pragma, C<use warnings;>, to control optional warnings.
1N/ASee L<perllexwarn>.
1N/A
1N/AC<use filetest> to control the behaviour of filetests (C<-r> C<-w>
1N/A...). Currently only one subpragma implemented, "use filetest
1N/A'access';", that uses access(2) or equivalent to check permissions
1N/Ainstead of using stat(2) as usual. This matters in filesystems
1N/Awhere there are ACLs (access control lists): the stat(2) might lie,
1N/Abut access(2) knows better.
1N/A
1N/AThe C<open> pragma can be used to specify default disciplines for
1N/Ahandle constructors (e.g. open()) and for qx//. The two
1N/Apseudo-disciplines C<:raw> and C<:crlf> are currently supported on
1N/ADOS-derivative platforms (i.e. where binmode is not a no-op).
1N/ASee also L</"binmode() can be used to set :crlf and :raw modes">.
1N/A
1N/A=head1 Utility Changes
1N/A
1N/A=head2 dprofpp
1N/A
1N/AC<dprofpp> is used to display profile data generated using C<Devel::DProf>.
1N/ASee L<dprofpp>.
1N/A
1N/A=head2 find2perl
1N/A
1N/AThe C<find2perl> utility now uses the enhanced features of the File::Find
1N/Amodule. The -depth and -follow options are supported. Pod documentation
1N/Ais also included in the script.
1N/A
1N/A=head2 h2xs
1N/A
1N/AThe C<h2xs> tool can now work in conjunction with C<C::Scan> (available
1N/Afrom CPAN) to automatically parse real-life header files. The C<-M>,
1N/AC<-a>, C<-k>, and C<-o> options are new.
1N/A
1N/A=head2 perlcc
1N/A
1N/AC<perlcc> now supports the C and Bytecode backends. By default,
1N/Ait generates output from the simple C backend rather than the
1N/Aoptimized C backend.
1N/A
1N/ASupport for non-Unix platforms has been improved.
1N/A
1N/A=head2 perldoc
1N/A
1N/AC<perldoc> has been reworked to avoid possible security holes.
1N/AIt will not by default let itself be run as the superuser, but you
1N/Amay still use the B<-U> switch to try to make it drop privileges
1N/Afirst.
1N/A
1N/A=head2 The Perl Debugger
1N/A
1N/AMany bug fixes and enhancements were added to F<perl5db.pl>, the
1N/APerl debugger. The help documentation was rearranged. New commands
1N/Ainclude C<< < ? >>, C<< > ? >>, and C<< { ? >> to list out current
1N/Aactions, C<man I<docpage>> to run your doc viewer on some perl
1N/Adocset, and support for quoted options. The help information was
1N/Arearranged, and should be viewable once again if you're using B<less>
1N/Aas your pager. A serious security hole was plugged--you should
1N/Aimmediately remove all older versions of the Perl debugger as
1N/Ainstalled in previous releases, all the way back to perl3, from
1N/Ayour system to avoid being bitten by this.
1N/A
1N/A=head1 Improved Documentation
1N/A
1N/AMany of the platform-specific README files are now part of the perl
1N/Ainstallation. See L<perl> for the complete list.
1N/A
1N/A=over 4
1N/A
1N/A=item perlapi.pod
1N/A
1N/AThe official list of public Perl API functions.
1N/A
1N/A=item perlboot.pod
1N/A
1N/AA tutorial for beginners on object-oriented Perl.
1N/A
1N/A=item perlcompile.pod
1N/A
1N/AAn introduction to using the Perl Compiler suite.
1N/A
1N/A=item perldbmfilter.pod
1N/A
1N/AA howto document on using the DBM filter facility.
1N/A
1N/A=item perldebug.pod
1N/A
1N/AAll material unrelated to running the Perl debugger, plus all
1N/Alow-level guts-like details that risked crushing the casual user
1N/Aof the debugger, have been relocated from the old manpage to the
1N/Anext entry below.
1N/A
1N/A=item perldebguts.pod
1N/A
1N/AThis new manpage contains excessively low-level material not related
1N/Ato the Perl debugger, but slightly related to debugging Perl itself.
1N/AIt also contains some arcane internal details of how the debugging
1N/Aprocess works that may only be of interest to developers of Perl
1N/Adebuggers.
1N/A
1N/A=item perlfork.pod
1N/A
1N/ANotes on the fork() emulation currently available for the Windows platform.
1N/A
1N/A=item perlfilter.pod
1N/A
1N/AAn introduction to writing Perl source filters.
1N/A
1N/A=item perlhack.pod
1N/A
1N/ASome guidelines for hacking the Perl source code.
1N/A
1N/A=item perlintern.pod
1N/A
1N/AA list of internal functions in the Perl source code.
1N/A(List is currently empty.)
1N/A
1N/A=item perllexwarn.pod
1N/A
1N/AIntroduction and reference information about lexically scoped
1N/Awarning categories.
1N/A
1N/A=item perlnumber.pod
1N/A
1N/ADetailed information about numbers as they are represented in Perl.
1N/A
1N/A=item perlopentut.pod
1N/A
1N/AA tutorial on using open() effectively.
1N/A
1N/A=item perlreftut.pod
1N/A
1N/AA tutorial that introduces the essentials of references.
1N/A
1N/A=item perltootc.pod
1N/A
1N/AA tutorial on managing class data for object modules.
1N/A
1N/A=item perltodo.pod
1N/A
1N/ADiscussion of the most often wanted features that may someday be
1N/Asupported in Perl.
1N/A
1N/A=item perlunicode.pod
1N/A
1N/AAn introduction to Unicode support features in Perl.
1N/A
1N/A=back
1N/A
1N/A=head1 Performance enhancements
1N/A
1N/A=head2 Simple sort() using { $a <=> $b } and the like are optimized
1N/A
1N/AMany common sort() operations using a simple inlined block are now
1N/Aoptimized for faster performance.
1N/A
1N/A=head2 Optimized assignments to lexical variables
1N/A
1N/ACertain operations in the RHS of assignment statements have been
1N/Aoptimized to directly set the lexical variable on the LHS,
1N/Aeliminating redundant copying overheads.
1N/A
1N/A=head2 Faster subroutine calls
1N/A
1N/AMinor changes in how subroutine calls are handled internally
1N/Aprovide marginal improvements in performance.
1N/A
1N/A=head2 delete(), each(), values() and hash iteration are faster
1N/A
1N/AThe hash values returned by delete(), each(), values() and hashes in a
1N/Alist context are the actual values in the hash, instead of copies.
1N/AThis results in significantly better performance, because it eliminates
1N/Aneedless copying in most situations.
1N/A
1N/A=head1 Installation and Configuration Improvements
1N/A
1N/A=head2 -Dusethreads means something different
1N/A
1N/AThe -Dusethreads flag now enables the experimental interpreter-based thread
1N/Asupport by default. To get the flavor of experimental threads that was in
1N/A5.005 instead, you need to run Configure with "-Dusethreads -Duse5005threads".
1N/A
1N/AAs of v5.6.0, interpreter-threads support is still lacking a way to
1N/Acreate new threads from Perl (i.e., C<use Thread;> will not work with
1N/Ainterpreter threads). C<use Thread;> continues to be available when you
1N/Aspecify the -Duse5005threads option to Configure, bugs and all.
1N/A
1N/A NOTE: Support for threads continues to be an experimental feature.
1N/A Interfaces and implementation are subject to sudden and drastic changes.
1N/A
1N/A=head2 New Configure flags
1N/A
1N/AThe following new flags may be enabled on the Configure command line
1N/Aby running Configure with C<-Dflag>.
1N/A
1N/A usemultiplicity
1N/A usethreads useithreads (new interpreter threads: no Perl API yet)
1N/A usethreads use5005threads (threads as they were in 5.005)
1N/A
1N/A use64bitint (equal to now deprecated 'use64bits')
1N/A use64bitall
1N/A
1N/A uselongdouble
1N/A usemorebits
1N/A uselargefiles
1N/A usesocks (only SOCKS v5 supported)
1N/A
1N/A=head2 Threadedness and 64-bitness now more daring
1N/A
1N/AThe Configure options enabling the use of threads and the use of
1N/A64-bitness are now more daring in the sense that they no more have an
1N/Aexplicit list of operating systems of known threads/64-bit
1N/Acapabilities. In other words: if your operating system has the
1N/Anecessary APIs and datatypes, you should be able just to go ahead and
1N/Ause them, for threads by Configure -Dusethreads, and for 64 bits
1N/Aeither explicitly by Configure -Duse64bitint or implicitly if your
1N/Asystem has 64-bit wide datatypes. See also L<"64-bit support">.
1N/A
1N/A=head2 Long Doubles
1N/A
1N/ASome platforms have "long doubles", floating point numbers of even
1N/Alarger range than ordinary "doubles". To enable using long doubles for
1N/APerl's scalars, use -Duselongdouble.
1N/A
1N/A=head2 -Dusemorebits
1N/A
1N/AYou can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits.
1N/ASee also L<"64-bit support">.
1N/A
1N/A=head2 -Duselargefiles
1N/A
1N/ASome platforms support system APIs that are capable of handling large files
1N/A(typically, files larger than two gigabytes). Perl will try to use these
1N/AAPIs if you ask for -Duselargefiles.
1N/A
1N/ASee L<"Large file support"> for more information.
1N/A
1N/A=head2 installusrbinperl
1N/A
1N/AYou can use "Configure -Uinstallusrbinperl" which causes installperl
1N/Ato skip installing perl also as /usr/bin/perl. This is useful if you
1N/Aprefer not to modify /usr/bin for some reason or another but harmful
1N/Abecause many scripts assume to find Perl in /usr/bin/perl.
1N/A
1N/A=head2 SOCKS support
1N/A
1N/AYou can use "Configure -Dusesocks" which causes Perl to probe
1N/Afor the SOCKS proxy protocol library (v5, not v4). For more information
1N/Aon SOCKS, see:
1N/A
1N/A http://www.socks.nec.com/
1N/A
1N/A=head2 C<-A> flag
1N/A
1N/AYou can "post-edit" the Configure variables using the Configure C<-A>
1N/Aswitch. The editing happens immediately after the platform specific
1N/Ahints files have been processed but before the actual configuration
1N/Aprocess starts. Run C<Configure -h> to find out the full C<-A> syntax.
1N/A
1N/A=head2 Enhanced Installation Directories
1N/A
1N/AThe installation structure has been enriched to improve the support
1N/Afor maintaining multiple versions of perl, to provide locations for
1N/Avendor-supplied modules, scripts, and manpages, and to ease maintenance
1N/Aof locally-added modules, scripts, and manpages. See the section on
1N/AInstallation Directories in the INSTALL file for complete details.
1N/AFor most users building and installing from source, the defaults should
1N/Abe fine.
1N/A
1N/AIf you previously used C<Configure -Dsitelib> or C<-Dsitearch> to set
1N/Aspecial values for library directories, you might wish to consider using
1N/Athe new C<-Dsiteprefix> setting instead. Also, if you wish to re-use a
1N/Aconfig.sh file from an earlier version of perl, you should be sure to
1N/Acheck that Configure makes sensible choices for the new directories.
1N/ASee INSTALL for complete details.
1N/A
1N/A=head1 Platform specific changes
1N/A
1N/A=head2 Supported platforms
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/AThe Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the Thread
1N/Aextension.
1N/A
1N/A=item *
1N/A
1N/AGNU/Hurd is now supported.
1N/A
1N/A=item *
1N/A
1N/ARhapsody/Darwin is now supported.
1N/A
1N/A=item *
1N/A
1N/AEPOC is now supported (on Psion 5).
1N/A
1N/A=item *
1N/A
1N/AThe cygwin port (formerly cygwin32) has been greatly improved.
1N/A
1N/A=back
1N/A
1N/A=head2 DOS
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/APerl now works with djgpp 2.02 (and 2.03 alpha).
1N/A
1N/A=item *
1N/A
1N/AEnvironment variable names are not converted to uppercase any more.
1N/A
1N/A=item *
1N/A
1N/AIncorrect exit codes from backticks have been fixed.
1N/A
1N/A=item *
1N/A
1N/AThis port continues to use its own builtin globbing (not File::Glob).
1N/A
1N/A=back
1N/A
1N/A=head2 OS390 (OpenEdition MVS)
1N/A
1N/ASupport for this EBCDIC platform has not been renewed in this release.
1N/AThere are difficulties in reconciling Perl's standardization on UTF-8
1N/Aas its internal representation for characters with the EBCDIC character
1N/Aset, because the two are incompatible.
1N/A
1N/AIt is unclear whether future versions will renew support for this
1N/Aplatform, but the possibility exists.
1N/A
1N/A=head2 VMS
1N/A
1N/ANumerous revisions and extensions to configuration, build, testing, and
1N/Ainstallation process to accommodate core changes and VMS-specific options.
1N/A
1N/AExpand %ENV-handling code to allow runtime mapping to logical names,
1N/ACLI symbols, and CRTL environ array.
1N/A
1N/AExtension of subprocess invocation code to accept filespecs as command
1N/A"verbs".
1N/A
1N/AAdd to Perl command line processing the ability to use default file types and
1N/Ato recognize Unix-style C<2E<gt>&1>.
1N/A
1N/AExpansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.
1N/A
1N/AExtension of ExtUtils::MM_VMS to handle complex extensions more flexibly.
1N/A
1N/ABarewords at start of Unix-syntax paths may be treated as text rather than
1N/Aonly as logical names.
1N/A
1N/AOptional secure translation of several logical names used internally by Perl.
1N/A
1N/AMiscellaneous bugfixing and porting of new core code to VMS.
1N/A
1N/AThanks are gladly extended to the many people who have contributed VMS
1N/Apatches, testing, and ideas.
1N/A
1N/A=head2 Win32
1N/A
1N/APerl can now emulate fork() internally, using multiple interpreters running
1N/Ain different concurrent threads. This support must be enabled at build
1N/Atime. See L<perlfork> for detailed information.
1N/A
1N/AWhen given a pathname that consists only of a drivename, such as C<A:>,
1N/Aopendir() and stat() now use the current working directory for the drive
1N/Arather than the drive root.
1N/A
1N/AThe builtin XSUB functions in the Win32:: namespace are documented. See
1N/AL<Win32>.
1N/A
1N/A$^X now contains the full path name of the running executable.
1N/A
1N/AA Win32::GetLongPathName() function is provided to complement
1N/AWin32::GetFullPathName() and Win32::GetShortPathName(). See L<Win32>.
1N/A
1N/APOSIX::uname() is supported.
1N/A
1N/Asystem(1,...) now returns true process IDs rather than process
1N/Ahandles. kill() accepts any real process id, rather than strictly
1N/Areturn values from system(1,...).
1N/A
1N/AFor better compatibility with Unix, C<kill(0, $pid)> can now be used to
1N/Atest whether a process exists.
1N/A
1N/AThe C<Shell> module is supported.
1N/A
1N/ABetter support for building Perl under command.com in Windows 95
1N/Ahas been added.
1N/A
1N/AScripts are read in binary mode by default to allow ByteLoader (and
1N/Athe filter mechanism in general) to work properly. For compatibility,
1N/Athe DATA filehandle will be set to text mode if a carriage return is
1N/Adetected at the end of the line containing the __END__ or __DATA__
1N/Atoken; if not, the DATA filehandle will be left open in binary mode.
1N/AEarlier versions always opened the DATA filehandle in text mode.
1N/A
1N/AThe glob() operator is implemented via the C<File::Glob> extension,
1N/Awhich supports glob syntax of the C shell. This increases the flexibility
1N/Aof the glob() operator, but there may be compatibility issues for
1N/Aprograms that relied on the older globbing syntax. If you want to
1N/Apreserve compatibility with the older syntax, you might want to run
1N/Aperl with C<-MFile::DosGlob>. For details and compatibility information,
1N/Asee L<File::Glob>.
1N/A
1N/A=head1 Significant bug fixes
1N/A
1N/A=head2 <HANDLE> on empty files
1N/A
1N/AWith C<$/> set to C<undef>, "slurping" an empty file returns a string of
1N/Azero length (instead of C<undef>, as it used to) the first time the
1N/AHANDLE is read after C<$/> is set to C<undef>. Further reads yield
1N/AC<undef>.
1N/A
1N/AThis means that the following will append "foo" to an empty file (it used
1N/Ato do nothing):
1N/A
1N/A perl -0777 -pi -e 's/^/foo/' empty_file
1N/A
1N/AThe behaviour of:
1N/A
1N/A perl -pi -e 's/^/foo/' empty_file
1N/A
1N/Ais unchanged (it continues to leave the file empty).
1N/A
1N/A=head2 C<eval '...'> improvements
1N/A
1N/ALine numbers (as reflected by caller() and most diagnostics) within
1N/AC<eval '...'> were often incorrect where here documents were involved.
1N/AThis has been corrected.
1N/A
1N/ALexical lookups for variables appearing in C<eval '...'> within
1N/Afunctions that were themselves called within an C<eval '...'> were
1N/Asearching the wrong place for lexicals. The lexical search now
1N/Acorrectly ends at the subroutine's block boundary.
1N/A
1N/AThe use of C<return> within C<eval {...}> caused $@ not to be reset
1N/Acorrectly when no exception occurred within the eval. This has
1N/Abeen fixed.
1N/A
1N/AParsing of here documents used to be flawed when they appeared as
1N/Athe replacement expression in C<eval 's/.../.../e'>. This has
1N/Abeen fixed.
1N/A
1N/A=head2 All compilation errors are true errors
1N/A
1N/ASome "errors" encountered at compile time were by necessity
1N/Agenerated as warnings followed by eventual termination of the
1N/Aprogram. This enabled more such errors to be reported in a
1N/Asingle run, rather than causing a hard stop at the first error
1N/Athat was encountered.
1N/A
1N/AThe mechanism for reporting such errors has been reimplemented
1N/Ato queue compile-time errors and report them at the end of the
1N/Acompilation as true errors rather than as warnings. This fixes
1N/Acases where error messages leaked through in the form of warnings
1N/Awhen code was compiled at run time using C<eval STRING>, and
1N/Aalso allows such errors to be reliably trapped using C<eval "...">.
1N/A
1N/A=head2 Implicitly closed filehandles are safer
1N/A
1N/ASometimes implicitly closed filehandles (as when they are localized,
1N/Aand Perl automatically closes them on exiting the scope) could
1N/Ainadvertently set $? or $!. This has been corrected.
1N/A
1N/A
1N/A=head2 Behavior of list slices is more consistent
1N/A
1N/AWhen taking a slice of a literal list (as opposed to a slice of
1N/Aan array or hash), Perl used to return an empty list if the
1N/Aresult happened to be composed of all undef values.
1N/A
1N/AThe new behavior is to produce an empty list if (and only if)
1N/Athe original list was empty. Consider the following example:
1N/A
1N/A @a = (1,undef,undef,2)[2,1,2];
1N/A
1N/AThe old behavior would have resulted in @a having no elements.
1N/AThe new behavior ensures it has three undefined elements.
1N/A
1N/ANote in particular that the behavior of slices of the following
1N/Acases remains unchanged:
1N/A
1N/A @a = ()[1,2];
1N/A @a = (getpwent)[7,0];
1N/A @a = (anything_returning_empty_list())[2,1,2];
1N/A @a = @b[2,1,2];
1N/A @a = @c{'a','b','c'};
1N/A
1N/ASee L<perldata>.
1N/A
1N/A=head2 C<(\$)> prototype and C<$foo{a}>
1N/A
1N/AA scalar reference prototype now correctly allows a hash or
1N/Aarray element in that slot.
1N/A
1N/A=head2 C<goto &sub> and AUTOLOAD
1N/A
1N/AThe C<goto &sub> construct works correctly when C<&sub> happens
1N/Ato be autoloaded.
1N/A
1N/A=head2 C<-bareword> allowed under C<use integer>
1N/A
1N/AThe autoquoting of barewords preceded by C<-> did not work
1N/Ain prior versions when the C<integer> pragma was enabled.
1N/AThis has been fixed.
1N/A
1N/A=head2 Failures in DESTROY()
1N/A
1N/AWhen code in a destructor threw an exception, it went unnoticed
1N/Ain earlier versions of Perl, unless someone happened to be
1N/Alooking in $@ just after the point the destructor happened to
1N/Arun. Such failures are now visible as warnings when warnings are
1N/Aenabled.
1N/A
1N/A=head2 Locale bugs fixed
1N/A
1N/Aprintf() and sprintf() previously reset the numeric locale
1N/Aback to the default "C" locale. This has been fixed.
1N/A
1N/ANumbers formatted according to the local numeric locale
1N/A(such as using a decimal comma instead of a decimal dot) caused
1N/A"isn't numeric" warnings, even while the operations accessing
1N/Athose numbers produced correct results. These warnings have been
1N/Adiscontinued.
1N/A
1N/A=head2 Memory leaks
1N/A
1N/AThe C<eval 'return sub {...}'> construct could sometimes leak
1N/Amemory. This has been fixed.
1N/A
1N/AOperations that aren't filehandle constructors used to leak memory
1N/Awhen used on invalid filehandles. This has been fixed.
1N/A
1N/AConstructs that modified C<@_> could fail to deallocate values
1N/Ain C<@_> and thus leak memory. This has been corrected.
1N/A
1N/A=head2 Spurious subroutine stubs after failed subroutine calls
1N/A
1N/APerl could sometimes create empty subroutine stubs when a
1N/Asubroutine was not found in the package. Such cases stopped
1N/Alater method lookups from progressing into base packages.
1N/AThis has been corrected.
1N/A
1N/A=head2 Taint failures under C<-U>
1N/A
1N/AWhen running in unsafe mode, taint violations could sometimes
1N/Acause silent failures. This has been fixed.
1N/A
1N/A=head2 END blocks and the C<-c> switch
1N/A
1N/APrior versions used to run BEGIN B<and> END blocks when Perl was
1N/Arun in compile-only mode. Since this is typically not the expected
1N/Abehavior, END blocks are not executed anymore when the C<-c> switch
1N/Ais used, or if compilation fails.
1N/A
1N/ASee L</"Support for CHECK blocks"> for how to run things when the compile
1N/Aphase ends.
1N/A
1N/A=head2 Potential to leak DATA filehandles
1N/A
1N/AUsing the C<__DATA__> token creates an implicit filehandle to
1N/Athe file that contains the token. It is the program's
1N/Aresponsibility to close it when it is done reading from it.
1N/A
1N/AThis caveat is now better explained in the documentation.
1N/ASee L<perldata>.
1N/A
1N/A=head1 New or Changed Diagnostics
1N/A
1N/A=over 4
1N/A
1N/A=item "%s" variable %s masks earlier declaration in same %s
1N/A
1N/A(W misc) A "my" or "our" variable has been redeclared in the current scope or statement,
1N/Aeffectively eliminating all access to the previous instance. This is almost
1N/Aalways a typographical error. Note that the earlier variable will still exist
1N/Auntil the end of the scope or until all closure referents to it are
1N/Adestroyed.
1N/A
1N/A=item "my sub" not yet implemented
1N/A
1N/A(F) Lexically scoped subroutines are not yet implemented. Don't try that
1N/Ayet.
1N/A
1N/A=item "our" variable %s redeclared
1N/A
1N/A(W misc) You seem to have already declared the same global once before in the
1N/Acurrent lexical scope.
1N/A
1N/A=item '!' allowed only after types %s
1N/A
1N/A(F) The '!' is allowed in pack() and unpack() only after certain types.
1N/ASee L<perlfunc/pack>.
1N/A
1N/A=item / cannot take a count
1N/A
1N/A(F) You had an unpack template indicating a counted-length string,
1N/Abut you have also specified an explicit size for the string.
1N/ASee L<perlfunc/pack>.
1N/A
1N/A=item / must be followed by a, A or Z
1N/A
1N/A(F) You had an unpack template indicating a counted-length string,
1N/Awhich must be followed by one of the letters a, A or Z
1N/Ato indicate what sort of string is to be unpacked.
1N/ASee L<perlfunc/pack>.
1N/A
1N/A=item / must be followed by a*, A* or Z*
1N/A
1N/A(F) You had a pack template indicating a counted-length string,
1N/ACurrently the only things that can have their length counted are a*, A* or Z*.
1N/ASee L<perlfunc/pack>.
1N/A
1N/A=item / must follow a numeric type
1N/A
1N/A(F) You had an unpack template that contained a '#',
1N/Abut this did not follow some numeric unpack specification.
1N/ASee L<perlfunc/pack>.
1N/A
1N/A=item /%s/: Unrecognized escape \\%c passed through
1N/A
1N/A(W regexp) You used a backslash-character combination which is not recognized
1N/Aby Perl. This combination appears in an interpolated variable or a
1N/AC<'>-delimited regular expression. The character was understood literally.
1N/A
1N/A=item /%s/: Unrecognized escape \\%c in character class passed through
1N/A
1N/A(W regexp) You used a backslash-character combination which is not recognized
1N/Aby Perl inside character classes. The character was understood literally.
1N/A
1N/A=item /%s/ should probably be written as "%s"
1N/A
1N/A(W syntax) You have used a pattern where Perl expected to find a string,
1N/Aas in the first argument to C<join>. Perl will treat the true
1N/Aor false result of matching the pattern against $_ as the string,
1N/Awhich is probably not what you had in mind.
1N/A
1N/A=item %s() called too early to check prototype
1N/A
1N/A(W prototype) You've called a function that has a prototype before the parser saw a
1N/Adefinition or declaration for it, and Perl could not check that the call
1N/Aconforms to the prototype. You need to either add an early prototype
1N/Adeclaration for the subroutine in question, or move the subroutine
1N/Adefinition ahead of the call to get proper prototype checking. Alternatively,
1N/Aif you are certain that you're calling the function correctly, you may put
1N/Aan ampersand before the name to avoid the warning. See L<perlsub>.
1N/A
1N/A=item %s argument is not a HASH or ARRAY element
1N/A
1N/A(F) The argument to exists() must be a hash or array element, such as:
1N/A
1N/A $foo{$bar}
1N/A $ref->{"susie"}[12]
1N/A
1N/A=item %s argument is not a HASH or ARRAY element or slice
1N/A
1N/A(F) The argument to delete() must be either a hash or array element, such as:
1N/A
1N/A $foo{$bar}
1N/A $ref->{"susie"}[12]
1N/A
1N/Aor a hash or array slice, such as:
1N/A
1N/A @foo[$bar, $baz, $xyzzy]
1N/A @{$ref->[12]}{"susie", "queue"}
1N/A
1N/A=item %s argument is not a subroutine name
1N/A
1N/A(F) The argument to exists() for C<exists &sub> must be a subroutine
1N/Aname, and not a subroutine call. C<exists &sub()> will generate this error.
1N/A
1N/A=item %s package attribute may clash with future reserved word: %s
1N/A
1N/A(W reserved) A lowercase attribute name was used that had a package-specific handler.
1N/AThat name might have a meaning to Perl itself some day, even though it
1N/Adoesn't yet. Perhaps you should use a mixed-case attribute name, instead.
1N/ASee L<attributes>.
1N/A
1N/A=item (in cleanup) %s
1N/A
1N/A(W misc) This prefix usually indicates that a DESTROY() method raised
1N/Athe indicated exception. Since destructors are usually called by
1N/Athe system at arbitrary points during execution, and often a vast
1N/Anumber of times, the warning is issued only once for any number
1N/Aof failures that would otherwise result in the same message being
1N/Arepeated.
1N/A
1N/AFailure of user callbacks dispatched using the C<G_KEEPERR> flag
1N/Acould also result in this warning. See L<perlcall/G_KEEPERR>.
1N/A
1N/A=item <> should be quotes
1N/A
1N/A(F) You wrote C<< require <file> >> when you should have written
1N/AC<require 'file'>.
1N/A
1N/A=item Attempt to join self
1N/A
1N/A(F) You tried to join a thread from within itself, which is an
1N/Aimpossible task. You may be joining the wrong thread, or you may
1N/Aneed to move the join() to some other thread.
1N/A
1N/A=item Bad evalled substitution pattern
1N/A
1N/A(F) You've used the /e switch to evaluate the replacement for a
1N/Asubstitution, but perl found a syntax error in the code to evaluate,
1N/Amost likely an unexpected right brace '}'.
1N/A
1N/A=item Bad realloc() ignored
1N/A
1N/A(S) An internal routine called realloc() on something that had never been
1N/Amalloc()ed in the first place. Mandatory, but can be disabled by
1N/Asetting environment variable C<PERL_BADFREE> to 1.
1N/A
1N/A=item Bareword found in conditional
1N/A
1N/A(W bareword) The compiler found a bareword where it expected a conditional,
1N/Awhich often indicates that an || or && was parsed as part of the
1N/Alast argument of the previous construct, for example:
1N/A
1N/A open FOO || die;
1N/A
1N/AIt may also indicate a misspelled constant that has been interpreted
1N/Aas a bareword:
1N/A
1N/A use constant TYPO => 1;
1N/A if (TYOP) { print "foo" }
1N/A
1N/AThe C<strict> pragma is useful in avoiding such errors.
1N/A
1N/A=item Binary number > 0b11111111111111111111111111111111 non-portable
1N/A
1N/A(W portable) The binary number you specified is larger than 2**32-1
1N/A(4294967295) and therefore non-portable between systems. See
1N/AL<perlport> for more on portability concerns.
1N/A
1N/A=item Bit vector size > 32 non-portable
1N/A
1N/A(W portable) Using bit vector sizes larger than 32 is non-portable.
1N/A
1N/A=item Buffer overflow in prime_env_iter: %s
1N/A
1N/A(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over
1N/A%ENV, it encountered a logical name or symbol definition which was too long,
1N/Aso it was truncated to the string shown.
1N/A
1N/A=item Can't check filesystem of script "%s"
1N/A
1N/A(P) For some reason you can't check the filesystem of the script for nosuid.
1N/A
1N/A=item Can't declare class for non-scalar %s in "%s"
1N/A
1N/A(S) Currently, only scalar variables can declared with a specific class
1N/Aqualifier in a "my" or "our" declaration. The semantics may be extended
1N/Afor other types of variables in future.
1N/A
1N/A=item Can't declare %s in "%s"
1N/A
1N/A(F) Only scalar, array, and hash variables may be declared as "my" or
1N/A"our" variables. They must have ordinary identifiers as names.
1N/A
1N/A=item Can't ignore signal CHLD, forcing to default
1N/A
1N/A(W signal) Perl has detected that it is being run with the SIGCHLD signal
1N/A(sometimes known as SIGCLD) disabled. Since disabling this signal
1N/Awill interfere with proper determination of exit status of child
1N/Aprocesses, Perl has reset the signal to its default value.
1N/AThis situation typically indicates that the parent program under
1N/Awhich Perl may be running (e.g., cron) is being very careless.
1N/A
1N/A=item Can't modify non-lvalue subroutine call
1N/A
1N/A(F) Subroutines meant to be used in lvalue context should be declared as
1N/Asuch, see L<perlsub/"Lvalue subroutines">.
1N/A
1N/A=item Can't read CRTL environ
1N/A
1N/A(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
1N/Afrom the CRTL's internal environment array and discovered the array was
1N/Amissing. You need to figure out where your CRTL misplaced its environ
1N/Aor define F<PERL_ENV_TABLES> (see L<perlvms>) so that environ is not searched.
1N/A
1N/A=item Can't remove %s: %s, skipping file
1N/A
1N/A(S) You requested an inplace edit without creating a backup file. Perl
1N/Awas unable to remove the original file to replace it with the modified
1N/Afile. The file was left unmodified.
1N/A
1N/A=item Can't return %s from lvalue subroutine
1N/A
1N/A(F) Perl detected an attempt to return illegal lvalues (such
1N/Aas temporary or readonly values) from a subroutine used as an lvalue.
1N/AThis is not allowed.
1N/A
1N/A=item Can't weaken a nonreference
1N/A
1N/A(F) You attempted to weaken something that was not a reference. Only
1N/Areferences can be weakened.
1N/A
1N/A=item Character class [:%s:] unknown
1N/A
1N/A(F) The class in the character class [: :] syntax is unknown.
1N/ASee L<perlre>.
1N/A
1N/A=item Character class syntax [%s] belongs inside character classes
1N/A
1N/A(W unsafe) The character class constructs [: :], [= =], and [. .] go
1N/AI<inside> character classes, the [] are part of the construct,
1N/Afor example: /[012[:alpha:]345]/. Note that [= =] and [. .]
1N/Aare not currently implemented; they are simply placeholders for
1N/Afuture extensions.
1N/A
1N/A=item Constant is not %s reference
1N/A
1N/A(F) A constant value (perhaps declared using the C<use constant> pragma)
1N/Ais being dereferenced, but it amounts to the wrong type of reference. The
1N/Amessage indicates the type of reference that was expected. This usually
1N/Aindicates a syntax error in dereferencing the constant value.
1N/ASee L<perlsub/"Constant Functions"> and L<constant>.
1N/A
1N/A=item constant(%s): %s
1N/A
1N/A(F) The parser found inconsistencies either while attempting to define an
1N/Aoverloaded constant, or when trying to find the character name specified
1N/Ain the C<\N{...}> escape. Perhaps you forgot to load the corresponding
1N/AC<overload> or C<charnames> pragma? See L<charnames> and L<overload>.
1N/A
1N/A=item CORE::%s is not a keyword
1N/A
1N/A(F) The CORE:: namespace is reserved for Perl keywords.
1N/A
1N/A=item defined(@array) is deprecated
1N/A
1N/A(D) defined() is not usually useful on arrays because it checks for an
1N/Aundefined I<scalar> value. If you want to see if the array is empty,
1N/Ajust use C<if (@array) { # not empty }> for example.
1N/A
1N/A=item defined(%hash) is deprecated
1N/A
1N/A(D) defined() is not usually useful on hashes because it checks for an
1N/Aundefined I<scalar> value. If you want to see if the hash is empty,
1N/Ajust use C<if (%hash) { # not empty }> for example.
1N/A
1N/A=item Did not produce a valid header
1N/A
1N/ASee Server error.
1N/A
1N/A=item (Did you mean "local" instead of "our"?)
1N/A
1N/A(W misc) Remember that "our" does not localize the declared global variable.
1N/AYou have declared it again in the same lexical scope, which seems superfluous.
1N/A
1N/A=item Document contains no data
1N/A
1N/ASee Server error.
1N/A
1N/A=item entering effective %s failed
1N/A
1N/A(F) While under the C<use filetest> pragma, switching the real and
1N/Aeffective uids or gids failed.
1N/A
1N/A=item false [] range "%s" in regexp
1N/A
1N/A(W regexp) A character class range must start and end at a literal character, not
1N/Aanother character class like C<\d> or C<[:alpha:]>. The "-" in your false
1N/Arange is interpreted as a literal "-". Consider quoting the "-", "\-".
1N/ASee L<perlre>.
1N/A
1N/A=item Filehandle %s opened only for output
1N/A
1N/A(W io) You tried to read from a filehandle opened only for writing. If you
1N/Aintended it to be a read/write filehandle, you needed to open it with
1N/A"+<" or "+>" or "+>>" instead of with "<" or nothing. If
1N/Ayou intended only to read from the file, use "<". See
1N/AL<perlfunc/open>.
1N/A
1N/A=item flock() on closed filehandle %s
1N/A
1N/A(W closed) The filehandle you're attempting to flock() got itself closed some
1N/Atime before now. Check your logic flow. flock() operates on filehandles.
1N/AAre you attempting to call flock() on a dirhandle by the same name?
1N/A
1N/A=item Global symbol "%s" requires explicit package name
1N/A
1N/A(F) You've said "use strict vars", which indicates that all variables
1N/Amust either be lexically scoped (using "my"), declared beforehand using
1N/A"our", or explicitly qualified to say which package the global variable
1N/Ais in (using "::").
1N/A
1N/A=item Hexadecimal number > 0xffffffff non-portable
1N/A
1N/A(W portable) The hexadecimal number you specified is larger than 2**32-1
1N/A(4294967295) and therefore non-portable between systems. See
1N/AL<perlport> for more on portability concerns.
1N/A
1N/A=item Ill-formed CRTL environ value "%s"
1N/A
1N/A(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal
1N/Aenviron array, and encountered an element without the C<=> delimiter
1N/Aused to separate keys from values. The element is ignored.
1N/A
1N/A=item Ill-formed message in prime_env_iter: |%s|
1N/A
1N/A(W internal) A warning peculiar to VMS. Perl tried to read a logical name
1N/Aor CLI symbol definition when preparing to iterate over %ENV, and
1N/Adidn't see the expected delimiter between key and value, so the
1N/Aline was ignored.
1N/A
1N/A=item Illegal binary digit %s
1N/A
1N/A(F) You used a digit other than 0 or 1 in a binary number.
1N/A
1N/A=item Illegal binary digit %s ignored
1N/A
1N/A(W digit) You may have tried to use a digit other than 0 or 1 in a binary number.
1N/AInterpretation of the binary number stopped before the offending digit.
1N/A
1N/A=item Illegal number of bits in vec
1N/A
1N/A(F) The number of bits in vec() (the third argument) must be a power of
1N/Atwo from 1 to 32 (or 64, if your platform supports that).
1N/A
1N/A=item Integer overflow in %s number
1N/A
1N/A(W overflow) The hexadecimal, octal or binary number you have specified either
1N/Aas a literal or as an argument to hex() or oct() is too big for your
1N/Aarchitecture, and has been converted to a floating point number. On a
1N/A32-bit architecture the largest hexadecimal, octal or binary number
1N/Arepresentable without overflow is 0xFFFFFFFF, 037777777777, or
1N/A0b11111111111111111111111111111111 respectively. Note that Perl
1N/Atransparently promotes all numbers to a floating point representation
1N/Ainternally--subject to loss of precision errors in subsequent
1N/Aoperations.
1N/A
1N/A=item Invalid %s attribute: %s
1N/A
1N/AThe indicated attribute for a subroutine or variable was not recognized
1N/Aby Perl or by a user-supplied handler. See L<attributes>.
1N/A
1N/A=item Invalid %s attributes: %s
1N/A
1N/AThe indicated attributes for a subroutine or variable were not recognized
1N/Aby Perl or by a user-supplied handler. See L<attributes>.
1N/A
1N/A=item invalid [] range "%s" in regexp
1N/A
1N/AThe offending range is now explicitly displayed.
1N/A
1N/A=item Invalid separator character %s in attribute list
1N/A
1N/A(F) Something other than a colon or whitespace was seen between the
1N/Aelements of an attribute list. If the previous attribute
1N/Ahad a parenthesised parameter list, perhaps that list was terminated
1N/Atoo soon. See L<attributes>.
1N/A
1N/A=item Invalid separator character %s in subroutine attribute list
1N/A
1N/A(F) Something other than a colon or whitespace was seen between the
1N/Aelements of a subroutine attribute list. If the previous attribute
1N/Ahad a parenthesised parameter list, perhaps that list was terminated
1N/Atoo soon.
1N/A
1N/A=item leaving effective %s failed
1N/A
1N/A(F) While under the C<use filetest> pragma, switching the real and
1N/Aeffective uids or gids failed.
1N/A
1N/A=item Lvalue subs returning %s not implemented yet
1N/A
1N/A(F) Due to limitations in the current implementation, array and hash
1N/Avalues cannot be returned in subroutines used in lvalue context.
1N/ASee L<perlsub/"Lvalue subroutines">.
1N/A
1N/A=item Method %s not permitted
1N/A
1N/ASee Server error.
1N/A
1N/A=item Missing %sbrace%s on \N{}
1N/A
1N/A(F) Wrong syntax of character name literal C<\N{charname}> within
1N/Adouble-quotish context.
1N/A
1N/A=item Missing command in piped open
1N/A
1N/A(W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
1N/Aconstruction, but the command was missing or blank.
1N/A
1N/A=item Missing name in "my sub"
1N/A
1N/A(F) The reserved syntax for lexically scoped subroutines requires that they
1N/Ahave a name with which they can be found.
1N/A
1N/A=item No %s specified for -%c
1N/A
1N/A(F) The indicated command line switch needs a mandatory argument, but
1N/Ayou haven't specified one.
1N/A
1N/A=item No package name allowed for variable %s in "our"
1N/A
1N/A(F) Fully qualified variable names are not allowed in "our" declarations,
1N/Abecause that doesn't make much sense under existing semantics. Such
1N/Asyntax is reserved for future extensions.
1N/A
1N/A=item No space allowed after -%c
1N/A
1N/A(F) The argument to the indicated command line switch must follow immediately
1N/Aafter the switch, without intervening spaces.
1N/A
1N/A=item no UTC offset information; assuming local time is UTC
1N/A
1N/A(S) A warning peculiar to VMS. Perl was unable to find the local
1N/Atimezone offset, so it's assuming that local system time is equivalent
1N/Ato UTC. If it's not, define the logical name F<SYS$TIMEZONE_DIFFERENTIAL>
1N/Ato translate to the number of seconds which need to be added to UTC to
1N/Aget local time.
1N/A
1N/A=item Octal number > 037777777777 non-portable
1N/A
1N/A(W portable) The octal number you specified is larger than 2**32-1 (4294967295)
1N/Aand therefore non-portable between systems. See L<perlport> for more
1N/Aon portability concerns.
1N/A
1N/ASee also L<perlport> for writing portable code.
1N/A
1N/A=item panic: del_backref
1N/A
1N/A(P) Failed an internal consistency check while trying to reset a weak
1N/Areference.
1N/A
1N/A=item panic: kid popen errno read
1N/A
1N/A(F) forked child returned an incomprehensible message about its errno.
1N/A
1N/A=item panic: magic_killbackrefs
1N/A
1N/A(P) Failed an internal consistency check while trying to reset all weak
1N/Areferences to an object.
1N/A
1N/A=item Parentheses missing around "%s" list
1N/A
1N/A(W parenthesis) You said something like
1N/A
1N/A my $foo, $bar = @_;
1N/A
1N/Awhen you meant
1N/A
1N/A my ($foo, $bar) = @_;
1N/A
1N/ARemember that "my", "our", and "local" bind tighter than comma.
1N/A
1N/A=item Possible unintended interpolation of %s in string
1N/A
1N/A(W ambiguous) It used to be that Perl would try to guess whether you
1N/Awanted an array interpolated or a literal @. It no longer does this;
1N/Aarrays are now I<always> interpolated into strings. This means that
1N/Aif you try something like:
1N/A
1N/A print "fred@example.com";
1N/A
1N/Aand the array C<@example> doesn't exist, Perl is going to print
1N/AC<fred.com>, which is probably not what you wanted. To get a literal
1N/AC<@> sign in a string, put a backslash before it, just as you would
1N/Ato get a literal C<$> sign.
1N/A
1N/A=item Possible Y2K bug: %s
1N/A
1N/A(W y2k) You are concatenating the number 19 with another number, which
1N/Acould be a potential Year 2000 problem.
1N/A
1N/A=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
1N/A
1N/A(W deprecated) You have written something like this:
1N/A
1N/A sub doit
1N/A {
1N/A use attrs qw(locked);
1N/A }
1N/A
1N/AYou should use the new declaration syntax instead.
1N/A
1N/A sub doit : locked
1N/A {
1N/A ...
1N/A
1N/AThe C<use attrs> pragma is now obsolete, and is only provided for
1N/Abackward-compatibility. See L<perlsub/"Subroutine Attributes">.
1N/A
1N/A
1N/A=item Premature end of script headers
1N/A
1N/ASee Server error.
1N/A
1N/A=item Repeat count in pack overflows
1N/A
1N/A(F) You can't specify a repeat count so large that it overflows
1N/Ayour signed integers. See L<perlfunc/pack>.
1N/A
1N/A=item Repeat count in unpack overflows
1N/A
1N/A(F) You can't specify a repeat count so large that it overflows
1N/Ayour signed integers. See L<perlfunc/unpack>.
1N/A
1N/A=item realloc() of freed memory ignored
1N/A
1N/A(S) An internal routine called realloc() on something that had already
1N/Abeen freed.
1N/A
1N/A=item Reference is already weak
1N/A
1N/A(W misc) You have attempted to weaken a reference that is already weak.
1N/ADoing so has no effect.
1N/A
1N/A=item setpgrp can't take arguments
1N/A
1N/A(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments,
1N/Aunlike POSIX setpgid(), which takes a process ID and process group ID.
1N/A
1N/A=item Strange *+?{} on zero-length expression
1N/A
1N/A(W regexp) You applied a regular expression quantifier in a place where it
1N/Amakes no sense, such as on a zero-width assertion.
1N/ATry putting the quantifier inside the assertion instead. For example,
1N/Athe way to match "abc" provided that it is followed by three
1N/Arepetitions of "xyz" is C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
1N/A
1N/A=item switching effective %s is not implemented
1N/A
1N/A(F) While under the C<use filetest> pragma, we cannot switch the
1N/Areal and effective uids or gids.
1N/A
1N/A=item This Perl can't reset CRTL environ elements (%s)
1N/A
1N/A=item This Perl can't set CRTL environ elements (%s=%s)
1N/A
1N/A(W internal) Warnings peculiar to VMS. You tried to change or delete an element
1N/Aof the CRTL's internal environ array, but your copy of Perl wasn't
1N/Abuilt with a CRTL that contained the setenv() function. You'll need to
1N/Arebuild Perl with a CRTL that does, or redefine F<PERL_ENV_TABLES> (see
1N/AL<perlvms>) so that the environ array isn't the target of the change to
1N/A%ENV which produced the warning.
1N/A
1N/A=item Too late to run %s block
1N/A
1N/A(W void) A CHECK or INIT block is being defined during run time proper,
1N/Awhen the opportunity to run them has already passed. Perhaps you are
1N/Aloading a file with C<require> or C<do> when you should be using
1N/AC<use> instead. Or perhaps you should put the C<require> or C<do>
1N/Ainside a BEGIN block.
1N/A
1N/A=item Unknown open() mode '%s'
1N/A
1N/A(F) The second argument of 3-argument open() is not among the list
1N/Aof valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>,
1N/AC<< +> >>, C<<< +>> >>>, C<-|>, C<|->.
1N/A
1N/A=item Unknown process %x sent message to prime_env_iter: %s
1N/A
1N/A(P) An error peculiar to VMS. Perl was reading values for %ENV before
1N/Aiterating over it, and someone else stuck a message in the stream of
1N/Adata Perl expected. Someone's very confused, or perhaps trying to
1N/Asubvert Perl's population of %ENV for nefarious purposes.
1N/A
1N/A=item Unrecognized escape \\%c passed through
1N/A
1N/A(W misc) You used a backslash-character combination which is not recognized
1N/Aby Perl. The character was understood literally.
1N/A
1N/A=item Unterminated attribute parameter in attribute list
1N/A
1N/A(F) The lexer saw an opening (left) parenthesis character while parsing an
1N/Aattribute list, but the matching closing (right) parenthesis
1N/Acharacter was not found. You may need to add (or remove) a backslash
1N/Acharacter to get your parentheses to balance. See L<attributes>.
1N/A
1N/A=item Unterminated attribute list
1N/A
1N/A(F) The lexer found something other than a simple identifier at the start
1N/Aof an attribute, and it wasn't a semicolon or the start of a
1N/Ablock. Perhaps you terminated the parameter list of the previous attribute
1N/Atoo soon. See L<attributes>.
1N/A
1N/A=item Unterminated attribute parameter in subroutine attribute list
1N/A
1N/A(F) The lexer saw an opening (left) parenthesis character while parsing a
1N/Asubroutine attribute list, but the matching closing (right) parenthesis
1N/Acharacter was not found. You may need to add (or remove) a backslash
1N/Acharacter to get your parentheses to balance.
1N/A
1N/A=item Unterminated subroutine attribute list
1N/A
1N/A(F) The lexer found something other than a simple identifier at the start
1N/Aof a subroutine attribute, and it wasn't a semicolon or the start of a
1N/Ablock. Perhaps you terminated the parameter list of the previous attribute
1N/Atoo soon.
1N/A
1N/A=item Value of CLI symbol "%s" too long
1N/A
1N/A(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV
1N/Aelement from a CLI symbol table, and found a resultant string longer
1N/Athan 1024 characters. The return value has been truncated to 1024
1N/Acharacters.
1N/A
1N/A=item Version number must be a constant number
1N/A
1N/A(P) The attempt to translate a C<use Module n.n LIST> statement into
1N/Aits equivalent C<BEGIN> block found an internal inconsistency with
1N/Athe version number.
1N/A
1N/A=back
1N/A
1N/A=head1 New tests
1N/A
1N/A=over 4
1N/A
1N/A=item lib/attrs
1N/A
1N/ACompatibility tests for C<sub : attrs> vs the older C<use attrs>.
1N/A
1N/A=item lib/env
1N/A
1N/ATests for new environment scalar capability (e.g., C<use Env qw($BAR);>).
1N/A
1N/A=item lib/env-array
1N/A
1N/ATests for new environment array capability (e.g., C<use Env qw(@PATH);>).
1N/A
1N/A=item lib/io_const
1N/A
1N/AIO constants (SEEK_*, _IO*).
1N/A
1N/A=item lib/io_dir
1N/A
1N/ADirectory-related IO methods (new, read, close, rewind, tied delete).
1N/A
1N/A=item lib/io_multihomed
1N/A
1N/AINET sockets with multi-homed hosts.
1N/A
1N/A=item lib/io_poll
1N/A
1N/AIO poll().
1N/A
1N/A=item lib/io_unix
1N/A
1N/AUNIX sockets.
1N/A
1N/A=item op/attrs
1N/A
1N/ARegression tests for C<my ($x,@y,%z) : attrs> and <sub : attrs>.
1N/A
1N/A=item op/filetest
1N/A
1N/AFile test operators.
1N/A
1N/A=item op/lex_assign
1N/A
1N/AVerify operations that access pad objects (lexicals and temporaries).
1N/A
1N/A=item op/exists_sub
1N/A
1N/AVerify C<exists &sub> operations.
1N/A
1N/A=back
1N/A
1N/A=head1 Incompatible Changes
1N/A
1N/A=head2 Perl Source Incompatibilities
1N/A
1N/ABeware that any new warnings that have been added or old ones
1N/Athat have been enhanced are B<not> considered incompatible changes.
1N/A
1N/ASince all new warnings must be explicitly requested via the C<-w>
1N/Aswitch or the C<warnings> pragma, it is ultimately the programmer's
1N/Aresponsibility to ensure that warnings are enabled judiciously.
1N/A
1N/A=over 4
1N/A
1N/A=item CHECK is a new keyword
1N/A
1N/AAll subroutine definitions named CHECK are now special. See
1N/AC</"Support for CHECK blocks"> for more information.
1N/A
1N/A=item Treatment of list slices of undef has changed
1N/A
1N/AThere is a potential incompatibility in the behavior of list slices
1N/Athat are comprised entirely of undefined values.
1N/ASee L</"Behavior of list slices is more consistent">.
1N/A
1N/A=item Format of $English::PERL_VERSION is different
1N/A
1N/AThe English module now sets $PERL_VERSION to $^V (a string value) rather
1N/Athan C<$]> (a numeric value). This is a potential incompatibility.
1N/ASend us a report via perlbug if you are affected by this.
1N/A
1N/ASee L</"Improved Perl version numbering system"> for the reasons for
1N/Athis change.
1N/A
1N/A=item Literals of the form C<1.2.3> parse differently
1N/A
1N/APreviously, numeric literals with more than one dot in them were
1N/Ainterpreted as a floating point number concatenated with one or more
1N/Anumbers. Such "numbers" are now parsed as strings composed of the
1N/Aspecified ordinals.
1N/A
1N/AFor example, C<print 97.98.99> used to output C<97.9899> in earlier
1N/Aversions, but now prints C<abc>.
1N/A
1N/ASee L</"Support for strings represented as a vector of ordinals">.
1N/A
1N/A=item Possibly changed pseudo-random number generator
1N/A
1N/APerl programs that depend on reproducing a specific set of pseudo-random
1N/Anumbers may now produce different output due to improvements made to the
1N/Arand() builtin. You can use C<sh Configure -Drandfunc=rand> to obtain
1N/Athe old behavior.
1N/A
1N/ASee L</"Better pseudo-random number generator">.
1N/A
1N/A=item Hashing function for hash keys has changed
1N/A
1N/AEven though Perl hashes are not order preserving, the apparently
1N/Arandom order encountered when iterating on the contents of a hash
1N/Ais actually determined by the hashing algorithm used. Improvements
1N/Ain the algorithm may yield a random order that is B<different> from
1N/Athat of previous versions, especially when iterating on hashes.
1N/A
1N/ASee L</"Better worst-case behavior of hashes"> for additional
1N/Ainformation.
1N/A
1N/A=item C<undef> fails on read only values
1N/A
1N/AUsing the C<undef> operator on a readonly value (such as $1) has
1N/Athe same effect as assigning C<undef> to the readonly value--it
1N/Athrows an exception.
1N/A
1N/A=item Close-on-exec bit may be set on pipe and socket handles
1N/A
1N/APipe and socket handles are also now subject to the close-on-exec
1N/Abehavior determined by the special variable $^F.
1N/A
1N/ASee L</"More consistent close-on-exec behavior">.
1N/A
1N/A=item Writing C<"$$1"> to mean C<"${$}1"> is unsupported
1N/A
1N/APerl 5.004 deprecated the interpretation of C<$$1> and
1N/Asimilar within interpolated strings to mean C<$$ . "1">,
1N/Abut still allowed it.
1N/A
1N/AIn Perl 5.6.0 and later, C<"$$1"> always means C<"${$1}">.
1N/A
1N/A=item delete(), each(), values() and C<\(%h)>
1N/A
1N/Aoperate on aliases to values, not copies
1N/A
1N/Adelete(), each(), values() and hashes (e.g. C<\(%h)>)
1N/Ain a list context return the actual
1N/Avalues in the hash, instead of copies (as they used to in earlier
1N/Aversions). Typical idioms for using these constructs copy the
1N/Areturned values, but this can make a significant difference when
1N/Acreating references to the returned values. Keys in the hash are still
1N/Areturned as copies when iterating on a hash.
1N/A
1N/ASee also L</"delete(), each(), values() and hash iteration are faster">.
1N/A
1N/A=item vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS
1N/A
1N/Avec() generates a run-time error if the BITS argument is not
1N/Aa valid power-of-two integer.
1N/A
1N/A=item Text of some diagnostic output has changed
1N/A
1N/AMost references to internal Perl operations in diagnostics
1N/Ahave been changed to be more descriptive. This may be an
1N/Aissue for programs that may incorrectly rely on the exact
1N/Atext of diagnostics for proper functioning.
1N/A
1N/A=item C<%@> has been removed
1N/A
1N/AThe undocumented special variable C<%@> that used to accumulate
1N/A"background" errors (such as those that happen in DESTROY())
1N/Ahas been removed, because it could potentially result in memory
1N/Aleaks.
1N/A
1N/A=item Parenthesized not() behaves like a list operator
1N/A
1N/AThe C<not> operator now falls under the "if it looks like a function,
1N/Ait behaves like a function" rule.
1N/A
1N/AAs a result, the parenthesized form can be used with C<grep> and C<map>.
1N/AThe following construct used to be a syntax error before, but it works
1N/Aas expected now:
1N/A
1N/A grep not($_), @things;
1N/A
1N/AOn the other hand, using C<not> with a literal list slice may not
1N/Awork. The following previously allowed construct:
1N/A
1N/A print not (1,2,3)[0];
1N/A
1N/Aneeds to be written with additional parentheses now:
1N/A
1N/A print not((1,2,3)[0]);
1N/A
1N/AThe behavior remains unaffected when C<not> is not followed by parentheses.
1N/A
1N/A=item Semantics of bareword prototype C<(*)> have changed
1N/A
1N/AThe semantics of the bareword prototype C<*> have changed. Perl 5.005
1N/Aalways coerced simple scalar arguments to a typeglob, which wasn't useful
1N/Ain situations where the subroutine must distinguish between a simple
1N/Ascalar and a typeglob. The new behavior is to not coerce bareword
1N/Aarguments to a typeglob. The value will always be visible as either
1N/Aa simple scalar or as a reference to a typeglob.
1N/A
1N/ASee L</"More functional bareword prototype (*)">.
1N/A
1N/A=item Semantics of bit operators may have changed on 64-bit platforms
1N/A
1N/AIf your platform is either natively 64-bit or if Perl has been
1N/Aconfigured to used 64-bit integers, i.e., $Config{ivsize} is 8,
1N/Athere may be a potential incompatibility in the behavior of bitwise
1N/Anumeric operators (& | ^ ~ << >>). These operators used to strictly
1N/Aoperate on the lower 32 bits of integers in previous versions, but now
1N/Aoperate over the entire native integral width. In particular, note
1N/Athat unary C<~> will produce different results on platforms that have
1N/Adifferent $Config{ivsize}. For portability, be sure to mask off
1N/Athe excess bits in the result of unary C<~>, e.g., C<~$x & 0xffffffff>.
1N/A
1N/ASee L</"Bit operators support full native integer width">.
1N/A
1N/A=item More builtins taint their results
1N/A
1N/AAs described in L</"Improved security features">, there may be more
1N/Asources of taint in a Perl program.
1N/A
1N/ATo avoid these new tainting behaviors, you can build Perl with the
1N/AConfigure option C<-Accflags=-DINCOMPLETE_TAINTS>. Beware that the
1N/Aensuing perl binary may be insecure.
1N/A
1N/A=back
1N/A
1N/A=head2 C Source Incompatibilities
1N/A
1N/A=over 4
1N/A
1N/A=item C<PERL_POLLUTE>
1N/A
1N/ARelease 5.005 grandfathered old global symbol names by providing preprocessor
1N/Amacros for extension source compatibility. As of release 5.6.0, these
1N/Apreprocessor definitions are not available by default. You need to explicitly
1N/Acompile perl with C<-DPERL_POLLUTE> to get these definitions. For
1N/Aextensions still using the old symbols, this option can be
1N/Aspecified via MakeMaker:
1N/A
1N/A perl Makefile.PL POLLUTE=1
1N/A
1N/A=item C<PERL_IMPLICIT_CONTEXT>
1N/A
1N/AThis new build option provides a set of macros for all API functions
1N/Asuch that an implicit interpreter/thread context argument is passed to
1N/Aevery API function. As a result of this, something like C<sv_setsv(foo,bar)>
1N/Aamounts to a macro invocation that actually translates to something like
1N/AC<Perl_sv_setsv(my_perl,foo,bar)>. While this is generally expected
1N/Ato not have any significant source compatibility issues, the difference
1N/Abetween a macro and a real function call will need to be considered.
1N/A
1N/AThis means that there B<is> a source compatibility issue as a result of
1N/Athis if your extensions attempt to use pointers to any of the Perl API
1N/Afunctions.
1N/A
1N/ANote that the above issue is not relevant to the default build of
1N/APerl, whose interfaces continue to match those of prior versions
1N/A(but subject to the other options described here).
1N/A
1N/ASee L<perlguts/"The Perl API"> for detailed information on the
1N/Aramifications of building Perl with this option.
1N/A
1N/A NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
1N/A with one of -Dusethreads, -Dusemultiplicity, or both. It is not
1N/A intended to be enabled by users at this time.
1N/A
1N/A=item C<PERL_POLLUTE_MALLOC>
1N/A
1N/AEnabling Perl's malloc in release 5.005 and earlier caused the namespace of
1N/Athe system's malloc family of functions to be usurped by the Perl versions,
1N/Asince by default they used the same names. Besides causing problems on
1N/Aplatforms that do not allow these functions to be cleanly replaced, this
1N/Aalso meant that the system versions could not be called in programs that
1N/Aused Perl's malloc. Previous versions of Perl have allowed this behaviour
1N/Ato be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor
1N/Adefinitions.
1N/A
1N/AAs of release 5.6.0, Perl's malloc family of functions have default names
1N/Adistinct from the system versions. You need to explicitly compile perl with
1N/AC<-DPERL_POLLUTE_MALLOC> to get the older behaviour. HIDEMYMALLOC
1N/Aand EMBEDMYMALLOC have no effect, since the behaviour they enabled is now
1N/Athe default.
1N/A
1N/ANote that these functions do B<not> constitute Perl's memory allocation API.
1N/ASee L<perlguts/"Memory Allocation"> for further information about that.
1N/A
1N/A=back
1N/A
1N/A=head2 Compatible C Source API Changes
1N/A
1N/A=over 4
1N/A
1N/A=item C<PATCHLEVEL> is now C<PERL_VERSION>
1N/A
1N/AThe cpp macros C<PERL_REVISION>, C<PERL_VERSION>, and C<PERL_SUBVERSION>
1N/Aare now available by default from perl.h, and reflect the base revision,
1N/Apatchlevel, and subversion respectively. C<PERL_REVISION> had no
1N/Aprior equivalent, while C<PERL_VERSION> and C<PERL_SUBVERSION> were
1N/Apreviously available as C<PATCHLEVEL> and C<SUBVERSION>.
1N/A
1N/AThe new names cause less pollution of the B<cpp> namespace and reflect what
1N/Athe numbers have come to stand for in common practice. For compatibility,
1N/Athe old names are still supported when F<patchlevel.h> is explicitly
1N/Aincluded (as required before), so there is no source incompatibility
1N/Afrom the change.
1N/A
1N/A=back
1N/A
1N/A=head2 Binary Incompatibilities
1N/A
1N/AIn general, the default build of this release is expected to be binary
1N/Acompatible for extensions built with the 5.005 release or its maintenance
1N/Aversions. However, specific platforms may have broken binary compatibility
1N/Adue to changes in the defaults used in hints files. Therefore, please be
1N/Asure to always check the platform-specific README files for any notes to
1N/Athe contrary.
1N/A
1N/AThe usethreads or usemultiplicity builds are B<not> binary compatible
1N/Awith the corresponding builds in 5.005.
1N/A
1N/AOn platforms that require an explicit list of exports (AIX, OS/2 and Windows,
1N/Aamong others), purely internal symbols such as parser functions and the
1N/Arun time opcodes are not exported by default. Perl 5.005 used to export
1N/Aall functions irrespective of whether they were considered part of the
1N/Apublic API or not.
1N/A
1N/AFor the full list of public API functions, see L<perlapi>.
1N/A
1N/A=head1 Known Problems
1N/A
1N/A=head2 Thread test failures
1N/A
1N/AThe subtests 19 and 20 of lib/thr5005.t test are known to fail due to
1N/Afundamental problems in the 5.005 threading implementation. These are
1N/Anot new failures--Perl 5.005_0x has the same bugs, but didn't have these
1N/Atests.
1N/A
1N/A=head2 EBCDIC platforms not supported
1N/A
1N/AIn earlier releases of Perl, EBCDIC environments like OS390 (also
1N/Aknown as Open Edition MVS) and VM-ESA were supported. Due to changes
1N/Arequired by the UTF-8 (Unicode) support, the EBCDIC platforms are not
1N/Asupported in Perl 5.6.0.
1N/A
1N/A=head2 In 64-bit HP-UX the lib/io_multihomed test may hang
1N/A
1N/AThe lib/io_multihomed test may hang in HP-UX if Perl has been
1N/Aconfigured to be 64-bit. Because other 64-bit platforms do not
1N/Ahang in this test, HP-UX is suspect. All other tests pass
1N/Ain 64-bit HP-UX. The test attempts to create and connect to
1N/A"multihomed" sockets (sockets which have multiple IP addresses).
1N/A
1N/A=head2 NEXTSTEP 3.3 POSIX test failure
1N/A
1N/AIn NEXTSTEP 3.3p2 the implementation of the strftime(3) in the
1N/Aoperating system libraries is buggy: the %j format numbers the days of
1N/Aa month starting from zero, which, while being logical to programmers,
1N/Awill cause the subtests 19 to 27 of the lib/posix test may fail.
1N/A
1N/A=head2 Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc
1N/A
1N/AIf compiled with gcc 2.95 the lib/sdbm test will fail (dump core).
1N/AThe cure is to use the vendor cc, it comes with the operating system
1N/Aand produces good code.
1N/A
1N/A=head2 UNICOS/mk CC failures during Configure run
1N/A
1N/AIn UNICOS/mk the following errors may appear during the Configure run:
1N/A
1N/A Guessing which symbols your C compiler and preprocessor define...
1N/A CC-20 cc: ERROR File = try.c, Line = 3
1N/A ...
1N/A bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
1N/A ...
1N/A 4 errors detected in the compilation of "try.c".
1N/A
1N/AThe culprit is the broken awk of UNICOS/mk. The effect is fortunately
1N/Arather mild: Perl itself is not adversely affected by the error, only
1N/Athe h2ph utility coming with Perl, and that is rather rarely needed
1N/Athese days.
1N/A
1N/A=head2 Arrow operator and arrays
1N/A
1N/AWhen the left argument to the arrow operator C<< -> >> is an array, or
1N/Athe C<scalar> operator operating on an array, the result of the
1N/Aoperation must be considered erroneous. For example:
1N/A
1N/A @x->[2]
1N/A scalar(@x)->[2]
1N/A
1N/AThese expressions will get run-time errors in some future release of
1N/APerl.
1N/A
1N/A=head2 Experimental features
1N/A
1N/AAs discussed above, many features are still experimental. Interfaces and
1N/Aimplementation of these features are subject to change, and in extreme cases,
1N/Aeven subject to removal in some future release of Perl. These features
1N/Ainclude the following:
1N/A
1N/A=over 4
1N/A
1N/A=item Threads
1N/A
1N/A=item Unicode
1N/A
1N/A=item 64-bit support
1N/A
1N/A=item Lvalue subroutines
1N/A
1N/A=item Weak references
1N/A
1N/A=item The pseudo-hash data type
1N/A
1N/A=item The Compiler suite
1N/A
1N/A=item Internal implementation of file globbing
1N/A
1N/A=item The DB module
1N/A
1N/A=item The regular expression code constructs:
1N/A
1N/AC<(?{ code })> and C<(??{ code })>
1N/A
1N/A=back
1N/A
1N/A=head1 Obsolete Diagnostics
1N/A
1N/A=over 4
1N/A
1N/A=item Character class syntax [: :] is reserved for future extensions
1N/A
1N/A(W) Within regular expression character classes ([]) the syntax beginning
1N/Awith "[:" and ending with ":]" is reserved for future extensions.
1N/AIf you need to represent those character sequences inside a regular
1N/Aexpression character class, just quote the square brackets with the
1N/Abackslash: "\[:" and ":\]".
1N/A
1N/A=item Ill-formed logical name |%s| in prime_env_iter
1N/A
1N/A(W) A warning peculiar to VMS. A logical name was encountered when preparing
1N/Ato iterate over %ENV which violates the syntactic rules governing logical
1N/Anames. Because it cannot be translated normally, it is skipped, and will not
1N/Aappear in %ENV. This may be a benign occurrence, as some software packages
1N/Amight directly modify logical name tables and introduce nonstandard names,
1N/Aor it may indicate that a logical name table has been corrupted.
1N/A
1N/A=item In string, @%s now must be written as \@%s
1N/A
1N/AThe description of this error used to say:
1N/A
1N/A (Someday it will simply assume that an unbackslashed @
1N/A interpolates an array.)
1N/A
1N/AThat day has come, and this fatal error has been removed. It has been
1N/Areplaced by a non-fatal warning instead.
1N/ASee L</Arrays now always interpolate into double-quoted strings> for
1N/Adetails.
1N/A
1N/A=item Probable precedence problem on %s
1N/A
1N/A(W) The compiler found a bareword where it expected a conditional,
1N/Awhich often indicates that an || or && was parsed as part of the
1N/Alast argument of the previous construct, for example:
1N/A
1N/A open FOO || die;
1N/A
1N/A=item regexp too big
1N/A
1N/A(F) The current implementation of regular expressions uses shorts as
1N/Aaddress offsets within a string. Unfortunately this means that if
1N/Athe regular expression compiles to longer than 32767, it'll blow up.
1N/AUsually when you want a regular expression this big, there is a better
1N/Away to do it with multiple statements. See L<perlre>.
1N/A
1N/A=item Use of "$$<digit>" to mean "${$}<digit>" is deprecated
1N/A
1N/A(D) Perl versions before 5.004 misinterpreted any type marker followed
1N/Aby "$" and a digit. For example, "$$0" was incorrectly taken to mean
1N/A"${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.
1N/A
1N/AHowever, the developers of Perl 5.004 could not fix this bug completely,
1N/Abecause at least two widely-used modules depend on the old meaning of
1N/A"$$0" in a string. So Perl 5.004 still interprets "$$<digit>" in the
1N/Aold (broken) way inside strings; but it generates this message as a
1N/Awarning. And in Perl 5.005, this special treatment will cease.
1N/A
1N/A=back
1N/A
1N/A=head1 Reporting Bugs
1N/A
1N/AIf you find what you think is a bug, you might check the
1N/Aarticles recently posted to the comp.lang.perl.misc newsgroup.
1N/AThere may also be information at http://www.perl.com/perl/ , the Perl
1N/AHome Page.
1N/A
1N/AIf you believe you have an unreported bug, please run the B<perlbug>
1N/Aprogram included with your release. Be sure to trim your bug down
1N/Ato a tiny but sufficient test case. Your bug report, along with the
1N/Aoutput of C<perl -V>, will be sent off to perlbug@perl.org to be
1N/Aanalysed by the Perl porting team.
1N/A
1N/A=head1 SEE ALSO
1N/A
1N/AThe F<Changes> file for exhaustive details on what changed.
1N/A
1N/AThe F<INSTALL> file for how to build Perl.
1N/A
1N/AThe F<README> file for general stuff.
1N/A
1N/AThe F<Artistic> and F<Copying> files for copyright information.
1N/A
1N/A=head1 HISTORY
1N/A
1N/AWritten by Gurusamy Sarathy <F<gsar@activestate.com>>, with many
1N/Acontributions from The Perl Porters.
1N/A
1N/ASend omissions or corrections to <F<perlbug@perl.org>>.
1N/A
1N/A=cut