ActivePerl 5.8.0.805 -- Release Notes

Welcome, and thanks for downloading ActivePerl. This release corresponds to Perl version 5.8.0.

Please note that ActivePerl 800 series builds are NOT binary-compatible with the older 600 and 500 series builds. In particular, do not attempt to use extensions or PPM packages built for the 600 and 500 series builds with ActivePerl 800 series builds and vice versa.

The following platforms are supported:

For a chronological list of changes included in this and past releases, see the ActivePerl Change Log.


Incompatibilities

The following list is a general summary of the known incompatibilities between the Perl 5.8.0 source code release and earlier releases based on Perl 5.6.0. Be sure to consider these very carefully before upgrading.

Binary incompatibility

Perl 5.8 is not binary compatible with earlier releases of Perl.

You have to recompile your XS modules.

Pure Perl modules should continue to work, subject to the other incompatibilities listed here.

binmode(FH) may be required even on UNIX platforms

This change can break potentially working code on UNIX platforms. You may need to set LC_ALL=C in your environment to disable this new behavior. This is known to be the case on Red Hat Linux 8.0.

If your environment variables (LC_ALL, LC_CTYPE, LANG) look like you want to use UTF-8 (any of the variables match /utf-?8/i), your STDIN, STDOUT, STDERR handles and the default open layer (see open) are marked as UTF-8. This feature, like other new features that combine Unicode and I/O, work only if you are using PerlIO, but that's the default.

Note that after this Perl really does assume that everything is UTF-8: for example if some input handle is not, Perl will probably very soon complain about the input data like this ``Malformed UTF-8 ...'' since any old eight-bit data is not legal UTF-8.

Note for code authors: if you want to enable your users to use UTF-8 as their default encoding but in your code still have eight-bit I/O streams (such as images or zip files), you need to explicitly open() or binmode() with :bytes (see perlfunc/open and perlfunc/binmode), or you can just use binmode(FH) (nice for pre-5.8.0 backward compatibility).

New Unicode semantics (no more use utf8, almost)

In general, the interfaces and implementation of Unicode support has changed significantly from the 5.6 release.

Previously in Perl 5.6 to use Unicode one would say ``use utf8'' and then the operations (like string concatenation) were Unicode-aware in that lexical scope.

This was found to be an inconvenient interface, and in Perl 5.8 the Unicode model has completely changed: now the ``Unicodeness'' is bound to the data itself, and for most of the time ``use utf8'' is not needed at all. The only remaining use of ``use utf8'' is when the Perl script itself has been written in the UTF-8 encoding of Unicode. (UTF-8 has not been made the default since there are many Perl scripts out there that are using various national eight-bit character sets, which would be illegal in UTF-8.)

See perluniintro for the explanation of the current model, and utf8 for the current use of the utf8 pragma.

Incompatible, but reliable, signals implementation

The new safe signals implementation postpones handling of signals until it's safe (in between the execution of low level 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 (such as sort()) or an external operation (like an I/O operation), and only then look at any arrived signals (but before starting the next operation). This means that the signal handler may be called at a different point than before, conceivably when it is no longer useful. Note that breaking out from potentially blocking operations should still work, though.

Perl debugger commands are different

The command line Perl debugger (perl5db.pl) has been modified to present a more consistent command interface. To use the old style commands, enter o CommandSet=pre580 at the debugger prompt.

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).

References to references stringify as REF(...), not 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().

glob() now returns filenames in alphabetical order

The list of filenames from glob() (or <...>) is now by default sorted alphabetically to be csh-compliant (which is what happened before in most UNIX platforms). (bsd_glob() continues to sort platform natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)

This change was already included in Perl 5.6.1.

Time::Local::timelocal() and fractional seconds

Time::Local::timelocal() does not handle fractional seconds anymore. The rationale is that neither does localtime(), and timelocal() and localtime() are supposed to be inverses of each other.

bless(REF, REF) no longer supported

The semantics of bless(REF, REF) were unclear and until someone proves it to make some sense, it is forbidden.

Self-ties are unsupported

Self-ties of arrays and hashes are no longer supported. Attempts to do this will cause fatal errors.

Tied hash methods EXISTS and DELETE are mandatory

Tied hash interfaces are now required to have the EXISTS and DELETE methods (either own or inherited).

Perl hashes remain unordered, only differently so

Although ``you shouldn't do that'', it was possible to write code that depends on Perl's hashed key order (Data::Dumper does this). The new algorithm ``One-at-a-Time'' produces a different hashed key order. More details are in perldelta, ``Performance Enhancements''.

use may fail if module does not define a $VERSION

If you specify a required minimum version when loading a module with use, and that module does not define a $VERSION, a fatal error is produced.

chat2.pl has been removed

The obsolete chat2 library that should never have been allowed to escape the laboratory has been decommissioned.

chdir('') and chdir(undef) are deprecated

Using chdir('') or chdir(undef) instead of explicit chdir() is doubtful. A failure (think chdir(some_function()) can lead into unintended chdir() to the home directory, therefore this behaviour is deprecated.

dump() should now be spelled CORE::dump()

The builtin dump() function has probably outlived most of its usefulness. The core-dumping functionality remains available as an explicit call to CORE::dump(), but in future releases the behaviour of an unqualified dump() call may change.

Unimplemented POSIX regex features are now fatal

The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still recognised but now cause fatal errors. The previous behaviour of ignoring them by default and warning if requested was unacceptable since it, in a way, falsely promised that the features could be used.

:raw and :crlf disciplines no longer have inverse behaviors

Previous versions of perl and some readings of some sections of Camel III implied that the :raw ``discipline'' was the inverse of :crlf. Turning off ``clrfness'' is no longer enough to make a stream truly binary. So the PerlIO :raw layer (or ``discipline'', to use the Camel book's older terminology) is now formally defined as being equivalent to binmode(FH) - which is in turn defined as doing whatever is necessary to pass each byte as-is without any translation. In particular binmode(FH) - and hence :raw - will now turn off both CRLF and UTF-8 translation and remove other layers (e.g. :encoding()) which would modify byte stream.

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 d/f, but you never knew that.)

EQ, NE, LT, LE, GE, GT operators no longer part of the language

The long deprecated uppercase aliases for the string comparison operators (EQ, NE, LT, LE, GE, GT) have now been removed.

tr///CU has been removed

The tr///C and tr///U features have been removed and will not return; the interface was a mistake. Sorry about that. For similar functionality, see pack('U0', ...) and pack('C0', ...).

This change was already included in Perl 5.6.1.

New warnings and deprecations


Known Issues

All Platforms

The definitive summary of platform-independent changes and known issues in this release is available in perldelta and in the Change Log that comes with the ActivePerl distribution.

Only the significant known issues from perldelta are listed here.

The Compiler Suite Is Still Very Experimental
The compiler suite is slowly getting better but it continues to be highly experimental. Use in production environments is discouraged.

Localising Tied Arrays and Hashes Is Broken
    local %tied_array;

doesn't work as one would expect: the old value is restored incorrectly. This will be changed in a future release, but we don't know yet what the new semantics will exactly be. In any case, the change will break existing code that relies on the current (ill-defined) semantics, so just avoid doing this in general.

Self-tying Problems
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 forbidden for now (you will get a fatal error even from an attempt).

A change to self-tying of globs has caused them to be recursively referenced (see: perlobj, ``Two-Phased Garbage Collection''). You will now need an explicit untie to destroy a self-tied glob. This behaviour may be fixed at a later date.

Self-tying of scalars and IO objects works.

Tied/Magical Array/Hash Elements Do Not Autovivify
For normal arrays $foo = \$bar[1] will assign undef to $bar[1] (assuming that it didn't exist before), but for tied/magical arrays and hashes such autovivification does not happen because there is currently no way to catch the reference creation. The same problem affects slicing over non-existent indices/keys of a tied/magical array/hash.

Unicode in package/class and subroutine names does not work
One can have Unicode in identifier names, but not in package/class or subroutine names. While some limited functionality towards this does exist as of Perl 5.8.0, that is more accidental than designed; use of Unicode for the said purposes is unsupported.

One reason for this incompleteness is its (currently) inherent non-portability: since both package names and subroutine names may need to be mapped to file and directory names, the Unicode capability of the filesystem becomes important, and there unfortunately aren't portable answers.

Linux and Solaris

Windows

Further Information

The Perl distribution comes with extensive documentation. On Unix platforms, all the standard documentation is installed as man pages under the Perl install location. The location of the man pages may need to be added to the MANPATH environment variable in order to access them. For example, in the C shell:

    % setenv MANPATH /usr/local/ActivePerl-5.8/man:$MANPATH

The documentation is installed in HTML format on all platforms. If ActivePerl was installed in /usr/local/ActivePerl-5.8 then the HTML documentation would be located in /usr/local/ActivePerl-5.8/html.

On Windows, the standard documentation along with Windows-specific Perl documentation is installed in HTML format, and is accessible from the ``Start'' menu.

Updated versions of the HTML documentation will always be available at the ActiveState website:

    http://www.ActiveState.com/ActivePerl/


Reporting Problems

Please report any problems you encounter with this release at the following location:

    http://bugs.ActiveState.com/ActivePerl/

If you do not have web access, reports can be also sent via email to ActivePerl-Bugs@ActiveState.com. Please be sure to include detailed information about the platform in your message.

As far as possible, please ensure that there is enough information in the report to reproduce the bug elsewhere. It also helps to submit a minimal test case that exhibits the bug.