1N/Aperl572delta - what's new for perl v5.7.2
1N/AThis document describes differences between the 5.7.1 release and the
1N/A(To view the differences between the 5.6.0 release and the 5.7.0
1N/Arelease, see L<perl570delta>. To view the differences between the
1N/A5.7.0 release and the 5.7.1 release, see L<perl571delta>.)
1N/A=head1 Security Vulnerability Closed
1N/A(This change was already made in 5.7.0 but bears repeating here.)
1N/AA security vulnerability affecting all Perl versions prior to 5.6.1
1N/Awas found in August 2000. The vulnerability does not affect default
1N/Ainstallations and as far as is known affects only the Linux platform.
1N/AYou should upgrade your Perl to 5.6.1 as soon as possible. Patches
1N/Afor earlier releases exist but using the patches require full
1N/Arecompilation from the source code anyway, so 5.6.1 is your best
1N/Afor more information.
1N/A=head1 Incompatible Changes
1N/A=head2 64-bit platforms and malloc
1N/AIf your pointers are 64 bits wide, the Perl malloc is no more being
1N/Aused because it simply does not work with 8-byte pointers. Also,
1N/Ausually the system malloc on such platforms are much better optimized
1N/Afor such large memory models than the Perl malloc.
1N/A=head2 AIX Dynaloading
1N/AThe AIX dynaloading now uses in AIX releases 4.3 and newer the native
1N/Adlopen interface of AIX instead of the old emulated interface. This
1N/Achange will probably break backward compatibility with compiled
1N/Amodules. The change was made to make Perl more compliant with other
1N/Aapplications like modperl which are using the AIX native interface.
1N/A=head2 Socket Extension Dynamic in VMS
1N/AThe Socket extension is now dynamically loaded instead of being
1N/Astatically built in. This may or may not be a problem with ancient
1N/ATCP/IP stacks of VMS: we do not know since we weren't able to test
1N/APerl in such configurations.
1N/A=head2 Different Definition of the Unicode Character Classes \p{In...}
1N/AAs suggested by the Unicode consortium, the Unicode character classes
1N/Anow prefer I<scripts> as opposed to I<blocks> (as defined by Unicode);
1N/Ain Perl, when the C<\p{In....}> and the C<\p{In....}> regular expression
1N/Aconstructs are used. This has changed the definition of some of those
1N/AThe difference between scripts and blocks is that scripts are the
1N/Aglyphs used by a language or a group of languages, while the blocks
1N/Aare more artificial groupings of 256 characters based on the Unicode
1N/AIn general this change results in more inclusive Unicode character
1N/Aclasses, but changes to the other direction also do take place:
1N/Afor example while the script C<Latin> includes all the Latin
1N/Acharacters and their various diacritic-adorned versions, it
1N/Adoes not include the various punctuation or digits (since they
1N/Aare not solely C<Latin>).
1N/AChanges in the character class semantics may have happened if a script
1N/Aand a block happen to have the same name, for example C<Hebrew>.
1N/AIn such cases the script wins and C<\p{InHebrew}> now means the script
1N/Adefinition of Hebrew. The block definition in still available,
1N/Athough, by appending C<Block> to the name: C<\p{InHebrewBlock}> means
1N/Awhat C<\p{InHebrew}> meant in perl 5.6.0. For the full list
1N/AThe current user-visible implementation of pseudo-hashes (the weird
1N/Ause of the first array element) is deprecated starting from Perl 5.8.0
1N/Aand will be removed in Perl 5.10.0, and the feature will be
1N/Aimplemented differently. Not only is the current interface rather
1N/Augly, but the current implementation slows down normal array and hash
1N/Ause quite noticeably. The C<fields> pragma interface will remain
1N/AThe syntaxes C<< @a->[...] >> and C<< @h->{...} >> have now been deprecated.
1N/AThe suidperl is also considered to be too much a risk to continue
1N/Amaintaining and the suidperl code is likely to be removed in a future
1N/AThe C<package;> syntax (C<package> without an argument has been
1N/Adeprecated. Its semantics were never that clear and its
1N/Aimplementation even less so. If you have used that feature to
1N/Adisallow all but fully qualified variables, C<use strict;> instead.
1N/AThe chdir(undef) and chdir('') behaviors to match chdir() has been
1N/Adeprecated. In future versions, chdir(undef) and chdir('') will
1N/A=head1 Core Enhancements
1N/AIn general a lot of fixing has happened in the area of Perl's
1N/Aunderstanding of numbers, both integer and floating point. Since in
1N/Amany systems the standard number parsing functions like C<strtoul()>
1N/Aand C<atof()> seem to have bugs, Perl tries to work around their
1N/Adeficiencies. This results hopefully in more accurate numbers.
1N/AThe rules for allowing underscores (underbars) in numeric constants
1N/Ahave been relaxed and simplified: now you can have an underscore
1N/AGMAGIC (right-hand side magic) could in many cases such as string
1N/Aconcatenation be invoked too many times.
1N/ALexicals I: lexicals outside an eval "" weren't resolved
1N/Acorrectly inside a subroutine definition inside the eval "" if they
1N/Awere not already referenced in the top level of the eval""ed code.
1N/ALexicals II: lexicals leaked at file scope into subroutines that
1N/Awere declared before the lexicals.
1N/ALvalue subroutines can now return C<undef> in list context.
1N/AThe C<op_clear> and C<op_null> are now exported.
1N/AA new special regular expression variable has been introduced:
1N/AC<$^N>, which contains the most-recently closed group (submatch).
1N/AL<utime> now supports C<utime undef, undef, @files> to change the
1N/Afile timestamps to the current time.
1N/AThe Perl parser has been stress tested using both random input and
1N/AC<eval "v200"> now works.
1N/AVMS now works under PerlIO.
1N/AEND blocks are now run even if you
exit/die in a BEGIN block.
1N/AThe execution of END blocks is now controlled by
1N/APL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new
1N/Abehaviour for perl embedders. This will default in 5.10. See
1N/A=head1 Modules and Pragmata
1N/A=head2 New Modules and Distributions
1N/AL<Attribute::Handlers> - Simpler definition of attribute handlers
1N/AL<ExtUtils::Constant> - generate XS code to import C header constants
1N/AL<I18N::Langinfo> - query locale information
1N/AL<I18N::LangTags> - functions for dealing with RFC3066-style language tags
1N/AL<libnet> - a collection of perl5 modules related to network programming
1N/APerl installation leaves libnet unconfigured, use F<libnetcfg> to configure.
1N/AL<List::Util> - selection of general-utility list subroutines
1N/AL<Locale::Maketext> - framework for localization
1N/AL<Memoize> - Make your functions faster by trading space for time
1N/AL<NEXT> - pseudo-class for method redispatch
1N/AL<Scalar::Util> - selection of general-utility scalar subroutines
1N/AL<Test::More> - yet another framework for writing test scripts
1N/AL<Test::Simple> - Basic utilities for writing tests
1N/AL<Time::HiRes> - high resolution ualarm, usleep, and gettimeofday
1N/AL<Time::Piece> - Object Oriented time objects
1N/A(Previously known as L<Time::Object>.)
1N/AL<Time::Seconds> - a simple API to convert seconds to other date values
1N/AL<UnicodeCD> - Unicode Character Database
1N/A=head2 Updated And Improved Modules and Pragmata
1N/AL<B::Deparse> module has been significantly enhanced. It now
1N/Acan deparse almost all of the standard test suite (so that the
1N/AL<Class::Struct> now assigns the
array/hash element if the accessor
1N/AL<Cwd> extension is now (even) faster.
1N/AL<DB_File> extension has been updated to version 1.77.
1N/AL<Fcntl>, L<Socket>, and L<Sys::Syslog> have been rewritten to use the
1N/Anew-style constant dispatch section (see L<ExtUtils::Constant>).
1N/AL<File::Find> is now (again) reentrant. It also has been made
1N/AL<File::Glob> now supports C<GLOB_LIMIT> constant to limit the
1N/Asize of the returned list of filenames.
1N/AL<IO::Socket::INET> now supports C<LocalPort> of zero (usually meaning
1N/Athat the operating system will make one up.)
1N/AThe L<vars> pragma now supports declaring fully qualified variables.
1N/A(Something that C<our()> does not and will not support.)
1N/A=head1 Utility Changes
1N/AL<h2ph> now supports C trigraphs.
1N/AL<h2xs> uses the new L<ExtUtils::Constant> module which will affect
1N/Anewly created extensions that define constants. Since the new code is
1N/Amore correct (if you have two constants where the first one is a
1N/Aprefix of the second one, the first constant B<never> gets defined),
1N/Aless lossy (it uses integers for integer constant, as opposed to the
1N/Aold code that used floating point numbers even for integer constants),
1N/Aand slightly faster, you might want to consider regenerating your
1N/Aextension code (the new scheme makes regenerating easy).
1N/AL<h2xs> now also supports C trigraphs.
1N/AL<libnetcfg> has been added to configure the libnet.
1N/AThe F<Pod::Html> (and thusly L<pod2html>) now allows specifying
1N/A=head1 New Documentation
1N/AL<Locale::Maketext::TPJ13> is an article about software localization,
1N/Aoriginally published in The Perl Journal #13, republished here with
1N/AMore README.$PLATFORM files have been converted into pod, which also
1N/Ameans that they also be installed as perl$PLATFORM documentation
1N/Afiles. The new files are L<perlapollo>, L<perlbeos>, L<perldgux>,
1N/AL<perlhurd>, L<perlmint>, L<perlnetware>, L<perlplan9>, L<perlqnx>,
1N/AThe F<Todo> and F<Todo-5.6> files have been merged into L<perltodo>.
1N/AUse of the F<gprof> tool to profile Perl has been documented in
1N/Agprofiled Perl executable.
1N/A=head1 Installation and Configuration Improvements
1N/A=head2 New Or Improved Platforms
1N/AAIX should now work better with gcc, threads, and 64-bitness. Also the
1N/Along doubles support in AIX should be better now. See L<perlaix>.
1N/ADG/UX platform now supports the 5.005-style threads. See L<perldgux>.
1N/ASeveral Mac OS (Classic) portability patches have been applied. We
1N/Ahope to get a fully working port by 5.8.0. (The remaining problems
1N/Arelate to the changed IO model of Perl.) See L<perlmacos>.
1N/AMac OS X (or Darwin) should now be able to build Perl even on HFS+
1N/Afilesystems. (The case-insensitivity confused the Perl build process.)
1N/ANetWare from Novell is now supported. See L<perlnetware>.
1N/AThe Amdahl UTS UNIX mainframe platform is now supported.
1N/A=head2 Generic Improvements
1N/AIn AFS installations one can configure the root of the AFS to be
1N/Asomewhere else than the default F</afs> by using the Configure
1N/AThe version of Berkeley DB used when the Perl (and, presumably, the
1N/ADB_File extension) was built is now available as
1N/AC<@Config{qw(db_version_major db_version_minor db_version_patch)}>
1N/Afrom Perl and as C<DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG
1N/ADB_VERSION_PATCH_CFG> from C.
1N/AThe Thread extension is now not built at all under ithreads
1N/A(C<Configure -Duseithreads>) because it wouldn't work anyway (the
1N/AThread extension requires being Configured with C<-Duse5005threads>).
1N/AThe C<B::Deparse> compiler backend has been so significantly improved
1N/Athat almost the whole Perl test suite passes after being deparsed. A
1N/Amake target has been added to help in further testing: C<make
test.deparse>.
1N/A=head1 Selected Bug Fixes
1N/AThe autouse pragma didn't work for Multi::Part::Function::Names.
1N/AThe behaviour of non-decimal but numeric string constants such as
1N/A"0x23" was platform-dependent: in some platforms that was seen as 35,
1N/Ain some as 0, in some as a floating point number (don't ask). This
1N/Awas caused by Perl using the operating system libraries in a situation
1N/Awhere the result of the string to number conversion is undefined: now
1N/APerl consistently handles such strings as zero in numeric contexts.
1N/AL<dprofpp> -R didn't work.
1N/APERL5OPT with embedded spaces didn't work.
1N/AL<Sys::Syslog> ignored the C<LOG_AUTH> constant.
1N/A=head2 Platform Specific Changes and Fixes
1N/ASome versions of glibc have a broken modfl(). This affects builds
1N/Awith C<-Duselongdouble>. This version of Perl detects this brokenness
1N/Aand has a workaround for it. The glibc release 2.2.2 is known to have
1N/Afixed the modfl() bug.
1N/A=head1 New or Changed Diagnostics
1N/AIn the regular expression diagnostics the C<E<lt>E<lt> HERE> marker
1N/Aintroduced in 5.7.0 has been changed to be C<E<lt>-- HERE> since too
1N/Amany people found the C<E<lt>E<lt>> to be too similar to here-document
1N/Ausing the C<"C"> format you will get an optional warning. Similarly
1N/Afor the C<"c"> format and a number less than -128 or more than 127.
1N/ACertain regex modifiers such as C<(?o)> make sense only if applied to
1N/Athe entire regex. You will an optional warning if you try to do otherwise.
1N/AUsing arrays or hashes as references (
e.g. C<< %foo->{bar} >> has been
1N/Adeprecated for a while. Now you will get an optional warning.
1N/A=head1 Source Code Enhancements
1N/A=head2 MAGIC constants
1N/AThe MAGIC constants (
e.g. C<'P'>) have been macrofied
1N/A(
e.g. C<PERL_MAGIC_TIED>) for better source code readability
1N/A=head2 Better commented code
1N/AThe regex compiler now maintains a structure that identifies nodes in
1N/Athe compiled bytecode with the corresponding syntactic features of the
1N/Aoriginal regex expression. The information is attached to the new
1N/AC<offsets> member of the C<struct regexp>. See L<perldebguts> for more
1N/Acomplete information.
1N/AThe C code has been made much more C<gcc -Wall> clean. Some warning
1N/Amessages still remain, though, so if you are compiling with gcc you
1N/Awill see some warnings about dubious practices. The warnings are
1N/ASeveral new tests have been added, especially for the F<lib> subsection.
1N/AThe tests are now reported in a different order than in earlier Perls.
1N/A(This happens because the test scripts from under
t/lib have been moved
1N/A=head1 Known Problems
1N/ANote that unlike other sections in this document (which describe
1N/Achanges since 5.7.0) this section is cumulative containing known
1N/Aproblems for all the 5.7 releases.
1N/AIn AIX 4.2 Perl extensions that use C++ functions that use statics
1N/Amay have problems in that the statics are not getting initialized.
1N/AIn newer AIX releases this has been solved by linking Perl with
1N/Athe libC_r library, but unfortunately in AIX 4.2 the said library
1N/Ahas an obscure bug where the various functions related to time
1N/A(such as time() and gettimeofday()) return broken values, and
1N/Atherefore in AIX 4.2 Perl is not linked against the libC_r.
1N/Avac 5.0.0.0 May Produce Buggy Code For Perl
1N/AThe AIX C compiler vac version 5.0.0.0 may produce buggy code,
1N/Aresulting in few random tests failing, but when the failing tests
1N/Aare run by hand, they succeed. We suggest upgrading to at least
1N/Avac version 5.0.1.0, that has been known to compile Perl correctly.
1N/A"lslpp -L|grep
vac.C" will tell you the vac version.
1N/A=head2 Amiga Perl Invoking Mystery
1N/AOne cannot call Perl using the C<volume:> syntax, that is, C<perl -v>
1N/Aworks, but for example C<bin:perl -v> doesn't. The exact reason is
1N/Aknown but the current suspect is the F<ixemul> library.
1N/ADon't panic. Read INSTALL 'make test' section instead.
1N/AThe subtests 11 and 12 sometimes fail and sometimes work.
1N/Aconfigured to be 64-bit. Because other 64-bit platforms do not hang in
1N/Athis test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
1N/Atest attempts to create and connect to "multihomed" sockets (sockets
1N/Awhich have multiple IP addresses).
1N/AIf perl is configured with -Duse64bitall, the successful result of the
1N/Asubtest 10 of
lib/posix may arrive before the successful result of the
1N/Asubtest 9, which confuses the test harness so much that it thinks the
1N/AOS/390 has rather many test failures but the situation is actually
1N/Abetter than it was in 5.6.0, it's just that so many new modules and
1N/Atests have been added.
1N/A Failed Test Stat Wstat Total Fail Failed List of Failed
1N/A -----------------------------------------------------------------------------
1N/A Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay.
1N/AThe
op/sprintf tests 129 and 130 are known to fail on some platforms.
1N/AThe failing platforms do not comply with the ANSI C Standard, line
1N/A19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
1N/Asomething other than "1" and "-1" when formatting 0.6 and -0.6 using
1N/Athe printf format "%.0f", most often they produce "0" and "-0".)
1N/A=head2 Failure of Thread tests
1N/AB<Note that support for 5.005-style threading remains experimental.>
1N/AThe following tests are known to fail due to fundamental problems in
1N/Athe 5.005 threading implementation. These are not new failures--Perl
1N/A5.005_0x has the same bugs, but didn't have these tests.
1N/Awhich is interesting since the test only has 27 tests.
1N/ANumerous numerical test failures
1N/AThese tests fail because of yet unresolved floating point inaccuracies.
1N/AThere are a few known test failures, see L<perluts>.
1N/ARather many tests are failing in VMS but that actually more tests
1N/Asucceed in VMS than they used to, it's just that there are many,
1N/Amany more tests than there used to be.
1N/ADEC C V5.3-006 on OpenVMS VAX V6.2
1N/A Failed 8/399 tests, 91.23% okay.
1N/ADEC C V6.0-001 on OpenVMS Alpha V7.2-1 and
1N/ACompaq C V6.2-008 on OpenVMS Alpha V7.1
1N/A Failed 4/399 tests, 92.48% okay.
1N/ACompaq C V6.4-005 on OpenVMS Alpha 7.2.1
1N/A Failed 6/401 tests, 92.77% okay.
1N/AIn multi-CPU boxes there are some problems with the I/O buffering:
1N/Asome output may appear twice.
1N/A=head2 Localising a Tied Variable Leaks Memory
1N/A tie my %tie_hash => 'Tie::StdHash';
1N/A local($tie_hash{Foo}) = 1; # leaks
1N/ACode like the above is known to leak memory every time the local()
1N/A=head2 Self-tying of Arrays and Hashes Is Forbidden
1N/ASelf-tying of arrays and hashes is broken in rather deep and
1N/Ahard-to-fix ways. As a stop-gap measure to avoid people from getting
1N/Afrustrated at the mysterious results (core dumps, most often) it is
1N/Afor now forbidden (you will get a fatal error even from an attempt).
1N/A=head2 Variable Attributes are not Currently Usable for Tieing
1N/AThis limitation will hopefully be fixed in future. (Subroutine
1N/Aattributes work fine for tieing, see L<Attribute::Handlers>).
1N/A=head2 Building Extensions Can Fail Because Of Largefiles
1N/ASome extensions like mod_perl are known to have issues with
1N/A`largefiles', a change brought by Perl 5.6.0 in which file offsets
1N/Adefault to 64 bits wide, where supported. Modules may fail to compile
1N/Aat all or compile and work incorrectly. Currently there is no good
1N/Asolution for the problem, but Configure now provides appropriate
1N/Anon-largefile ccflags, ldflags, libswanted, and libs in the %Config
1N/Ahash (
e.g., $Config{ccflags_nolargefiles}) so the extensions that are
1N/Ahaving problems can try configuring themselves without the
1N/Alargefileness. This is admittedly not a clean solution, and the
1N/Asolution may not even work at all. One potential failure is whether
1N/Aone can (or, if one can, whether it's a good idea) link together at
1N/Aall binaries with different ideas about file offsets, all this is
1N/A=head2 The Compiler Suite Is Still Experimental
1N/AThe compiler suite is slowly getting better but is nowhere near
1N/A=head2 The Long Double Support is Still Experimental
1N/AThe ability to configure Perl's numbers to use "long doubles",
1N/Afloating point numbers of hopefully better accuracy, is still
1N/Aexperimental. The implementations of long doubles are not yet
1N/Awidespread and the existing implementations are not quite mature
1N/Aor standardised, therefore trying to support them is a rare
1N/Aand moving target. The gain of more precision may also be offset
1N/Aby slowdown in computations (more bits to move around, and the
1N/Aoperations are more likely to be executed by less optimised
1N/A=head1 Reporting Bugs
1N/AIf you find what you think is a bug, you might check the articles
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/AThe F<Changes> file for exhaustive details on what changed.
1N/AThe F<INSTALL> file for how to build Perl.
1N/AThe F<README> file for general stuff.
1N/AThe F<Artistic> and F<Copying> files for copyright information.
1N/AWritten by Jarkko Hietaniemi <F<jhi@iki.fi>>, with many contributions
1N/Afrom The Perl Porters and Perl Users submitting feedback and patches.
1N/ASend omissions or corrections to <F<perlbug@perl.org>>.