Jarkko Hietaniemi > perl-5.7.3 > perldelta

Download:
perl-5.7.3.tar.gz

Annotate this POD

Source   Latest Release: perl-5.20.1

NAME ^

perldelta - what is new for perl v5.8.0

DESCRIPTION ^

This document describes differences between the 5.6.0 release and the 5.8.0 release.

Many of the bug fixes in 5.8.0 were already seen in the 5.6.1 maintenance release since the two releases were kept closely coordinated.

If you are upgrading from Perl 5.005_03, you might also want to read perl56delta.

Highlights In 5.8.0 ^

Incompatible Changes ^

64-bit platforms and malloc

If your pointers are 64 bits wide, the Perl malloc is no longer being used because it does not work well with 8-byte pointers. Also, usually the system mallocs on such platforms are much better optimized for such large memory models than the Perl malloc. Some memory-hungry Perl applications like the PDL don't work well with Perl's malloc. Finally, other applications than Perl (like modperl) tend to prefer the system malloc. Such platforms include Alpha and 64-bit HPPA, MIPS, PPC, and Sparc.

AIX Dynaloading

The AIX dynaloading now uses in AIX releases 4.3 and newer the native dlopen interface of AIX instead of the old emulated interface. This change will probably break backward compatibility with compiled modules. The change was made to make Perl more compliant with other applications like modperl which are using the AIX native interface.

Attributes for my variables now handled at run-time.

The my EXPR : ATTRS syntax now applies variable attributes at run-time. (Subroutine and our variables still get attributes applied at compile-time.) See attributes for additional details. In particular, however, this allows variable attributes to be useful for tie interfaces, which was a deficiency of earlier releases. Note that the new semantics doesn't work with the Attribute::Handlers module (as of version 0.76).

Socket Extension Dynamic in VMS

The Socket extension is now dynamically loaded instead of being statically built in. This may or may not be a problem with ancient TCP/IP stacks of VMS: we do not know since we weren't able to test Perl in such configurations.

IEEE-format Floating Point Default on OpenVMS Alpha

Perl now uses IEEE format (T_FLOAT) as the default internal floating point format on OpenVMS Alpha, potentially breaking binary compatibility with external libraries or existing data. G_FLOAT is still available as a configuration option. The default on VAX (D_FLOAT) has not changed.

New Unicode Properties

Unicode scripts are now supported. Scripts are similar to (and superior to) Unicode blocks. The difference between scripts and blocks is that scripts are the glyphs used by a language or a group of languages, while the blocks are more artificial groupings of (mostly) 256 characters based on the Unicode numbering.

In general, scripts are more inclusive, but not universally so. For example, while the script Latin includes all the Latin characters and their various diacritic-adorned versions, it does not include the various punctuation or digits (since they are not solely Latin).

A number of other properties are now supported, including \p{L&}, \p{Any} \p{Assigned}, \p{Unassigned}, \p{Blank} and \p{SpacePerl} (along with their \P{...} versions, of course). See perlunicode for details, and more additions.

The In or Is prefix to names used with the \p{...} and \P{...} are now almost always optional. The only exception is that a In prefix is required to signify a Unicode block when a block name conflicts with a script name. For example, \p{Tibetan} refers to the script, while \p{InTibetan} refers to the block. When there is no name conflict, you can omit the In from the block name (e.g. \p{BraillePatterns}), but to be safe, it's probably best to always use the In).

Perl Parser Stress Tested

The Perl parser has been stress tested using both random input and Markov chain input and the few found crashes and lockups have been fixed.

REF(...) Instead Of SCALAR(...)

A reference to a reference now stringifies as "REF(0x81485ec)" instead of "SCALAR(0x81485ec)" in order to be more consistent with the return value of ref().

pack/unpack D/F recycled

The undocumented pack/unpack template letters D/F have been recycled for better use: now they stand for long double (if supported by the platform) and NV (Perl internal floating point type). (They used to be aliases for f/d, but you never knew that.)

Deprecations

Core Enhancements ^

PerlIO is Now The Default

Safe Signals

Perl used to be fragile in that signals arriving at inopportune moments could corrupt Perl's internal state. Now Perl postpones handling of signals until it's safe (between opcodes).

This change may have surprising side effects because signals no longer interrupt Perl instantly. Perl will now first finish whatever it was doing, like finishing an internal operation (like sort()) or an external operation (like an I/O operation), and only then look at any arrived signals (and before starting the next operation). No more corrupt internal state since the current operation is always finished first, but the signal may take more time to get heard.

Unicode Overhaul

Unicode in general should be now much more usable than in Perl 5.6.0 (or even in 5.6.1). Unicode can be used in hash keys, Unicode in regular expressions should work now, Unicode in tr/// should work now, Unicode in I/O should work now.

Understanding of Numbers

In general a lot of fixing has happened in the area of Perl's understanding of numbers, both integer and floating point. Since in many systems the standard number parsing functions like strtoul() and atof() seem to have bugs, Perl tries to work around their deficiencies. This results hopefully in more accurate numbers.

Perl now tries internally to use integer values in numeric conversions and basic arithmetics (+ - * /) if the arguments are integers, and tries also to keep the results stored internally as integers. This change leads to often slightly faster and always less lossy arithmetics. (Previously Perl always preferred floating point numbers in its math.)

Miscellaneous Changes

Modules and Pragmata ^

New Modules and Pragmata

Updated And Improved Modules and Pragmata

Utility Changes ^

New Documentation ^

The following platform-specific documents are available before the installation as README.platform, and after the installation as perlplatform:

    perlaix perlamiga perlapollo perlbeos perlbs2000
    perlce perlcygwin perldgux perldos perlepoc perlhpux
    perlhurd perlmachten perlmacos perlmint perlmpeix
    perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
    perltru64 perluts perlvmesa perlvms perlvos perlwin32

Performance Enhancements ^

Installation and Configuration Improvements ^

Generic Improvements

New Or Improved Platforms

For the list of platforms known to support Perl, see "Supported Platforms" in perlport.

Selected Bug Fixes ^

Numerous memory leaks and uninitialized memory accesses have been hunted down. Most importantly anonymous subs used to leak quite a bit.

Platform Specific Changes and Fixes

New or Changed Diagnostics ^

Changed Internals ^

Security Vulnerability Closed ^

(This change was already made in 5.7.0 but bears repeating here.)

A potential security vulnerability in the optional suidperl component of Perl was identified in August 2000. suidperl is neither built nor installed by default. As of November 2001 the only known vulnerable platform is Linux, most likely all Linux distributions. CERT and various vendors and distributors have been alerted about the vulnerability. See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt for more information.

The problem was caused by Perl trying to report a suspected security exploit attempt using an external program, /bin/mail. On Linux platforms the /bin/mail program had an undocumented feature which when combined with suidperl gave access to a root shell, resulting in a serious compromise instead of reporting the exploit attempt. If you don't have /bin/mail, or if you have 'safe setuid scripts', or if suidperl is not installed, you are safe.

The exploit attempt reporting feature has been completely removed from Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also from all the Perl 5.7 releases), so that particular vulnerability isn't there anymore. However, further security vulnerabilities are, unfortunately, always possible. The suidperl functionality is most probably going to be removed in Perl 5.10. In any case, suidperl should only be used by security experts who know exactly what they are doing and why they are using suidperl instead of some other solution such as sudo (see http://www.courtesan.com/sudo/).

New Tests ^

Several new tests have been added, especially for the lib subsection. There are now about 34 000 individual tests (spread over about 530 test scripts), in the regression suite (5.6.1 has about 11700 tests, in 258 test scripts) Many of the new tests are introduced by the new modules, but still in general Perl is now more thoroughly tested.

Because of the large number of tests, running the regression suite will take considerably longer time than it used to: expect the suite to take up to 4-5 times longer to run than in perl 5.6. In a really fast machine you can hope to finish the suite in about 5 minutes (wallclock time).

The tests are now reported in a different order than in earlier Perls. (This happens because the test scripts from under t/lib have been moved to be closer to the library/extension they are testing.)

Known Problems ^

AIX

Amiga Perl Invoking Mystery

One cannot call Perl using the volume: syntax, that is, perl -v works, but for example bin:perl -v doesn't. The exact reason isn't known but the current suspect is the ixemul library.

lib/ftmp-security tests warn 'system possibly insecure'

Don't panic. Read INSTALL 'make test' section instead.

Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12

The subtests 11 and 12 sometimes fail and sometimes work.

FreeBSD 4.5 fails lib/File/Spec/t/rel2abs2rel.t

lib/File/Spec/t/rel2abs2rel.t tests that "`` works" by running a a perl 1 liner in backticks, using "$^X" as the path to perl. It is failing on FreeBSD 4.5, but only when run as part of make test. This seems to be a kernel problem rather than perl - reading the symlink /proc/curproc/file returns "unknown" rather than the path to perl, and a kernel debugger reveals that variable numfullpathfail2 in /usr/src/sys/kern/vfs_cache.c is being incremented whenever /proc/curproc/file fails to return the perl executable's path.

HP-UX lib/io_multihomed Fails When LP64-Configured

The lib/io_multihomed test may hang in HP-UX if Perl has been configured to be 64-bit. Because other 64-bit platforms do not hang in this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The test attempts to create and connect to "multihomed" sockets (sockets which have multiple IP addresses).

HP-UX lib/posix Subtest 9 Fails When LP64-Configured

If perl is configured with -Duse64bitall, the successful result of the subtest 10 of lib/posix may arrive before the successful result of the subtest 9, which confuses the test harness so much that it thinks the subtest 9 failed.

Linux With Sfio Fails op/misc Test 48

No known fix.

Mac OS X

The following tests are known to fail:

 Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
 -------------------------------------------------------------------------
 ../ext/DB_File/t/db-btree.t    0    11    ??   ??       %  ??
 ../ext/DB_File/t/db-recno.t              149    3   2.01%  61 63 65
 ../ext/POSIX/t/posix.t                    31    1   3.23%  10

OS/390

OS/390 has rather many test failures but the situation is actually better than it was in 5.6.0, it's just that so many new modules and tests have been added.

Failed 10/611 test scripts, 98.36% okay. 72/53809 subtests failed, 99.87% okay. Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- ../ext/B/t/deparse.t 17 1 5.88% 14 ../ext/IO/lib/IO/t/io_unix.t 5 4 80.00% 2-5 ../lib/utf8.t 94 13 13.83% 27 30-31 43 46 73 76 79 82 85 88 91 94 ../lib/Benchmark.t 1 256 159 1 0.63% 75 ../lib/ExtUtils/t/Embed.t 9 9 100.00% 1-9 ../lib/ExtUtils/t/ExtUtils.t 27 19 70.37% 5-23 op/pat.t 858 9 1.05% 242-243 665 776 785 832-834 845 op/sprintf.t 224 3 1.34% 98 100 136 op/tr.t 97 5 5.15% 63 71-74 uni/fold.t 767 8 1.04% 25-26 62 169 196 648 697-698 57 tests and 377 subtests skipped.

op/sprintf tests 129 and 130

The op/sprintf tests 129 and 130 are known to fail on some platforms. Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX. The failing platforms do not comply with the ANSI C Standard, line 19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce something other than "1" and "-1" when formatting 0.6 and -0.6 using the printf format "%.0f", most often they produce "0" and "-0".)

Failure of Thread tests

Note that support for 5.005-style threading remains experimental and practically unsupported.

The following tests are known to fail due to fundamental problems in the 5.005 threading implementation. These are not new failures--Perl 5.005_0x has the same bugs, but didn't have these tests.

  ext/List/Util/t/first         2
  lib/autouse                   4
  ext/Thread/thr5005            19-20

These failures are unlikely to get fixed as the 5.005-style threads are considered fundamentally broken.

UNICOS

  ../ext/Socket/socketpair.t    1   256    45    1   2.22%  12
  ../lib/Math/Trig.t                       26    1   3.85%  25
  ../lib/warnings.t                       460    1   0.22%  425
  io/fs.t                                  36    1   2.78%  31
  op/numconvert.t                        1440   13   0.90%  208 509-510
  657-658 665-666 829-830 989-990 1149-1150

UNICOS and UNICOS/mk

The io/fs test #31 is failing because in UNICOS and UNICOS/mk truncate() cannot be used to grow the size of filehandles, only to reduce the size. The workaround is to truncate files instead of filehandles.

UTS

There are a few known test failures, see perluts.

VMS

There should be no reported test failures with a default configuration, though there are a number of tests marked TODO that point to areas needing further debugging and/or porting work.

Win32

In multi-CPU boxes there are some problems with the I/O buffering: some output may appear twice. The Win32 following failures are known as of 5.7.3:

  ..\ext/Encode/t/JP.t      4  1024    22    4  18.18%  9 14 18 21
  ..\ext/threads/t/end.t                6    4  66.67%  3-6
  ..\lib/blib.t             3   768     7    3  42.86%  1 4-5

Localising a Tied Variable Leaks Memory

    use Tie::Hash;
    tie my %tie_hash => 'Tie::StdHash';

    ...

    local($tie_hash{Foo}) = 1; # leaks

Code like the above is known to leak memory every time the local() is executed.

Localising Tied Arrays and Hashes Is Broken

    local %tied_array;

doesn't work as one would expect: the old value is restored incorrectly.

Self-tying of Arrays and Hashes Is Forbidden

Self-tying of arrays and hashes is broken in rather deep and hard-to-fix ways. As a stop-gap measure to avoid people from getting frustrated at the mysterious results (core dumps, most often) it is for now forbidden (you will get a fatal error even from an attempt).

Building Extensions Can Fail Because Of Largefiles

Some extensions like mod_perl are known to have issues with `largefiles', a change brought by Perl 5.6.0 in which file offsets default to 64 bits wide, where supported. Modules may fail to compile at all or compile and work incorrectly. Currently there is no good solution for the problem, but Configure now provides appropriate non-largefile ccflags, ldflags, libswanted, and libs in the %Config hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are having problems can try configuring themselves without the largefileness. This is admittedly not a clean solution, and the solution may not even work at all. One potential failure is whether one can (or, if one can, whether it's a good idea) link together at all binaries with different ideas about file offsets, all this is platform-dependent.

Unicode Support on EBCDIC Still Spotty

Though mostly working, Unicode support still has problem spots on EBCDIC platforms. One such known spot are the \p{} and \P{} regular expression constructs for code points less than 256: the pP are testing for Unicode code points, not knowing about EBCDIC.

The Compiler Suite Is Still Experimental

The compiler suite is slowly getting better but it continues to be highly experimental. Use in production environments is discouraged.

The Long Double Support Is Still Experimental

The ability to configure Perl's numbers to use "long doubles", floating point numbers of hopefully better accuracy, is still experimental. The implementations of long doubles are not yet widespread and the existing implementations are not quite mature or standardised, therefore trying to support them is a rare and moving target. The gain of more precision may also be offset by slowdown in computations (more bits to move around, and the operations are more likely to be executed by less optimised libraries).

Seen In Perl 5.7 But Gone Now

Time::Piece (previously known as Time::Object) was removed because it was felt that it didn't have enough value in it to be a core module. It is still a useful module, though, and is available from the CPAN.

Reporting Bugs ^

If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://bugs.perl.org. There may also be information at http://www.perl.com/, the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

SEE ALSO ^

The Changes file for exhaustive details on what changed.

The INSTALL file for how to build Perl.

The README file for general stuff.

The Artistic and Copying files for copyright information.

HISTORY ^

Written by Jarkko Hietaniemi <jhi@iki.fi>.

syntax highlighting: