NAME

perldeltas - every perl*delta in one file

p5140-NAME

perldelta - what is new for perl v5.14.0

p5140-DESCRIPTION

This document describes differences between the 5.12.0 release and the 5.14.0 release.

If you are upgrading from an earlier release such as 5.10.0, first read "p5120-NAME", which describes differences between 5.10.0 and 5.12.0.

Some of the bug fixes in this release have been backported to subsequent releases of 5.12.x. Those are indicated with the 5.12.x version in parentheses.

p5140-Notice

XXX Any important notices here

p5140-Core Enhancements

p5140-Unicode

p5140-Unicode Version 6.0 is now supported (mostly)

Perl comes with the Unicode 6.0 data base updated with Corrigendum #8, with one exception noted below. See http://unicode.org/versions/Unicode6.0.0 for details on the new release. Perl does not support any Unicode provisional properties, including the new ones for this release.

Unicode 6.0 has chosen to use the name BELL for the character at U+1F514, which is a symbol that looks like a bell, and is used in Japanese cell phones. This conflicts with the long-standing Perl usage of having BELL mean the ASCII BEL character, U+0007. In Perl 5.14, \N{BELL} will continue to mean U+0007, but its use will generate a deprecated warning message, unless such warnings are turned off. The new name for U+0007 in Perl is ALERT, which corresponds nicely with the existing shorthand sequence for it, "\a". \N{BEL} means U+0007, with no warning given. The character at U+1F514 will not have a name in 5.14, but can be referred to by \N{U+1F514}. The plan is that in Perl 5.16, \N{BELL} will refer to U+1F514, and so all code that uses \N{BELL} should convert by then to using \N{ALERT}, \N{BEL}, or "\a" instead.

p5140-Full functionality for use feature 'unicode_strings'

This release provides full functionality for use feature 'unicode_strings'. Under its scope, all string operations executed and regular expressions compiled (even if executed outside its scope) have Unicode semantics. See feature.

This feature avoids most forms of the "Unicode Bug" (See "The "Unicode Bug"" in perlunicode for details.) If there is a possibility that your code will process Unicode strings, you are strongly encouraged to use this subpragma to avoid nasty surprises.

p5140-\N{name} and charnames enhancements

See charnames for details on all these changes.

p5140-New warnings categories for problematic (non-)Unicode code points.

Three new warnings subcategories of "utf8" have been added. These allow you to turn off some "utf8" warnings, while allowing others warnings to remain on. The three categories are: surrogate when UTF-16 surrogates are encountered; nonchar when Unicode non-character code points are encountered; and non_unicode when code points that are above the legal Unicode maximum of 0x10FFFF are encountered.

p5140-Any unsigned value can be encoded as a character

With this release, Perl is adopting a model that any unsigned value can be treated as a code point and encoded internally (as utf8) without warnings - not just the code points that are legal in Unicode. However, unless utf8 or the corresponding sub-category (see previous item) warnings have been explicitly lexically turned off, outputting or performing a Unicode-defined operation (such as upper-casing) on such a code point will generate a warning. Attempting to input these using strict rules (such as with the :encoding('UTF-8') layer) will continue to fail. Prior to this release the handling was very inconsistent, and incorrect in places. Also, the Unicode non-characters, some of which previously were erroneously considered illegal in places by Perl, contrary to the Unicode standard, are now always legal internally. But inputting or outputting them will work the same as for the non-legal Unicode code points, as the Unicode standard says they are illegal for "open interchange".

p5140-Unicode database files not installed

The Unicode database files are no longer installed with Perl. This doesn't affect any functionality in Perl and saves significant disk space. If you previously were explicitly opening and reading those files, you can download them from http://www.unicode.org/Public/zipped/6.0.0/.

p5140-Regular Expressions

p5140-(?^...) construct to signify default modifiers

An ASCII caret (also called a "circumflex accent") "^" immediately following a "(?" in a regular expression now means that the subexpression does not inherit the surrounding modifiers such as /i, but reverts to the Perl defaults. Any modifiers following the caret override the defaults.

The stringification of regular expressions now uses this notation. E.g., before, qr/hlagh/i would be stringified as (?i-xsm:hlagh), but now it's stringified as (?^i:hlagh).

The main purpose of this is to allow tests that rely on the stringification not to have to change when new modifiers are added. See "Extended Patterns" in perlre.

p5140-/d, /l, /u, /a, and /aa modifiers

Four new regular expression modifiers have been added. These are mutually exclusive; one only can be turned on at a time.

The /l modifier says to compile the regular expression as if it were in the scope of use locale, even if it is not.

The /u modifier says to compile the regular expression as if it were in the scope of a use feature "unicode_strings" pragma.

The /d (default) modifier is used to override any use locale and use feature "unicode_strings" pragmas that are in effect at the time of compiling the regular expression.

The /a regular expression modifier restricts \s, \d and \w and the Posix ([[:posix:]]) character classes to the ASCII range. Their complements and \b and \B are correspondingly affected. Otherwise, /a behaves like the /u modifier, in that case-insensitive matching uses Unicode semantics.

The /aa modifier is like /a, except that, in case-insensitive matching, no ASCII character will match a non-ASCII character. For example,

    'k' =~ /\N{KELVIN SIGN}/ai

will match; it won't under /aa.

See "Modifiers" in perlre for more detail.

p5140-Non-destructive substitution

The substitution (s///) and transliteration (y///) operators now support an /r option that copies the input variable, carries out the substitution on the copy and returns the result. The original remains unmodified.

  my $old = 'cat';
  my $new = $old =~ s/cat/dog/r;
  # $old is 'cat' and $new is 'dog'

This is particularly useful with map. See perlop for more examples.

p5140-Reentrant regular expression engine

It is now safe to use regular expressions within (?{...}) and (??{...}) code blocks inside regular expressions.

These block are still experimental, however, and still have problems with lexical (my) variables and abnormal exiting.

p5140-use re '/flags';

The re pragma now has the ability to turn on regular expression flags till the end of the lexical scope:

    use re '/x';
    "foo" =~ / (.+) /;  # /x implied

See "'/flags' mode" in re for details.

p5140-\o{...} for octals

There is a new octal escape sequence, "\o", in double-quote-like contexts. This construct allows large octal ordinals beyond the current max of 0777 to be represented. It also allows you to specify a character in octal which can safely be concatenated with other regex snippets and which won't be confused with being a backreference to a regex capture group. See "Capture groups" in perlre.

p5140-Add \p{Titlecase} as a synonym for \p{Title}

This synonym is added for symmetry with the Unicode property names \p{Uppercase} and \p{Lowercase}.

p5140-Regular expression debugging output improvement

Regular expression debugging output (turned on by use re 'debug';) now uses hexadecimal when escaping non-ASCII characters, instead of octal.

p5140-Return value of delete $+{...}

Custom regular expression engines can now determine the return value of delete on an entry of %+ or %-.

p5140-Syntactical Enhancements

p5140-Array and hash container functions accept references

All built-in functions that operate directly on array or hash containers now also accept hard references to arrays or hashes:

  |----------------------------+---------------------------|
  | Traditional syntax         | Terse syntax              |
  |----------------------------+---------------------------|
  | push @$arrayref, @stuff    | push $arrayref, @stuff    |
  | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
  | pop @$arrayref             | pop $arrayref             |
  | shift @$arrayref           | shift $arrayref           |
  | splice @$arrayref, 0, 2    | splice $arrayref, 0, 2    |
  | keys %$hashref             | keys $hashref             |
  | keys @$arrayref            | keys $arrayref            |
  | values %$hashref           | values $hashref           |
  | values @$arrayref          | values $arrayref          |
  | ($k,$v) = each %$hashref   | ($k,$v) = each $hashref   |
  | ($k,$v) = each @$arrayref  | ($k,$v) = each $arrayref  |
  |----------------------------+---------------------------|

This allows these built-in functions to act on long dereferencing chains or on the return value of subroutines without needing to wrap them in @{} or %{}:

  push @{$obj->tags}, $new_tag;  # old way
  push $obj->tags,    $new_tag;  # new way

  for ( keys %{$hoh->{genres}{artists}} ) {...} # old way 
  for ( keys $hoh->{genres}{artists}    ) {...} # new way 

For push, unshift and splice, the reference will auto-vivify if it is not defined, just as if it were wrapped with @{}.

For keys, values, each, when overloaded dereferencing is present, the overloaded dereference is used instead of dereferencing the underlying reftype. Warnings are issued about assumptions made in ambiguous cases.

p5140-Single term prototype

The + prototype is a special alternative to $ that will act like \[@%] when given a literal array or hash variable, but will otherwise force scalar context on the argument. See "Prototypes" in perlsub.

p5140-package block syntax

A package declaration can now contain a code block, in which case the declaration is in scope only inside that block. So package Foo { ... } is precisely equivalent to { package Foo; ... }. It also works with a version number in the declaration, as in package Foo 1.2 { ... }. See perlfunc.

p5140-Statement labels can appear in more places

Statement labels can now occur before any type of statement or declaration, such as package.

p5140-Stacked labels

Multiple statement labels can now appear before a single statement.

p5140-Uppercase X/B allowed in hexadecimal/binary literals

Literals may now use either upper case 0X... or 0B... prefixes, in addition to the already supported 0x... and 0b... syntax [perl #76296].

C, Ruby, Python and PHP already supported this syntax, and it makes Perl more internally consistent. A round-trip with eval sprintf "%#X", 0x10 now returns 16, the way eval sprintf "%#x", 0x10 does.

p5140-Overridable tie functions

tie, tied and untie can now be overridden [perl #75902].

p5140-Exception Handling

Several changes have been made to the way die, warn, and $@ behave, in order to make them more reliable and consistent.

When an exception is thrown inside an eval, the exception is no longer at risk of being clobbered by code running during unwinding (e.g., destructors). Previously, the exception was written into $@ early in the throwing process, and would be overwritten if eval was used internally in the destructor for an object that had to be freed while exiting from the outer eval. Now the exception is written into $@ last thing before exiting the outer eval, so the code running immediately thereafter can rely on the value in $@ correctly corresponding to that eval. ($@ is still also set before exiting the eval, for the sake of destructors that rely on this.)

Likewise, a local $@ inside an eval will no longer clobber any exception thrown in its scope. Previously, the restoration of $@ upon unwinding would overwrite any exception being thrown. Now the exception gets to the eval anyway. So local $@ is safe before a die.

Exceptions thrown from object destructors no longer modify the $@ of the surrounding context. (If the surrounding context was exception unwinding, this used to be another way to clobber the exception being thrown.) Previously such an exception was sometimes emitted as a warning, and then either was string-appended to the surrounding $@ or completely replaced the surrounding $@, depending on whether that exception and the surrounding $@ were strings or objects. Now, an exception in this situation is always emitted as a warning, leaving the surrounding $@ untouched. In addition to object destructors, this also affects any function call performed by XS code using the G_KEEPERR flag.

Warnings for warn can now be objects, in the same way as exceptions for die. If an object-based warning gets the default handling, of writing to standard error, it is stringified as before, with the file and line number appended. But a $SIG{__WARN__} handler will now receive an object-based warning as an object, where previously it was passed the result of stringifying the object.

p5140-Other Enhancements

p5140-Assignment to $0 sets the legacy process name with prctl() on Linux

On Linux the legacy process name is now set with prctl(2), in addition to altering the POSIX name via argv[0] as perl has done since version 4.000. Now system utilities that read the legacy process name such as ps, top and killall will recognize the name you set when assigning to $0. The string you supply will be cut off at 16 bytes; this is a limitation imposed by Linux.

p5140-srand() now returns the seed

This allows programs that need to have repeatable results not to have to come up with their own seed-generating mechanism. Instead, they can use srand() and stash the return value for future use. Typical is a test program which has too many combinations to test comprehensively in the time available to it each run. It can test a random subset each time and, should there be a failure, log the seed used for that run so that it can later be used to reproduce the same results.

p5140-printf-like functions understand post-1980 size modifiers

Perl's printf and sprintf operators, and Perl's internal printf replacement function, now understand the C90 size modifiers "hh" (char), "z" (size_t), and "t" (ptrdiff_t). Also, when compiled with a C99 compiler, Perl now understands the size modifier "j" (intmax_t).

So, for example, on any modern machine, sprintf('%hhd', 257) returns '1'.

p5140-New global variable ${^GLOBAL_PHASE}

A new global variable, ${^GLOBAL_PHASE}, has been added to allow introspection of the current phase of the perl interpreter. It's explained in detail in "${^GLOBAL_PHASE}" in perlvar and "BEGIN, UNITCHECK, CHECK, INIT and END" in perlmod.

p5140--d:-foo calls Devel::foo::unimport

The syntax -d:foo was extended in 5.6.1 to make -d:foo=bar equivalent to -MDevel::foo=bar, which expands internally to use Devel::foo 'bar';. perl now allows prefixing the module name with -, with the same semantics as -M, i.e.

p5140--d:-foo

Equivalent to -M-Devel::foo, expands to no Devel::foo;, calls Devel::foo->unimport() if the method exists.

p5140--d:-foo=bar

Equivalent to -M-Devel::foo=bar, expands to no Devel::foo 'bar';, calls Devel::foo->unimport('bar') if the method exists.

This is particularly useful for suppressing the default actions of a Devel::* module's import method whilst still loading it for debugging.

p5140-Filehandle method calls load IO::File on demand

When a method call on a filehandle would die because the method cannot be resolved, and IO::File has not been loaded, Perl now loads IO::File via require and attempts method resolution again:

  open my $fh, ">", $file;
  $fh->binmode(":raw");     # loads IO::File and succeeds

This also works for globs like STDOUT, STDERR and STDIN:

  STDOUT->autoflush(1);

Because this on-demand load only happens if method resolution fails, the legacy approach of manually loading an IO::File parent class for partial method support still works as expected:

  use IO::Handle;
  open my $fh, ">", $file;
  $fh->autoflush(1);        # IO::File not loaded

p5140-IPv6 support

The Socket module provides new affordances for IPv6, including implementations of the Socket::getaddrinfo() and Socket::getnameinfo() functions, along with related constants, and a handful of new functions. See Socket.

p5140-DTrace probes now include package name

The DTrace probes now include an additional argument (arg3) which contains the package the subroutine being entered or left was compiled in.

For example using the following DTrace script:

  perl$target:::sub-entry
  {
      printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
  }

and then running:

  perl -e'sub test { }; test'

DTrace will print:

  main::test

p5140-New C APIs

See "p5140-Internal Changes".

p5140-Security

p5140-User-defined regular expression properties

In "User-Defined Character Properties" in perlunicode, it says you can create custom properties by defining subroutines whose names begin with "In" or "Is". However, Perl did not actually enforce that naming restriction, so \p{foo::bar} could call foo::bar() if it existed. Now this convention has been enforced.

Also, Perl no longer allows a tainted regular expression to invoke a user-defined property. It simply dies instead [perl #82616].

p5140-Incompatible Changes

Perl 5.14.0 is not binary-compatible with any previous stable release.

In addition to the sections that follow, see "p5140-C API Changes".

p5140-Regular Expressions and String Escapes

p5140-\400-\777

Use of \400-\777 in regexes in certain circumstances has given different, anomalous behavior than their use in all other double-quote-like contexts. Since 5.10.1, a deprecated warning message has been raised when this happens. Now, all double-quote-like contexts have the same behavior, namely to be equivalent to \x{100} - \x{1FF}, with no deprecation warning. Use of these values in the command line option "-0" retains the current meaning to slurp input files whole; previously, this was documented only for "-0777". It is recommended, however, because of various ambiguities, to use the new \o{...} construct to represent characters in octal.

p5140-Most \p{} properties are now immune to case-insensitive matching

For most Unicode properties, it doesn't make sense to have them match differently under /i case-insensitive matching than not. And doing so leads to unexpected results and potential security holes. For example

 m/\p{ASCII_Hex_Digit}+/i

could previously match non-ASCII characters because of the Unicode matching rules (although there were a number of bugs with this). Now matching under /i gives the same results as non-/i matching except for those few properties where people have come to expect differences, namely the ones where casing is an integral part of their meaning, such as m/\p{Uppercase}/i and m/\p{Lowercase}/i, both of which match the exact same code points, namely those matched by m/\p{Cased}/i. Details are in "Unicode Properties" in perlrecharclass.

User-defined property handlers that need to match differently under /i must change to read the new boolean parameter passed to them which is non-zero if case-insensitive matching is in effect or 0 otherwise. See "User-Defined Character Properties" in perluniprops.

p5140-\p{} implies Unicode semantics

Now, a Unicode property match specified in the pattern will indicate that the pattern is meant for matching according to Unicode rules, the way \N{} does.

p5140-Regular expressions retain their localeness when interpolated

Regular expressions compiled under "use locale" now retain this when interpolated into a new regular expression compiled outside a "use locale", and vice-versa.

Previously, a regular expression interpolated into another one inherited the localeness of the surrounding one, losing whatever state it originally had. This is considered a bug fix, but may trip up code that has come to rely on the incorrect behavior.

p5140-Stringification of regexes has changed

Default regular expression modifiers are now notated by using (?^...). Code relying on the old stringification will fail. The purpose of this is so that when new modifiers are added, such code will not have to change (after this one time), as the stringification will automatically incorporate the new modifiers.

Code that needs to work properly with both old- and new-style regexes can avoid the whole issue by using (for Perls since 5.9.5; see re):

 use re qw(regexp_pattern);
 my ($pat, $mods) = regexp_pattern($re_ref);

If the actual stringification is important, or older Perls need to be supported, you can use something like the following:

    # Accept both old and new-style stringification
    my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';

And then use $modifiers instead of -xism.

p5140-Run-time code blocks in regular expressions inherit pragmata

Code blocks in regular expressions ((?{...}) and (??{...})) used not to inherit any pragmata (strict, warnings, etc.) if the regular expression was compiled at run time as happens in cases like these two:

  use re 'eval';
  $foo =~ $bar; # when $bar contains (?{...})
  $foo =~ /$bar(?{ $finished = 1 })/;

This was a bug, which has now been fixed. But it has the potential to break any code that was relying on it.

p5140-Stashes and Package Variables

p5140-Localised tied hashes and arrays are no longed tied

In the following:

    tie @a, ...;
    {
        local @a;
        # here, @a is a now a new, untied array
    }
    # here, @a refers again to the old, tied array

The new local array used to be made tied too, which was fairly pointless, and has now been fixed. This fix could however potentially cause a change in behaviour of some code.

p5140-Stashes are now always defined

defined %Foo:: now always returns true, even when no symbols have yet been defined in that package.

This is a side effect of removing a special case kludge in the tokeniser, added for 5.10.0, to hide side effects of changes to the internal storage of hashes that drastically reduce their memory usage overhead.

Calling defined on a stash has been deprecated since 5.6.0, warned on lexicals since 5.6.0, and warned for stashes (and other package variables) since 5.12.0. defined %hash has always exposed an implementation detail - emptying a hash by deleting all entries from it does not make defined %hash false, hence defined %hash is not valid code to determine whether an arbitrary hash is empty. Instead, use the behaviour that an empty %hash always returns false in a scalar context.

p5140-Clearing stashes

Stash list assignment %foo:: = () used to make the stash anonymous temporarily while it was being emptied. Consequently, any of its subroutines referenced elsewhere would become anonymous (showing up as "(unknown)" in caller). Now they retain their package names, such that caller will return the original sub name if there is still a reference to its typeglob, or "foo::__ANON__" otherwise [perl #79208].

p5140-Dereferencing typeglobs

If you assign a typeglob to a scalar variable:

    $glob = *foo;

the glob that is copied to $glob is marked with a special flag indicating that the glob is just a copy. This allows subsequent assignments to $glob to overwrite the glob. The original glob, however, is immutable.

Some Perl operators did not distinguish between these two types of globs. This would result in strange behaviour in edge cases: untie $scalar would not untie the scalar if the last thing assigned to it was a glob (because it treated it as untie *$scalar, which unties a handle). Assignment to a glob slot (e.g., *$glob = \@some_array) would simply assign \@some_array to $glob.

To fix this, the *{} operator (including the *foo and *$foo forms) has been modified to make a new immutable glob if its operand is a glob copy. This allows operators that make a distinction between globs and scalars to be modified to treat only immutable globs as globs. (tie, tied and untie have been left as they are for compatibility's sake, but will warn. See "p5140-Deprecations".)

This causes an incompatible change in code that assigns a glob to the return value of *{} when that operator was passed a glob copy. Take the following code, for instance:

    $glob = *foo;
    *$glob = *bar;

The *$glob on the second line returns a new immutable glob. That new glob is made an alias to *bar. Then it is discarded. So the second assignment has no effect.

See http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810 for even more detail.

p5140-Magic variables outside the main package

In previous versions of Perl, magic variables like $!, %SIG, etc. would 'leak' into other packages. So %foo::SIG could be used to access signals, ${"foo::!"} (with strict mode off) to access C's errno, etc.

This was a bug, or an 'unintentional' feature, which caused various ill effects, such as signal handlers being wiped when modules were loaded, etc.

This has been fixed (or the feature has been removed, depending on how you see it).

p5140-local($_) will strip all magic from $_

local() on scalar variables will give them a new value, but keep all their magic intact. This has proven to be problematic for the default scalar variable $_, where perlsub recommends that any subroutine that assigns to $_ should localize it first. This would throw an exception if $_ is aliased to a read-only variable, and could have various unintentional side-effects in general.

Therefore, as an exception to the general rule, local($_) will not only assign a new value to $_, but also remove all existing magic from it as well.

p5140-Parsing of package and variable names

The parsing of the names of packages and package variables has changed, in that multiple adjacent pairs of colons (as in foo::::bar) are all treated as package separators.

Regardless of this change, the exact parsing of package separators has never been guaranteed and is subject to change in future Perl versions.

p5140-Changes to Syntax or to Perl Operators

p5140-given return values

given blocks now return the last evaluated expression, or an empty list if the block was exited by break. Thus you can now write:

    my $type = do {
     given ($num) {
      break     when undef;
      'integer' when /^[+-]?[0-9]+$/;
      'float'   when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
      'unknown';
     }
    };

See "Return value" in perlsyn for details.

p5140-Change in the parsing of certain prototypes

Functions declared with the following prototypes now behave correctly as unary functions:

  *
  \$ \% \@ \* \&
  \[...]
  ;$ ;*
  ;\$ ;\% etc.
  ;\[...]

Due to this bug fix [perl #75904], functions using the (*), (;$) and (;*) prototypes are parsed with higher precedence than before. So in the following example:

  sub foo($);
  foo $a < $b;

the second line is now parsed correctly as foo($a) < $b, rather than foo($a < $b). This happens when one of these operators is used in an unparenthesised argument:

  < > <= >= lt gt le ge
  == != <=> eq ne cmp ~~
  &
  | ^
  &&
  || //
  .. ...
  ?:
  = += -= *= etc.

p5140-Smart-matching against array slices

Previously, the following code resulted in a successful match:

    my @a = qw(a y0 z);
    my @b = qw(a x0 z);
    @a[0 .. $#b] ~~ @b;

This odd behaviour has now been fixed [perl #77468].

p5140-Negation treats strings differently from before

The unary negation operator - now treats strings that look like numbers as numbers [perl #57706].

p5140-Negative zero

Negative zero (-0.0), when converted to a string, now becomes "0" on all platforms. It used to become "-0" on some, but "0" on others.

If you still need to determine whether a zero is negative, use sprintf("%g", $zero) =~ /^-/ or the Data::Float module on CPAN.

p5140-:= is now a syntax error

Previously my $pi := 4; was exactly equivalent to my $pi : = 4;, with the : being treated as the start of an attribute list, ending before the =. The use of := to mean : = was deprecated in 5.12.0, and is now a syntax error. This will allow the future use of := as a new token.

We find no Perl 5 code on CPAN using this construction, outside the core's tests for it, so we believe that this change will have very little impact on real-world codebases.

If it is absolutely necessary to have empty attribute lists (for example, because of a code generator) then avoid the error by adding a space before the =.

p5140-Change in the parsing of identifiers

Characters outside the Unicode "XIDStart" set are no longer allowed at the beginning of an identifier. This means that certain accents and marks that normally follow an alphabetic character may no longer be the first character of an identifier.

p5140-Threads and Processes

p5140-Directory handles not copied to threads

On systems other than Windows that do not have a fchdir function, newly-created threads no longer inherit directory handles from their parent threads. Such programs would usually have crashed anyway [perl #75154].

p5140-close on shared pipes

The close function no longer waits for the child process to exit if the underlying file descriptor is still in use by another thread, to avoid deadlocks. It returns true in such cases.

p5140-fork() emulation will not wait for signalled children

On Windows parent processes would not terminate until all forked childred had terminated first. However, kill('KILL', ...) is inherently unstable on pseudo-processes, and kill('TERM', ...) might not get delivered if the child is blocked in a system call.

To avoid the deadlock and still provide a safe mechanism to terminate the hosting process, Perl will now no longer wait for children that have been sent a SIGTERM signal. It is up to the parent process to waitpid() for these children if child clean-up processing must be allowed to finish. However, it is also the responsibility of the parent then to avoid the deadlock by making sure the child process can't be blocked on I/O either.

See perlfork for more information about the fork() emulation on Windows.

p5140-Configuration

p5140-Naming fixes in Policy_sh.SH may invalidate Policy.sh

Several long-standing typos and naming confusions in Policy_sh.SH have been fixed, standardizing on the variable names used in config.sh.

This will change the behavior of Policy.sh if you happen to have been accidentally relying on its incorrect behavior.

p5140-Perl source code is read in text mode on Windows

Perl scripts used to be read in binary mode on Windows for the benefit of the ByteLoader module (which is no longer part of core Perl). This had the side effect of breaking various operations on the DATA filehandle, including seek()/tell(), and even simply reading from DATA after file handles have been flushed by a call to system(), backticks, fork() etc.

The default build options for Windows have been changed to read Perl source code on Windows in text mode now. Hopefully ByteLoader will be updated on CPAN to automatically handle this situation [perl #28106].

p5140-Deprecations

See also "p5140-Deprecated C APIs".

p5140-Omitting a space between a regular expression and subsequent word

Omitting a space between a regular expression operator or its modifiers and the following word is deprecated. For example, m/foo/sand $bar will still be parsed as m/foo/s and $bar but will issue a warning.

p5140-\cX

The backslash-c construct was designed as a way of specifying non-printable characters, but there were no restrictions (on ASCII platforms) on what the character following the c could be. Now, a deprecation warning is raised if that character isn't an ASCII character. Also, a deprecation warning is raised for "\c{" (which is the same as simply saying ";").

p5140-"\b{" and "\B{"

In regular expressions, a literal "{" immediately following a "\b" (not in a bracketed character class) or a "\B{" is now deprecated to allow for its future use by Perl itself.

p5140-Deprecation warning added for deprecated-in-core .pl libs

This is a mandatory warning, not obeying -X or lexical warning bits. The warning is modelled on that supplied by deprecate.pm for deprecated-in-core .pm libraries. It points to the specific CPAN distribution that contains the .pl libraries. The CPAN version, of course, does not generate the warning.

p5140-List assignment to $[

Assignment to $[ was deprecated and started to give warnings in Perl version 5.12.0. This version of perl also starts to emit a warning when assigning to $[ in list context. This fixes an oversight in 5.12.0.

p5140-Use of qw(...) as parentheses

Historically the parser fooled itself into thinking that qw(...) literals were always enclosed in parentheses, and as a result you could sometimes omit parentheses around them:

    for $x qw(a b c) { ... }

The parser no longer lies to itself in this way. Wrap the list literal in parentheses, like this:

    for $x (qw(a b c)) { ... }

p5140-\N{BELL} is deprecated

This is because Unicode is using that name for a different character. See "p5140-Unicode Version 6.0 is now supported (mostly)" for more explanation.

p5140-?PATTERN? is deprecated

?PATTERN? (without the initial m) has been deprecated and now produces a warning. This is to allow future use of ? in new operators. The match-once functionality is still available in the form of m?PATTERN?.

p5140-Tie functions on scalars holding typeglobs

Calling a tie function (tie, tied, untie) with a scalar argument acts on a file handle if the scalar happens to hold a typeglob.

This is a long-standing bug that will be removed in Perl 5.16, as there is currently no way to tie the scalar itself when it holds a typeglob, and no way to untie a scalar that has had a typeglob assigned to it.

Now there is a deprecation warning whenever a tie function is used on a handle without an explicit *.

p5140-User-defined case-mapping

This feature is being deprecated due to its many issues, as documented in "User-Defined Case Mappings (for serious hackers only)" in perlunicode. It is planned to remove this feature in Perl 5.16. Instead use the CPAN module Unicode::Casing, which provides improved functionality.

p5140-Deprecated modules

The following modules will be removed from the core distribution in a future release, and should be installed from CPAN instead. Distributions on CPAN which require these should add them to their prerequisites. The core versions of these modules will issue a deprecation warning.

If you ship a packaged version of Perl, either alone or as part of a larger system, then you should carefully consider the repercussions of core module deprecations. You may want to consider shipping your default build of Perl with packages for some or all deprecated modules which install into vendor or site perl library directories. This will inhibit the deprecation warnings.

Alternatively, you may want to consider patching lib/deprecate.pm to provide deprecation warnings specific to your packaging system or distribution of Perl, consistent with how your packaging system or distribution manages a staged transition from a release where the installation of a single package provides the given functionality, to a later release where the system administrator needs to know to install multiple packages to get that same functionality.

You can silence these deprecation warnings by installing the modules in question from CPAN. To install the latest version of all of them, just install Task::Deprecations::5_14.

p5140-Devel::DProf

We strongly recommend that you install and used Devel::NYTProf in preference, as it offers significantly improved profiling and reporting.

p5140-Performance Enhancements

p5140-"Safe signals" optimisation

Signal dispatch has been moved from the runloop into control ops. This should give a few percent speed increase, and eliminates almost all of the speed penalty caused by the introduction of "safe signals" in 5.8.0. Signals should still be dispatched within the same statement as they were previously - if this is not the case, or it is possible to create uninterruptible loops, this is a bug, and reports are encouraged of how to recreate such issues.

p5140-Optimisation of shift; and pop; calls without arguments

Two fewer OPs are used for shift and pop calls with no argument (with implicit @_). This change makes shift; 5% faster than shift @_; on non-threaded perls and 25% faster on threaded.

p5140-Optimisation of regexp engine string comparison work

The foldEQ_utf8 API function for case-insensitive comparison of strings (which is used heavily by the regexp engine) was substantially refactored and optimised - and its documentation much improved as a free bonus gift.

p5140-Regular expression compilation speed-up

Compiling regular expressions has been made faster for the case where upgrading the regex to utf8 is necessary but that isn't known when the compilation begins.

p5140-String appending is 100 times faster

When doing a lot of string appending, perl could end up allocating a lot more memory than needed in a very inefficient way, if perl was configured to use the system's malloc implementation instead of its own.

sv_grow, which is what's being used to allocate more memory if necessary when appending to a string, has now been taught how to round up the memory it requests to a certain geometric progression, making it much faster on certain platforms and configurations. On Win32, it's now about 100 times faster.

p5140-Eliminate PL_* accessor functions under ithreads

When MULTIPLICITY was first developed, and interpreter state moved into an interpreter struct, thread and interpreter local PL_* variables were defined as macros that called accessor functions, returning the address of the value, outside of the perl core. The intent was to allow members within the interpreter struct to change size without breaking binary compatibility, so that bug fixes could be merged to a maintenance branch that necessitated such a size change.

However, some non-core code defines PERL_CORE, sometimes intentionally to bypass this mechanism for speed reasons, sometimes for other reasons but with the inadvertent side effect of bypassing this mechanism. As some of this code is widespread in production use, the result is that the core can't change the size of members of the interpreter struct, as it will break such modules compiled against a previous release on that maintenance branch. The upshot is that this mechanism is redundant, and well-behaved code is penalised by it. Hence it can and should be removed (and has been).

p5140-Freeing weak references

When an object has many weak references to it, freeing that object can under some some circumstances take O(N^2) time to free (where N is the number of references). The number of circumstances has been reduced [perl #75254]

p5140-Lexical array and hash assignments

An earlier optimisation to speed up my @array = ... and my %hash = ... assignments caused a bug and was disabled in Perl 5.12.0.

Now we have found another way to speed up these assignments [perl #82110].

p5140-@_ uses less memory

Previously, @_ was allocated for every subroutine at compile time with enough space for four entries. Now this allocation is done on demand when the subroutine is called [perl #72416].

p5140-Size optimisations to SV and HV structures

xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and on some systems will cause struct xpvhv to become cache-aligned. To avoid this memory saving causing a slowdown elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when actually required are now calculated on demand, the cases when this needs to be done should be few and far between.

The order of structure elements in SV bodies has changed. Effectively, the NV slot has swapped location with STASH and MAGIC. As all access to SV members is via macros, this should be completely transparent. This change allows the space saving for PVHVs documented above, and may reduce the memory allocation needed for PVIVs on some architectures.

XPV, XPVIV, and XPVNV now only allocate the parts of the SV body they actually use, saving some space.

Scalars containing regular expressions now only allocate the part of the SV body they actually use, saving some space.

p5140-Memory consumption improvements to Exporter

The @EXPORT_FAIL AV is no longer created unless required, hence neither is the typeglob backing it. This saves about 200 bytes for every package that uses Exporter but doesn't use this functionality.

p5140-Memory savings for weak references

For weak references, the common case of just a single weak reference per referent has been optimised to reduce the storage required. In this case it saves the equivalent of one small Perl array per referent.

p5140-%+ and %- use less memory

The bulk of the Tie::Hash::NamedCapture module used to be in the perl core. It has now been moved to an XS module, to reduce the overhead for programs that do not use %+ or %-.

p5140-Multiple small improvements to threads

The internal structures of threading now make fewer API calls and fewer allocations, resulting in noticeably smaller object code. Additionally, many thread context checks have been deferred so that they're only done when required (although this is only possible for non-debugging builds).

p5140-Adjacent pairs of nextstate opcodes are now optimized away

Previously, in code such as

    use constant DEBUG => 0;

    sub GAK {
        warn if DEBUG;
        print "stuff\n";
    }

the ops for warn if DEBUG; would be folded to a null op (ex-const), but the nextstate op would remain, resulting in a runtime op dispatch of nextstate, nextstate, ....

The execution of a sequence of nextstate ops is indistinguishable from just the last nextstate op so the peephole optimizer now eliminates the first of a pair of nextstate ops, except where the first carries a label, since labels must not be eliminated by the optimizer and label usage isn't conclusively known at compile time.

p5140-Modules and Pragmata

p5140-New Modules and Pragmata

p5140-Updated Modules and Pragma

p5140-Removed Modules and Pragmata

The following modules have been removed from the core distribution, and if needed should be installed from CPAN instead.

The removal of Shell has been deferred until after 5.14, as the implementation of Shell shipped with 5.12.0 did not correctly issue the warning that it was to be removed from core.

p5140-Documentation

p5140-New Documentation

p5140-perlgpl

perlgpl has been updated to contain GPL version 1, as is included in the README distributed with perl (5.12.1).

p5140-Perl 5.12.x delta files

The perldelta files for Perl 5.12.1 to 5.12.3 have been added from the maintenance branch: "p5121-NAME", "p5122-NAME", "p5123-NAME".

p5140-perlpodstyle

New style guide for POD documentation, split mostly from the NOTES section of the pod2man man page.

p5140-perlsource, perlinterp, perlhacktut, and perlhacktips

See "p5140-perlhack and perlrepository revamp", below.

p5140-Changes to Existing Documentation

p5140-perlmodlib is now complete

The perlmodlib page that came with Perl 5.12.0 was missing a lot of modules, due to a bug in the script that generates the list. This has been fixed [perl #74332] (5.12.1).

p5140-Replace wrong tr/// table in perlebcdic

perlebcdic contains a helpful table to use in tr/// to convert between EBCDIC and Latin1/ASCII. Unfortunately, the table was the inverse of the one it describes, though the code that used the table worked correctly for the specific example given.

The table has been changed to its inverse, and the sample code changed to correspond, as this is easier for the person trying to follow the instructions since deriving the old table is somewhat more complicated.

The table has also been changed to hex from octal, as that is more the norm these days, and the recipes in the pod altered to print out leading zeros to make all the values the same length.

p5140-Tricks for user-defined casing

perlunicode now contains an explanation of how to override, mangle and otherwise tweak the way perl handles upper-, lower- and other-case conversions on Unicode data, and how to provide scoped changes to alter one's own code's behaviour without stomping on anybody else.

p5140-INSTALL explicitly states the requirement for C89

This was already true but it's now Officially Stated For The Record (5.12.2).

p5140-Explanation of \xHH and \oOOO escapes

perlop has been updated with more detailed explanation of these two character escapes.

p5140--0NNN switch

In perlrun, the behavior of the -0NNN switch for -0400 or higher has been clarified (5.12.2).

p5140-Maintenance policy

perlpolicy now contains the policy on what patches are acceptable for maintenance branches (5.12.1).

p5140-Deprecation policy

perlpolicy now contains the policy on compatibility and deprecation along with definitions of terms like "deprecation" (5.12.2).

p5140-New descriptions in perldiag

The following existing diagnostics are now documented:

p5140-perlbook

perlbook has been expanded to cover many more popular books.

p5140-SvTRUE macro

The documentation for the SvTRUE macro in perlapi was simply wrong in stating that get-magic is not processed. It has been corrected.

p5140-perlvar revamp

perlvar reorders the variables and groups them by topic. Each variable introduced after Perl 5.000 notes the first version in which it is available. perlvar also has a new section for deprecated variables to note when they were removed.

p5140-Array and hash slices in scalar context

These are now documented in perldata.

p5140-use locale and formats

perlform and perllocale have been corrected to state that use locale affects formats.

p5140-overload

overload's documentation has practically undergone a rewrite. It is now much more straightforward and clear.

p5140-perlhack and perlrepository revamp

The perlhack and perlrepository documents have been heavily edited and split up into several new documents.

The perlhack document is now much shorter, and focuses on the Perl 5 development process and submitting patches to Perl. The technical content has been moved to several new documents, perlsource, perlinterp, perlhacktut, and perlhacktips. This technical content has only been lightly edited.

The perlrepository document has been renamed to perlgit. This new document is just a how-to on using git with the Perl source code. Any other content that used to be in perlrepository has been moved to perlhack.

p5140-Time::Piece examples

Examples in perlfaq4 have been updated to show the use of Time::Piece.

p5140-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p5140-New Diagnostics

p5140-New Errors

p5140-Closure prototype called

This error occurs when a subroutine reference passed to an attribute handler is called, if the subroutine is a closure [perl #68560].

p5140-Insecure user-defined property %s

Perl detected tainted data when trying to compile a regular expression that contains a call to a user-defined character property function, i.e. \p{IsFoo} or \p{InFoo}. See "User-Defined Character Properties" in perlunicode and perlsec.

p5140-panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries

This new error is triggered if a destructor called on an object in a typeglob that is being freed creates a new typeglob entry containing an object with a destructor that creates a new entry containing an object....

p5140-Parsing code internal error (%s)

This new fatal error is produced when parsing code supplied by an extension violates the parser's API in a detectable way.

p5140-refcnt: fd %d%s

This new error only occurs if a internal consistency check fails when a pipe is about to be closed.

p5140-Regexp modifier "/%c" may not appear twice

The regular expression pattern has one of the mutually exclusive modifiers repeated.

p5140-Regexp modifiers "/%c" and "/%c" are mutually exclusive

The regular expression pattern has more than one of the mutually exclusive modifiers.

p5140-Using !~ with %s doesn't make sense

This error occurs when !~ is used with s///r or y///r.

p5140-New Warnings

p5140-"\b{" is deprecated; use "\b\{" instead
p5140-"\B{" is deprecated; use "\B\{" instead

Use of an unescaped "{" immediately following a \b or \B is now deprecated so as to reserve its use for Perl itself in a future release.

p5140-Operation "%s" returns its argument for ...

Performing an operation requiring Unicode semantics (such as case-folding) on a Unicode surrogate or a non-Unicode character now triggers this warning.

p5140-Use of qw(...) as parentheses is deprecated

See "p5140-Use of qw(...) as parentheses", above, for details.

p5140-Changes to Existing Diagnostics

p5140-Utility Changes

p5140-perlbug

p5140-perl5db.pl

p5140-ptargrep

p5140-Configuration and Compilation

See also "p5140-Naming fixes in Policy_sh.SH may invalidate Policy.sh", above.

p5140-Platform Support

p5140-New Platforms

p5140-AIX

Perl now builds on AIX 4.2 (5.12.1).

p5140-Discontinued Platforms

p5140-Apollo DomainOS

The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in version 5.12.0. It had not worked for years before that.

p5140-MacOS Classic

The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in an earlier version.

p5140-Platform-Specific Notes

p5140-AIX

p5140-ARM

p5140-Cygwin

p5140-FreeBSD 7

p5140-HP-UX

p5140-IRIX

p5140-Mac OS X

p5140-MirBSD

p5140-NetBSD

p5140-Recent OpenBSDs now use perl's malloc

p5140-OpenVOS

p5140-Solaris

p5140-VMS

p5140-Windows

See also "p5140-fork() emulation will not wait for signalled children" and "p5140-Perl source code is read in text mode on Windows", above.

p5140-Internal Changes

p5140-New APIs

p5140-CLONE_PARAMS structure added to ease correct thread creation

Modules that create threads should now create CLONE_PARAMS structures by calling the new function Perl_clone_params_new(), and free them with Perl_clone_params_del(). This will ensure compatibility with any future changes to the internals of the CLONE_PARAMS structure layout, and that it is correctly allocated and initialised.

p5140-New parsing functions

Several functions have been added for parsing statements or multiple statements:

The parse_fullexpr(), parse_listexpr(), parse_termexpr(), and parse_arithexpr() functions have been added to the API. They perform recursive-descent parsing of expressions at various precedence levels. They are expected to be used by syntax plugins.

See perlapi for details.

p5140-Hints hash API

A new C API for introspecting the hinthash %^H at runtime has been added. See cop_hints_2hv, cop_hints_fetchpvn, cop_hints_fetchpvs, cop_hints_fetchsv, and hv_copy_hints_hv in perlapi for details.

A new, experimental API has been added for accessing the internal structure that Perl uses for %^H. See the functions beginning with cophh_ in perlapi.

p5140-C interface to caller()

The caller_cx function has been added as an XSUB-writer's equivalent of caller(). See perlapi for details.

p5140-Custom per-subroutine check hooks

XS code in an extension module can now annotate a subroutine (whether implemented in XS or in Perl) so that nominated XS code will be called at compile time (specifically as part of op checking) to change the op tree of that subroutine. The compile-time check function (supplied by the extension module) can implement argument processing that can't be expressed as a prototype, generate customised compile-time warnings, perform constant folding for a pure function, inline a subroutine consisting of sufficiently simple ops, replace the whole call with a custom op, and so on. This was previously all possible by hooking the entersub op checker, but the new mechanism makes it easy to tie the hook to a specific subroutine. See "cv_set_call_checker" in perlapi.

To help in writing custom check hooks, several subtasks within standard entersub op checking have been separated out and exposed in the API.

p5140-Improved support for custom OPs

Custom ops can now be registered with the new custom_op_register C function and the XOP structure. This will make it easier to add new properties of custom ops in the future. Two new properties have been added already, xop_class and xop_peep.

xop_class is one of the OA_*OP constants, and allows B and other introspection mechanisms to work with custom ops that aren't BASEOPs. xop_peep is a pointer to a function that will be called for ops of this type from Perl_rpeep.

See "Custom Operators" in perlguts and "Custom Operators" in perlapi for more detail.

The old PL_custom_op_names/PL_custom_op_descs interface is still supported but discouraged.

p5140-Scope hooks

It is now possible for XS code to hook into Perl's lexical scope mechanism at compile time, using the new Perl_blockhook_register function. See "Compile-time scope hooks" in perlguts.

p5140-The recursive part of the peephole optimizer is now hookable

In addition to PL_peepp, for hooking into the toplevel peephole optimizer, a PL_rpeepp is now available to hook into the optimizer recursing into side-chains of the optree.

p5140-New non-magical variants of existing functions

The following functions/macros have been added to the API. The *_nomg macros are equivalent to their non-_nomg variants, except that they ignore get-magic. Those ending in _flags allow one to specify whether get-magic is processed.

  sv_2bool_flags
  SvTRUE_nomg
  sv_2nv_flags
  SvNV_nomg
  sv_cmp_flags
  sv_cmp_locale_flags
  sv_eq_flags
  sv_collxfrm_flags

In some of these cases, the non-_flags functions have been replaced with wrappers around the new functions.

p5140-pv/pvs/sv versions of existing functions

Many functions ending with pvn now have equivalent pv/pvs/sv versions.

p5140-List op-building functions

List op-building functions have been added to the API. See op_append_elem, op_append_list, and op_prepend_elem in perlapi.

p5140-LINKLIST

The LINKLIST macro, part of op building that constructs the execution-order op chain, has been added to the API.

p5140-Localisation functions

The save_freeop, save_op, save_pushi32ptr and save_pushptrptr functions have been added to the API.

p5140-Stash names

A stash can now have a list of effective names in addition to its usual name. The first effective name can be accessed via the HvENAME macro, which is now the recommended name to use in MRO linearisations (HvNAME being a fallback if there is no HvENAME).

These names are added and deleted via hv_ename_add and hv_ename_delete. These two functions are not part of the API.

p5140-New functions for finding and removing magic

The mg_findext() and sv_unmagicext() functions have been added to the API. They allow extension authors to find and remove magic attached to scalars based on both the magic type and the magic virtual table, similar to how sv_magicext() attaches magic of a certain type and with a given virtual table to a scalar. This eliminates the need for extensions to walk the list of MAGIC pointers of an SV to find the magic that belongs to them.

p5140-find_rundefsv

This function returns the SV representing $_, whether it's lexical or dynamic.

p5140-Perl_croak_no_modify

Perl_croak_no_modify() is short-hand for Perl_croak("%s", PL_no_modify).

p5140-PERL_STATIC_INLINE define

The PERL_STATIC_INLINE define has been added to provide the best-guess incantation to use for static inline functions, if the C compiler supports C99-style static inline. If it doesn't, it'll give a plain static.

HAS_STATIC_INLINE can be used to check if the compiler actually supports inline functions.

p5140-New pv_escape option for hexadecimal escapes

A new option, PERL_PV_ESCAPE_NONASCII, has been added to pv_escape to dump all characters above ASCII in hexadecimal. Before, one could get all characters as hexadecimal or the Latin1 non-ASCII as octal.

p5140-lex_start

lex_start has been added to the API, but is considered experimental.

p5140-op_scope() and op_lvalue()

The op_scope() and op_lvalue() functions have been added to the API, but are considered experimental.

p5140-C API Changes

p5140-PERL_POLLUTE has been removed

The option to define PERL_POLLUTE to expose older 5.005 symbols for backwards compatibility has been removed. It's use was always discouraged, and MakeMaker contains a more specific escape hatch:

    perl Makefile.PL POLLUTE=1

This can be used for modules that have not been upgraded to 5.6 naming conventions (and really should be completely obsolete by now).

p5140-Check API compatibility when loading XS modules

When perl's API changes in incompatible ways (which usually happens between major releases), XS modules compiled for previous versions of perl will not work anymore. They will need to be recompiled against the new perl.

In order to ensure that modules are recompiled, and to prevent users from accidentally loading modules compiled for old perls into newer ones, the XS_APIVERSION_BOOTCHECK macro has been added. That macro, which is called when loading every newly compiled extension, compares the API version of the running perl with the version a module has been compiled for and raises an exception if they don't match.

p5140-Perl_fetch_cop_label

The first argument of the C API function Perl_fetch_cop_label has changed from struct refcounted he * to COP *, to insulate the user from implementation details.

This API function was marked as "may change", and likely isn't in use outside the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other references to it.)

p5140-GvCV() and GvGP() are no longer lvalues

The new GvCV_set() and GvGP_set() macros are now provided to replace assignment to those two macros.

This allows a future commit to eliminate some backref magic between GV and CVs, which will require complete control over assignment to the gp_cv slot.

p5140-CvGV() is no longer an lvalue

Under some circumstances, the CvGV() field of a CV is now reference-counted. To ensure consistent behaviour, direct assignment to it, for example CvGV(cv) = gv is now a compile-time error. A new macro, CvGV_set(cv,gv) has been introduced to perform this operation safely. Note that modification of this field is not part of the public API, regardless of this new macro (and despite its being listed in this section).

p5140-CvSTASH() is no longer an lvalue

The CvSTASH() macro can now only be used as an rvalue. CvSTASH_set() has been added to replace assignment to CvSTASH(). This is to ensure that backreferences are handled properly. These macros are not part of the API.

p5140-Calling conventions for newFOROP and newWHILEOP

The way the parser handles labels has been cleaned up and refactored. As a result, the newFOROP() constructor function no longer takes a parameter stating what label is to go in the state op.

The newWHILEOP() and newFOROP() functions no longer accept a line number as a parameter.

p5140-Flags passed to uvuni_to_utf8_flags and utf8n_to_uvuni

Some of the flags parameters to uvuni_to_utf8_flags() and utf8n_to_uvuni() have changed. This is a result of Perl's now allowing internal storage and manipulation of code points that are problematic in some situations. Hence, the default actions for these functions has been complemented to allow these code points. The new flags are documented in perlapi. Code that requires the problematic code points to be rejected needs to change to use the new flags. Some flag names are retained for backward source compatibility, though they do nothing, as they are now the default. However the flags UNICODE_ALLOW_FDD0, UNICODE_ALLOW_FFFF, UNICODE_ILLEGAL, and UNICODE_IS_ILLEGAL have been removed, as they stem from a fundamentally broken model of how the Unicode non-character code points should be handled, which is now described in "Non-character code points" in perlunicode. See also the Unicode section under "p5140-Selected Bug Fixes".

p5140-Deprecated C APIs

p5140-Perl_ptr_table_clear

Perl_ptr_table_clear is no longer part of Perl's public API. Calling it now generates a deprecation warning, and it will be removed in a future release.

p5140-sv_compile_2op

The sv_compile_2op() API function is now deprecated. Searches suggest that nothing on CPAN is using it, so this should have zero impact.

It attempted to provide an API to compile code down to an optree, but failed to bind correctly to lexicals in the enclosing scope. It's not possible to fix this problem within the constraints of its parameters and return value.

p5140-find_rundefsvoffset

The find_rundefsvoffset function has been deprecated. It appeared that its design was insufficient for reliably getting the lexical $_ at run-time.

Use the new find_rundefsv function or the UNDERBAR macro instead. They directly return the right SV representing $_, whether it's lexical or dynamic.

p5140-CALL_FPTR and CPERLscope

Those are left from an old implementation of MULTIPLICITY using C++ objects, which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so they shouldn't be used anymore.

For compatibility, they are still defined for external XS code. Only extensions defining PERL_CORE must be updated now.

p5140-Other Internal Changes

p5140-Stack unwinding

The protocol for unwinding the C stack at the last stage of a die has changed how it identifies the target stack frame. This now uses a separate variable PL_restartjmpenv, where previously it relied on the blk_eval.cur_top_env pointer in the eval context frame that has nominally just been discarded. This change means that code running during various stages of Perl-level unwinding no longer needs to take care to avoid destroying the ghost frame.

p5140-Scope stack entries

The format of entries on the scope stack has been changed, resulting in a reduction of memory usage of about 10%. In particular, the memory used by the scope stack to record each active lexical variable has been halved.

p5140-Memory allocation for pointer tables

Memory allocation for pointer tables has been changed. Previously Perl_ptr_table_store allocated memory from the same arena system as SV bodies and HEs, with freed memory remaining bound to those arenas until interpreter exit. Now it allocates memory from arenas private to the specific pointer table, and that memory is returned to the system when Perl_ptr_table_free is called. Additionally, allocation and release are both less CPU intensive.

p5140-UNDERBAR

The UNDERBAR macro now calls find_rundefsv. dUNDERBAR is now a noop but should still be used to ensure past and future compatibility.

p5140-String comparison routines renamed

The ibcmp_* functions have been renamed and are now called foldEQ, foldEQ_locale and foldEQ_utf8. The old names are still available as macros.

p5140-chop and chomp implementations merged

The opcode bodies for chop and chomp and for schop and schomp have been merged. The implementation functions Perl_do_chop() and Perl_do_chomp(), never part of the public API, have been merged and moved to a static function in pp.c. This shrinks the perl binary slightly, and should not affect any code outside the core (unless it is relying on the order of side effects when chomp is passed a list of values).

p5140-Selected Bug Fixes

p5140-I/O

p5140-Regular Expression Bug Fixes

p5140-Syntax/Parsing Bugs

p5140-Stashes, Globs and Method Lookup

Perl 5.10.0 introduced a new internal mechanism for caching MROs (method resolution orders, or lists of parent classes; aka "isa" caches) to make method lookup faster (so @ISA arrays would not have to be searched repeatedly). Unfortunately, this brought with it quite a few bugs. Almost all of these have been fixed now, along with a few MRO-related bugs that existed before 5.10.0:

In addition, various other bugs related to typeglobs and stashes have been fixed:

p5140-Unicode

p5140-Ties, Overloading and Other Magic

p5140-The Debugger

p5140-Threads

p5140-Scoping and Subroutines

p5140-Signals

p5140-Miscellaneous Memory Leaks

p5140-Memory Corruption and Crashes

p5140-Fixes to Various Perl Operators

p5140-Bugs Relating to the C API

p5140-Known Problems

XXX Many of these have probably already been solved. There are also unresolved BBC articles linked to #77718 that are awaiting CPAN releases. These may need to be listed here. See also #84444. Enbugger may also need to be listed if there is no new release in time (see #82152). JJORE/overload-eval-0.08.tar.gz appears to be broken, too. See http://www.nntp.perl.org/group/perl.perl5.porters/2010/11/msg165773.html

p5140-Errata

p5140-keys, values and each work on arrays

You can now use the keys, values, each builtin functions on arrays (previously you could only use them on hashes). See perlfunc for details. This is actually a change introduced in perl 5.12.0, but it was missed from that release's perldelta.

p5140-split and @_

split no longer modifies @_ when called in scalar or void context. In void context it now produces a "Useless use of split" warning. This was also a perl 5.12.0 changed that missed the perldelta.

p5140-Obituary

Randy Kobes, creator of the kobesearch alternative to search.cpan.org and contributor/maintainer to several core Perl toolchain modules, passed away on September 18, 2010 after a battle with lung cancer. His contributions to the Perl community will be missed.

p5140-Acknowledgements

XXX The list of people to thank goes here.

p5140-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5140-SEE ALSO

The Changes file for an explanation of how to view 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.

p51311-NAME

perl51311delta - what is new for perl v5.13.11

p51311-DESCRIPTION

This document describes differences between the 5.13.10 release and the 5.13.11 release.

If you are upgrading from an earlier release such as 5.13.9, first read "p5139-NAME", which describes differences between 5.13.9 and 5.13.10.

p51311-Security

p51311-User-defined regular expression properties

Perl no longer allows a tainted regular expression to invoke a user-defined property via \p{...} syntax. It simply dies instead [perl #82616].

p51311-Incompatible Changes

p51311-local($_) will strip all magic from $_

local() on scalar variables will give them a new value, but keep all their magic intact. This has proven to be problematic for the default scalar variable $_, where perlsub recommends that any subroutine that assigns to $_ should localize it first. This would throw an exception if $_ is aliased to a read-only variable, and could have various unintentional side-effects in general.

Therefore, as an exception to the general rule, local($_) will not only assign a new value to $_, but also remove all existing magic from it as well.

p51311-Passing references to warn()

An earlier Perl 5.13.x release changed warn($ref) to leave the reference unchanged, allowing $SIG{__WARN__} handlers to access the original reference. But this stopped warnings that were references from having the file and line number appended even when there was no $SIG{__WARN__} handler in place.

Now warn checks for the presence of such a handler and, if there is none, proceeds to stringify the reference and append the file and line number. This allows simple uses of warn for debugging to continue to work as they did before.

p51311-fork() emulation will not wait for signalled children

On Windows parent processes would not terminate until all forked childred had terminated first. However, kill('KILL', ...) is inherently unstable on pseudo-processes, and kill('TERM', ...) might not get delivered if the child if blocked in a system call.

To avoid the deadlock and still provide a safe mechanism to terminate the hosting process, Perl will now no longer wait for children that have been sent a SIGTERM signal. It is up to the parent process to waitpid() for these children if child clean-up processing must be allowed to finish. However, it is also the responsibility of the parent then to avoid the deadlock by making sure the child process can't be blocked on I/O either.

See perlfork for more information about the fork() emulation on Windows.

p51311-Perl source code is read in text mode on Windows

Perl scripts used to be read in binary mode on Windows for the benefit of the ByteLoader module (which is no longer part of core Perl). This had the side effect of breaking various operations on the DATA filehandle, including seek()/tell(), and even simply reading from DATA after file handles have been flushed by a call to system(), backticks, fork() etc.

The default build options for Windows have been changed to read Perl source code on Windows in text mode now. Hopefully ByteLoader will be updated on CPAN to automatically handle this situation.

p51311-Performance Enhancements

p51311-Modules and Pragmata

p51311-Updated Modules and Pragmata

p51311-Documentation

p51311-Changes to Existing Documentation

p51311-perlfunc

p51311-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p51311-New Diagnostics

p51311-Testing

Many of the tests have been refactored to use testing libraries more consistently. In some cases test files were created or deleted:

p51311-Selected Bug Fixes

p51311-Acknowledgements

Perl 5.13.11 represents approximately one month of development since Perl 5.13.10 and contains approximately 80,000 lines of changes across 549 files from 31 authors and committers:

Alastair Douglas, Arvan, Boris Ratner, brian d foy, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father Chrysostomos, Florian Ragwitz, Jan Dubois, Karl Williamson, Kevin Ryde, Leon Brocard, Leon Timmermans, Michael Stevens, Michael Witten, Moritz Lenz, Nicholas Clark, Paul Johnson, Peter John Acklam, Reini Urban, Robin Barker, Steve Hay, Sullivan Beck, Tony Cook, Vadim Konovalov, Yves Orton, Zefram and Ævar Arnfjörð Bjarmason

p51311-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p51311-SEE ALSO

The Changes file for an explanation of how to view 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.

p51310-NAME

perl51310delta - what is new for perl v5.13.10

p51310-DESCRIPTION

This document describes differences between the 5.13.9 release and the 5.13.10 release.

If you are upgrading from an earlier release such as 5.13.8, first read "p5139-NAME", which describes differences between 5.13.8 and 5.13.9.

p51310-Core Enhancements

p51310-The new regular expression modifiers available in suffix form

Various releases of the 5.13.x series have added new regular expression modifiers, /a, /d, /l, and /u. They were only available in infix form (e.g., (?a:...)) until this release; now they are usable in suffix form. This change was made too late to change all the affected documentation, so there are a number of places that erroneously say these must be used in infix form.

However, there is an ambiguity with the construct, s/foo/bar/le.... Due to backward compatibility constraints, in Perl 5.14 only, it will be resolved as s/foo/bar/ le..., that is, as meaning to take the result of the substitution, and see if it is stringwise less-than-or-equal-to what follows. In Perl 5.16 and later, it will instead be resolved as meaning to do the pattern match using the rules of the current locale, and evaluate the rhs as an expression when doing the substitution. In 5.14, if you want the latter interpretation, you can write "el" instead.

p51310-Add \p{Titlecase} as a synonym for \p{Title}

This synonym is added for symmetry with the Unicode property names \p{Uppercase} and \p{Lowercase}.

p51310-New regular expression modifier option /aa

Doubling the /a regular expression modifier increases its effect, so that in case-insensitive matching, no ASCII character will match a non-ASCII character. For example, normally,

    'k' =~ /\N{KELVIN SIGN}/i

will match; it won't under /aa.

p51310-New warnings categories for problematic (non-)Unicode code points.

Three new warnings subcategories of have been added. These allow you to turn off warnings for their covered events, while allowing the other UTF-8 warnings to remain on. The three categories are: surrogate when UTF-16 surrogates are encountered; nonchar when Unicode non-character code points are encountered; and non_unicode when code points that are above the legal Unicode maximum of 0x10FFFF are encountered.

p51310-Incompatible Changes

p51310-Most \p{} properties are now immune from case-insensitive matching

For most Unicode properties, it doesn't make sense to have them match differently under /i case-insensitive matching than not. And doing so leads to unexpected results and potential security holes. For example

 m/\p{ASCII_Hex_Digit}+/i

could previously match non-ASCII characters because of the Unicode matching rules. There were a number of bugs in this feature until an earlier release in the 5.13 series. Now this release reverts, and removes the feature completely except for the few properties where people have come to expect it, namely the ones where casing is an integral part of their functionality, such as m/\p{Uppercase}/i and m/\p{Lowercase}/i, both of which match the exact same code points, namely those matched by m/\p{Cased}/i. Details are in "Unicode Properties" in perlrecharclass.

User-defined property handlers that need to match differently under /i must change to read the new boolean parameter passed it which is non-zero if case-insensitive matching is in effect; 0 if not. See "User-Defined Character Properties" in perluniprops.

p51310-regex: \p{} in pattern implies Unicode semantics

Now, a Unicode property match specified in the pattern will indicate that the pattern is meant for matching according to Unicode rules (e40e74f)

p51310-add GvCV_set() and GvGP_set() macros and change GvGP()

This allows a future commit to eliminate some backref magic between GV and CVs, which will require complete control over assignment to the gp_cv slot.

If you've been using GvGP() in lvalue context this change will break your code, you should use GvGP_set() instead. (c43ae56)

p51310-_swash_inversion_hash is no longer exported as part of the API

This function shouldn't be called from XS code. (4c2e113)

p51310-Unreferenced objects in global destruction

The fix for [perl #36347], which made sure that destructors were called on unreferenced objects, broke the tests for three CPAN modules, which apparently rely on the bug.

To provide more time for fixing them (as this is such a minor bug), we have reverted the fix until after perl 5.14.0.

This resolves [perl #82542] and other related tickets.

p51310-close on shared pipes

The close function no longer waits for the child process to exit if the underlying file descriptor is still in use by another thread, to avoid deadlocks. It returns true in such cases.

p51310-Deprecations

p51310-Deprecated Modules

The following modules will be removed from the core distribution in a future release, and should be installed from CPAN instead. Distributions on CPAN which require these should add them to their prerequisites. The core versions of these modules warnings will issue a deprecation warning.

If you ship a packaged version of Perl, either alone or as part of a larger system, then you should carefully consider the repercussions of core module deprecations. You may want to consider shipping your default build of Perl with packages for some or all deprecated modules which install into vendor or site perl library directories. This will inhibit the deprecation warnings.

Alternatively, you may want to consider patching lib/deprecate.pm to provide deprecation warnings specific to your packaging system or distribution of Perl, consistent with how your packaging system or distribution manages a staged transition from a release where the installation of a single package provides the given functionality, to a later release where the system administrator needs to know to install multiple packages to get that same functionality.

You can silence these deprecation warnings by installing the modules in question from CPAN. To install the latest version of all of them, just install Task::Deprecations::5_14.

p51310-Devel::DProf

We strongly recommend that you install and used Devel::NYTProf in preference, as it offers significantly improved profiling and reporting.

p51310-User-defined case-mapping

This feature is being deprecated due to its many issues, as documented in "User-Defined Case Mappings (for serious hackers only)" in perlunicode. It is planned to remove this feature in Perl 5.16. A CPAN module providing improved functionality is being prepared for release by the time 5.14 is.

p51310-Modules and Pragmata

p51310-New Modules and Pragmata

p51310-Updated Modules and Pragmata

p51310-Documentation

p51310-Changes to Existing Documentation

p51310-overload

p51310-perlhack and perlrepository

p51310-perlfunc

p51310-perlfaq4

p51310-Miscellaneous

p51310-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p51310-New Diagnostics

p51310-"\b{" is deprecated; use "\b\{" instead
p51310-"\B{" is deprecated; use "\B\{" instead

Use of an unescaped "{" immediately following a \b or \B is now deprecated so as to reserve its use for Perl itself in a future release.

p51310-regcomp: Add warning if \p is used under locale. (fb2e24c)

\p implies Unicode matching rules, which are likely going to be different than the locale's.

p51310-panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries

This new error is triggered if a destructor called on an object in a typeglob that is being freed creates a new typeglob entry containing an object with a destructor that creates a new entry containing an object....

p51310-refcnt: fd %d%s

This new error only occurs if a internal consistency check fails when a pipe is about to be closed.

p51310-Changes to Existing Diagnostics

p51310-Utility Changes

p51310-perlbug

p51310-Configuration and Compilation

p51310-Testing

p51310-Platform Support

p51310-Platform-Specific Notes

p51310-Windows
p51310-MirBSD

p51310-Internal Changes

p51310-Selected Bug Fixes

p51310-Acknowledgements

Perl 5.13.10 represents approximately one month of development since Perl 5.13.9 and contains approximately 63000 lines of changes across 609 files from 38 authors and committers:

Abigail, Alexander Hartmaier, brian d foy, Charles Bailey, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, Dave Rolsky, David Golden, David Leadbeater, David Mitchell, David Wheeler, Father Chrysostomos, Florian Ragwitz, Franz Fasching, George Greer, H.Merijn Brand, Hongwen Qiu, Hugo van der Sanden, Jay Hannah, Jesse Vincent, Karl Williamson, Larwan Berke, Leon Timmermans, Michael Breen, Michael Stevens, Nicholas Clark, Noirin Shirley, Paul Evans, Peter John Acklam, Ricardo Signes, Robin Barker, Steven Schubiger, Tom Christiansen, Tony Cook, Zsbán Ambrus and Ævar Arnfjörð Bjarmason

p51310-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p51310-SEE ALSO

The Changes file for an explanation of how to view 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.

p5139-NAME

perl5139delta - what is new for perl v5.13.9

p5139-DESCRIPTION

This document describes differences between the 5.13.8 release and the 5.13.9 release.

If you are upgrading from an earlier release such as 5.13.7, first read "p5138-NAME", which describes differences between 5.13.7 and 5.13.8.

p5139-Core Enhancements

p5139-New regular expression modifier /a

The /a regular expression modifier restricts \s to match precisely the five characters [ \f\n\r\t], \d to match precisely the 10 characters [0-9], \w to match precisely the 63 characters [A-Za-z0-9_], and the Posix ([[:posix:]]) character classes to match only the appropriate ASCII characters. The complements, of course, match everything but; and \b and \B are correspondingly affected. Otherwise, /a behaves like the /u modifier, in that case-insensitive matching uses Unicode semantics; for example, "k" will match the Unicode \N{KELVIN SIGN} under /i matching, and code points in the Latin1 range, above ASCII will have Unicode semantics when it comes to case-insensitive matching. Like its cousins (/u, /l, and /d), and in spite of the terminology, /a in 5.14 will not actually be able to be used as a suffix at the end of a regular expression (this restriction is planned to be lifted in 5.16). It must occur either as an infix modifier, such as (?a:...) or ((?a)..., or it can be turned on within the lexical scope of use re '/a'. Turning on /a turns off the other "character set" modifiers.

p5139-Any unsigned value can be encoded as a character

With this release, Perl is adopting a model that any unsigned value can be treated as a code point and encoded internally (as utf8) without warnings -- not just the code points that are legal in Unicode. However, unless utf8 warnings have been explicitly lexically turned off, outputting or performing a Unicode-defined operation (such as upper-casing) on such a code point will generate a warning. Attempting to input these using strict rules (such as with the :encoding('UTF-8') layer) will continue to fail. Prior to this release the handling was very inconsistent, and incorrect in places. Also, the Unicode non-characters, some of which previously were erroneously considered illegal in places by Perl, contrary to the Unicode standard, are now always legal internally. But inputting or outputting them will work the same as for the non-legal Unicode code points, as the Unicode standard says they are illegal for "open interchange".

p5139-Regular expression debugging output improvement

Regular expression debugging output (turned on by use re 'debug';) now uses hexadecimal when escaping non-ASCII characters, instead of octal.

p5139-Security

p5139-Restrict \p{IsUserDefined} to In\w+ and Is\w+

In "User-Defined Character Properties" in perlunicode, it says you can create custom properties by defining subroutines whose names begin with "In" or "Is". However, perl doesn't actually enforce that naming restriction, so \p{foo::bar} will call foo::Bar() if it exists.

This commit finally enforces this convention. Note that this broke a number of existing tests for properties, since they didn't always use an Is/In prefix.

p5139-Incompatible Changes

p5139-All objects are destroyed

It used to be possible to prevent a destructor from being called during global destruction by artificially increasing the reference count of an object.

Now such objects will will be destroyed, as a result of a bug fix [perl #81230].

This has the potential to break some XS modules. (In fact, it break some. See "p5139-Known Problems", below.)

p5139-Modules and Pragmata

p5139-New Modules and Pragmata

p5139-Updated Modules and Pragmata

p5139-Documentation

p5139-Changes to Existing Documentation

p5139-All documentation

p5139-perlhack

p5139-perlfunc

p5139-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p5139-New Diagnostics

p5139-Changes to Existing Diagnostics

p5139-Utility Changes

p5139-perlbug

p5139-buildtoc

p5139-Testing

p5139-Platform Support

p5139-Discontinued Platforms

p5139-Apollo DomainOS

The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in version 5.12.0. It had not worked for years before that.

p5139-MacOS Classic

The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in an earlier version.

p5139-Platform-Specific Notes

p5139-Cygwin
p5139-Solaris

DTrace is now supported on Solaris. There used to be build failures, but these have been fixed [perl #73630].

p5139-Internal Changes

p5139-Selected Bug Fixes

p5139-Known Problems

p5139-Acknowledgements

Perl 5.13.9 represents approximately one month of development since Perl 5.13.8 and contains approximately 48000 lines of changes across 809 files from 35 authors and committers:

Abigail, Ævar Arnfjörð Bjarmason, brian d foy, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson, Leon Timmermans, Michael Parker, Michael Stevens, Nicholas Clark, Nuno Carvalho, Paul "LeoNerd" Evans, Peter J. Acklam, Peter Martini, Rainer Tammer, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker, Tony Cook, Vadim Konovalov, Vincent Pit, Zefram, and Zsbán Ambrus.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5139-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5139-SEE ALSO

The Changes file for an explanation of how to view 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.

p5138-NAME

perl5138delta - what is new for perl v5.13.8

p5138-DESCRIPTION

This document describes differences between the 5.13.7 release and the 5.13.8 release.

If you are upgrading from an earlier release such as 5.13.6, first read "p5137-NAME", which describes differences between 5.13.6 and 5.13.7.

p5138-Core Enhancements

p5138--d:-foo calls Devel::foo::unimport

The syntax -d:foo was extended in 5.6.1 to make -d:foo=bar equivalent to -MDevel::foo=bar, which expands internally to use Devel::foo 'bar';. perl now allows prefixing the module name with -, with the same semantics as -M, i.e.

p5138--d:-foo

Equivalent to -M-Devel::foo, expands to no Devel::foo;, calls Devel::foo->unimport() if the method exists.

p5138--d:-foo=bar

Equivalent to -M-Devel::foo=bar, expands to no Devel::foo 'bar';, calls Devel::foo->unimport('bar') if the method exists.

This is particularly useful to suppresses the default actions of a Devel::* module's import method whilst still loading it for debugging.

p5138-Filehandle method calls load IO::File on demand

When a method call on a filehandle would die because the method cannot be resolved, and IO::File has not been loaded, Perl now loads IO::File via require and attempts method resolution again:

  open my $fh, ">", $file;
  $fh->binmode(":raw");     # loads IO::File and succeeds

This also works for globs like STDOUT, STDERR and STDIN:

  STDOUT->autoflush(1);

Because this on-demand load only happens if method resolution fails, the legacy approach of manually loading an IO::File parent class for partial method support still works as expected:

  use IO::Handle;
  open my $fh, ">", $file;
  $fh->autoflush(1);        # IO::File not loaded

p5138-Full functionality for use feature 'unicode_strings'

This release provides full functionality for use feature 'unicode_strings'. Under its scope, all string operations executed and regular expressions compiled (even if executed outside its scope) have Unicode semantics. See feature.

This feature avoids most forms of the "Unicode Bug" (See "The "Unicode Bug"" in perlunicode for details.) If there is a possibility that your code will process Unicode strings, you are strongly encouraged to use this subpragma to avoid nasty surprises.

The availability of this should strongly affect the whole tone of various documents, such as perlunicode and perluniintro, but this work has not been done yet.

p5138-Exception Handling Backcompat Hack

When an exception is thrown in an eval BLOCK, $@ is now set before unwinding, as well as being set after unwinding as the eval block exits. This early setting supports code that has historically treated $@ during unwinding as an indicator of whether the unwinding was due to an exception. These modules had been broken by 5.13.1's change from setting $@ early to setting it late. This double setting arrangement is a stopgap until the reason for unwinding can be made properly introspectable. $@ has never been a reliable indicator of the reason for unwinding.

p5138-printf-like functions understand post-1980 size modifiers

Perl's printf and sprintf operators, and Perl's internal printf replacement function, now understand the C90 size modifiers "hh" (char), "z" (size_t), and "t" (ptrdiff_t). Also, when compiled with a C99 compiler, Perl now understands the size modifier "j" (intmax_t).

So, for example, on any modern machine, sprintf('%hhd', 257) returns '1'.

p5138-DTrace probes now include package name

The DTrace probes now include an additional argument (arg3) which contains the package the subroutine being entered or left was compiled in.

For example using the following DTrace script:

  perl$target:::sub-entry
  {
      printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
  }

and then running:

  perl -e'sub test { }; test'

DTrace will print:

  main::test

p5138-Stacked labels

Multiple statement labels can now appear before a single statement.

p5138-Incompatible Changes

p5138-:= is now a syntax error

Previously my $pi := 4; was exactly equivalent to my $pi : = 4;, with the : being treated as the start of an attribute list, ending before the =. The use of := to mean : = was deprecated in 5.12.0, and is now a syntax error. This will allow the future use of := as a new token.

We find no Perl 5 code on CPAN using this construction, outside the core's tests for it, so we believe that this change will have very little impact on real-world codebases.

If it is absolutely necessary to have empty attribute lists (for example, because of a code generator) then avoid the error by adding a space before the =.

p5138-Run-time code block in regular expressions

Code blocks in regular expressions ((?{...}) and (??{...})) used not to inherit any pragmata (strict, warnings, etc.) if the regular expression was compiled at run time as happens in cases like these two:

  use re 'eval';
  $foo =~ $bar; # when $bar contains (?{...})
  $foo =~ /$bar(?{ $finished = 1 })/;

This was a bug, which has now been fixed. But it has the potential to break any code that was relying on this bug.

p5138-Deprecations

p5138-?PATTERN? is deprecated

?PATTERN? (without the initial m) has been deprecated and now produces a warning. This is to allow future use of ? in new operators. The match-once functionality is still available in the form of m?PATTERN?.

p5138-sv_compile_2op() is now deprecated

The sv_compile_2op() API function is now deprecated. Searches suggest that nothing on CPAN is using it, so this should have zero impact.

It attempted to provide an API to compile code down to an optree, but failed to bind correctly to lexicals in the enclosing scope. It's not possible to fix this problem within the constraints of its parameters and return value.

p5138-Tie functions on scalars holding typeglobs

Calling a tie function (tie, tied, untie) with a scalar argument acts on a file handle if the scalar happens to hold a typeglob.

This is a long-standing bug that will be removed in Perl 5.16, as there is currently no way to tie the scalar itself when it holds a typeglob, and no way to untie a scalar that has had a typeglob assigned to it.

This bug was fixed in 5.13.7 but, because of the breakage it caused, the fix has been reverted. Now there is a deprecation warning whenever a tie function is used on a handle without an explicit *.

p5138-Modules and Pragmata

p5138-Updated Modules and Pragmata

p5138-Dual-life Modules and Pragmata

These modules were formerly distributed only in the Perl core distribution, and are now dual-lifed (meaning they are now also available separately on CPAN):

p5138-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p5138-New Diagnostics

p5138-Changes to Existing Diagnostics

p5138-Configuration and Compilation

p5138-Testing

p5138-Platform Support

p5138-Platform-Specific Notes

p5138-NetBSD

The NetBSD hints file has been changed to make the system's malloc the default.

p5138-Windows

The option to use an externally-supplied crypt(), or to build with no crypt() at all, has been removed. Perl supplies its own crypt() implementation for Windows, and the political situation that required this part of the distribution to sometimes be omitted is long gone.

p5138-Internal Changes

p5138-Selected Bug Fixes

p5138-Acknowledgements

Perl 5.13.8 represents approximately one month of development since Perl 5.13.7 and contains 38715 lines of changes across 546 files from 38 authors and committers.

Thank you to the following for contributing to this release:

Abhijit Menon-Sen, Abigail, Andreas König, Ben Morrow, Brad Gilbert, brian d foy, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father Chrysostomos, Florian Ragwitz, Goro Fuji, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson, Lukas Mai, Marvin Humphrey, Max Maischein, Michael Breen, Michael Fig, Nicholas Clark, Nick Cleaton, Paul Evans, Peter J. Holzer, Peter John Acklam, Rafael Garcia-Suarez, Reini Urban, Renee Baecker, Ricardo Signes, Tony Cook, Yves Orton, Zefram

p5138-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5138-SEE ALSO

The Changes file for an explanation of how to view 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.

p5137-NAME

perl5137delta - what is new for perl v5.13.7

p5137-DESCRIPTION

This document describes differences between the 5.13.6 release and the 5.13.7 release.

If you are upgrading from an earlier release such as 5.13.5, first read "p5136-NAME", which describes differences between 5.13.5 and 5.13.6.

p5137-Core Enhancements

p5137-Single term prototype

The + prototype is a special alternative to $ that will act like \[@%] when given a literal array or hash variable, but will otherwise force scalar context on the argument. This is useful for functions which should accept either a literal array or an array reference as the argument:

    sub smartpush (+@) {
        my $aref = shift;
        die "Not an array or arrayref" unless ref $aref eq 'ARRAY';
        push @$aref, @_;
    }

When using the + prototype, your function must check that the argument is of an acceptable type.

p5137-use re '/flags';

The re pragma now has the ability to turn on regular expression flags till the end of the lexical scope:

    use re '/x';
    "foo" =~ / (.+) /;  # /x implied

See "'/flags' mode" in re for details.

p5137-Statement labels can appear in more places

Statement labels can now occur before any type of statement or declaration, such as package.

p5137-use feature "unicode_strings" now applies to more regex matching

Another chunk of the "The "Unicode Bug"" in perlunicode is fixed in this release. Now, regular expressions compiled within the scope of the "unicode_strings" feature (or under the "u" regex modifier (specifiable currently only with infix notation (?u:...) or via use re '/u') will match the same whether or not the target string is encoded in utf8, with regard to [[:posix:]] character classes

Work is underway to add the case sensitive matching to the control of this feature, but was not complete in time for this dot release.

p5137-Array and hash container functions accept references

All built-in functions that operate directly on array or hash containers now also accept hard references to arrays or hashes:

  |----------------------------+---------------------------|
  | Traditional syntax         | Terse syntax              |
  |----------------------------+---------------------------|
  | push @$arrayref, @stuff    | push $arrayref, @stuff    |
  | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
  | pop @$arrayref             | pop $arrayref             |
  | shift @$arrayref           | shift $arrayref           |
  | splice @$arrayref, 0, 2    | splice $arrayref, 0, 2    |
  | keys %$hashref             | keys $hashref             |
  | keys @$arrayref            | keys $arrayref            |
  | values %$hashref           | values $hashref           |
  | values @$arrayref          | values $arrayref          |
  | ($k,$v) = each %$hashref   | ($k,$v) = each $hashref   |
  | ($k,$v) = each @$arrayref  | ($k,$v) = each $arrayref  |
  |----------------------------+---------------------------|

This allows these built-in functions to act on long dereferencing chains or on the return value of subroutines without needing to wrap them in @{} or %{}:

  push @{$obj->tags}, $new_tag;  # old way
  push $obj->tags,    $new_tag;  # new way

  for ( keys %{$hoh->{genres}{artists}} ) {...} # old way 
  for ( keys $hoh->{genres}{artists}    ) {...} # new way 

For push, unshift and splice, the reference will auto-vivify if it is not defined, just as if it were wrapped with @{}.

Calling keys or values directly on a reference gives a substantial performance improvement over explicit dereferencing.

For keys, values, each, when overloaded dereferencing is present, the overloaded dereference is used instead of dereferencing the underlying reftype. Warnings are issued about assumptions made in the following three ambiguous cases:

  (a) If both %{} and @{} overloading exists, %{} is used
  (b) If %{} overloading exists on a blessed arrayref, %{} is used
  (c) If @{} overloading exists on a blessed hashref, @{} is used

p5137-y///r

The /r flag, which was added to s/// in 5.13.2, has been extended to the y/// operator.

It causes it to perform the substitution on a copy of its operand, returning that copy instead of a character count.

p5137-New global variable ${^GLOBAL_PHASE}

A new global variable, ${^GLOBAL_PHASE}, has been added to allow introspection of the current phase of the perl interpreter. It's explained in detail in "${^GLOBAL_PHASE}" in perlvar and "BEGIN, UNITCHECK, CHECK, INIT and END" in perlmod.

p5137-Unicode Version 6.0 is now supported (mostly)

Perl comes with the Unicode 6.0 data base updated with Corrigendum #8, with one exception noted below. See http://unicode.org/versions/Unicode6.0.0 for details on the new release. Perl does not support any Unicode provisional properties, including the new ones for this release, but their database files are packaged with Perl.

Unicode 6.0 has chosen to use the name BELL for the character at U+1F514, which is a symbol that looks like a bell, and used in Japanese cell phones. This conflicts with the long-standing Perl usage of having BELL mean the ASCII BEL character, U+0007. In Perl 5.14, \N{BELL} will continue to mean U+0007, but its use will generate a deprecated warning message, unless such warnings are turned off. The new name for U+0007 in Perl will be ALERT, which corresponds nicely with the existing shorthand sequence for it, "\a". \N{BEL} will mean U+0007, with no warning given. The character at U+1F514 will not have a name in 5.14, but can be referred to by \N{U+1F514}. The plan is that in Perl 5.16, \N{BELL} will refer to U+1F514, and so all code that uses \N{BELL} should convert by then to using \N{ALERT}, \N{BEL}, or "\a" instead.

p5137-Improved support for custom OPs

Custom ops can now be registered with the new custom_op_register C function and the XOP structure. This will make it easier to add new properties of custom ops in the future. Two new properties have been added already, xop_class and xop_peep.

xop_class is one of the OA_*OP constants, and allows B and other introspection mechanisms to work with custom ops that aren't BASEOPs. xop_peep is a pointer to a function that will be called for ops of this type from Perl_rpeep.

See "Custom Operators" in perlguts and "Custom Operators" in perlapi for more detail.

The old PL_custom_op_names/PL_custom_op_descs interface is still supported but discouraged.

p5137-Incompatible Changes

p5137-Dereferencing typeglobs

If you assign a typeglob to a scalar variable:

    $glob = *foo;

the glob that is copied to $glob is marked with a special flag indicating that the glob is just a copy. This allows subsequent assignments to $glob to overwrite the glob. The original glob, however, is immutable.

Many Perl operators did not distinguish between these two types of globs. This would result in strange behaviour in edge cases: untie $scalar would do nothing if the last thing assigned to the scalar was a glob (because it treated it as untie *$scalar, which unties a handle). Assignment to a glob slot (e.g., (*$glob) = \@some_array) would simply assign \@some_array to $glob.

To fix this, the *{} operator (including the *foo and *$foo forms) has been modified to make a new immutable glob if its operand is a glob copy. Various operators that make a distinction between globs and scalars have been modified to treat only immutable globs as globs.

This causes an incompatible change in code that assigns a glob to the return value of *{} when that operator was passed a glob copy. Take the following code, for instance:

    $glob = *foo;
    *$glob = *bar;

The *$glob on the second line returns a new immutable glob. That new glob is made an alias to *bar. Then it is discarded. So the second assignment has no effect.

It also means that tie $handle will now tie $handle as a scalar, even if it has had a glob assigned to it.

The upside to this incompatible change is that bugs [perl #77496], [perl #77502], [perl #77508], [perl #77688], and [perl #77812], and maybe others, too, have been fixed.

See http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810 for even more detail.

p5137-Clearing stashes

Stash list assignment %foo:: = () used to make the stash anonymous temporarily while it was being emptied. Consequently, any of its subroutines referenced elsewhere would become anonymous (showing up as "(unknown)" in caller). Now they retain their package names, such that caller will return the original sub name if there is still a reference to its typeglob, or "foo::__ANON__" otherwise [perl #79208].

p5137-Deprecations

p5137-\N{BELL} is deprecated

This is because Unicode is using that name for a different character. See "p5137-Unicode Version 6.0 is now supported (mostly)" for more explanation.

p5137-Performance Enhancements

p5137-Modules and Pragmata

p5137-New Modules and Pragmata

p5137-Updated Modules and Pragmata

p5137-Documentation

perlvar reorders the variables and groups them by topic. Each variable introduced after Perl 5.000 notes the first version in which it is available. perlvar also has a new section for deprecated variables to note when they were removed.

p5137-New Documentation

p5137-perlpodstyle

New style guide for POD documentation, split mostly from the NOTES section of the pod2man man page.

( This was added to v5.13.6 but was not documented with that release ).

p5137-Changes to Existing Documentation

p5137-Diagnostics

p5137-New Diagnostics

p5137-Utility Changes

p5137-ptargrep

p5137-Testing

p5137-Platform Support

p5137-Platform-Specific Notes

p5137-Windows

Directory handles are now properly cloned when threads are created. In perl 5.13.6, child threads simply stopped inheriting directory handles. In previous versions, threads would share handles, resulting in crashes.

Support for building with Visual C++ 2010 is now underway, but is not yet complete. See README.win32 for more details.

p5137-VMS

Record-oriented files (record format variable or variable with fixed control) opened for write by the perlio layer will now be line buffered to prevent the introduction of spurious line breaks whenever the perlio buffer fills up.

p5137-Internal Changes

p5137-Selected Bug Fixes

p5137-Obituary

Randy Kobes, creator of the kobesearch alternative to search.cpan.org and contributor/maintainer to several core Perl toolchain modules, passed away on September 18, 2010 after a battle with lung cancer. His contributions to the Perl community will be missed.

p5137-Acknowledgements

Perl 5.13.7 represents approximately one month of development since Perl 5.13.6 and contains 73100 lines of changes across 518 files from 39 authors and committers:

Abhijit Menon-Sen, Abigail, Ben Morrow, Chas. J. Owens IV, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Father Chrysostomos, Fingle Nark, Florian Ragwitz, George Greer, Grant McLean, H.Merijn Brand, Ian Goodacre, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson, Lubomir Rintel, Marty Pauley, Moritz Lenz, Nicholas Clark, Nicolas Kaiser, Niko Tyni, Peter John Acklam, Rafael Garcia-Suarez, Shlomi Fish, Steffen Mueller, Steve Hay, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Yves Orton, Zefram and brian d foy

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5137-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5137-SEE ALSO

The Changes file for an explanation of how to view 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.

p5136-NAME

perl5136delta - what is new for perl v5.13.6

p5136-DESCRIPTION

This document describes differences between the 5.13.5 release and the 5.13.6 release.

If you are upgrading from an earlier release such as 5.13.4, first read "p5135-NAME", which describes differences between 5.13.4 and 5.13.5.

p5136-Core Enhancements

p5136-(?^...) regex construct added to signify default modifiers

A caret (also called a "circumflex accent") "^" immediately following a "(?" in a regular expression now means that the subexpression is to not inherit the surrounding modifiers such as /i, but to revert to the Perl defaults. Any modifiers following the caret override the defaults.

The stringification of regular expressions now uses this notation. E.g., before, qr/hlagh/i would be stringified as (?i-xsm:hlagh), but now it's stringified as (?^i:hlagh).

The main purpose of this is to allow tests that rely on the stringification to not have to change when new modifiers are added. See "Extended Patterns" in perlre.

p5136-"d", "l", and "u" regex modifiers added

These modifiers are currently only available within a (?...) construct.

The "l" modifier says to compile the regular expression as if it were in the scope of use locale, even if it is not.

The "u" modifier says to compile the regular expression as if it were in the scope of a use feature "unicode_strings" pragma.

The "d" modifier is used to override any use locale and use feature "unicode_strings" pragmas that are in effect at the time of compiling the regular expression.

See just below and "(?dlupimsx-imsx)" in perlre.

p5136-use feature "unicode_strings" now applies to some regex matching

Another chunk of the "The "Unicode Bug"" in perlunicode is fixed in this release. Now, regular expressions compiled within the scope of the "unicode_strings" feature will match the same whether or not the target string is encoded in utf8, with regard to \s, \w, \b, and their complements. Work is underway to add the [[:posix:]] character classes and case sensitive matching to the control of this feature, but was not complete in time for this dot release.

p5136-\N{...} now handles Unicode named character sequences

Unicode has a number of named character sequences, in which particular sequences of code points are given names. \N{...} now recognizes these. See charnames.

p5136-New function charnames::string_vianame()

This function is a run-time version of \N{...}, returning the string of characters whose Unicode name is its parameter. It can handle Unicode named character sequences, whereas the pre-existing charnames::vianame() cannot, as the latter returns a single code point. See charnames.

p5136-Reentrant regular expression engine

It is now safe to use regular expressions within (?{...}) and (??{...}) code blocks inside regular expressions.

These block are still experimental, however, and still have problems with lexical (my) variables, lexical pragmata and abnormal exiting.

p5136-Custom per-subroutine check hooks

XS code in an extension module can now annotate a subroutine (whether implemented in XS or in Perl) so that nominated XS code will be called at compile time (specifically as part of op checking) to change the op tree of that subroutine. The compile-time check function (supplied by the extension module) can implement argument processing that can't be expressed as a prototype, generate customised compile-time warnings, perform constant folding for a pure function, inline a subroutine consisting of sufficiently simple ops, replace the whole call with a custom op, and so on. This was previously all possible by hooking the entersub op checker, but the new mechanism makes it easy to tie the hook to a specific subroutine. See "cv_set_call_checker" in perlapi.

To help in writing custom check hooks, several subtasks within standard entersub op checking have been separated out and exposed in the API.

p5136-Return value of delete $+{...}

Custom regular expression engines can now determine the return value of delete on an entry of %+ or %-.

p5136-keys, values work on arrays

You can now use the keys, values, each builtin functions on arrays (previously you could only use them on hashes). See perlfunc for details. This is actually a change introduced in perl 5.12.0, but it was missed from that release's perldelta.

p5136-Incompatible Changes

p5136-Stringification of regexes has changed

Default regular expression modifiers are now notated by using (?^...). Code relying on the old stringification will fail. The purpose of this is so that when new modifiers are added, such code will not have to change (after this one time), as the stringification will automatically incorporate the new modifiers.

Code that needs to work properly with both old- and new-style regexes can avoid the whole issue by using (for Perls since 5.9.5):

 use re qw(regexp_pattern);
 my ($pat, $mods) = regexp_pattern($re_ref);

where $re_ref is a reference to a compiled regular expression. Upon return, $mods will be a string containing all the non-default modifiers used when the regular expression was compiled, and $pattern the actual pattern.

If the actual stringification is important, or older Perls need to be supported, you can use something like the following:

    # Accept both old and new-style stringification
    my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';

And then use $modifiers instead of -xism.

p5136-Regular expressions retain their localeness when interpolated

Regular expressions compiled under "use locale" now retain this when interpolated into a new regular expression compiled outside a "use locale", and vice-versa.

Previously, a regular expression interpolated into another one inherited the localeness of the surrounding one, losing whatever state it originally had. This is considered a bug fix, but may trip up code that has come to rely on the incorrect behavior.

p5136-Directory handles not copied to threads

On systems that do not have a fchdir function, newly-created threads no longer inherit directory handles from their parent threads. Such programs would probably have crashed anyway [perl #75154].

p5136-Negation treats strings differently from before

The unary negation operator - now treats strings that look like numbers as numbers [perl #57706].

p5136-Negative zero

Negative zero (-0.0), when converted to a string, now becomes "0" on all platforms. It used to become "-0" on some, but "0" on others.

If you still need to determine whether a zero is negative, use sprintf("%g", $zero) =~ /^-/ or the Data::Float module on CPAN.

p5136-Performance Enhancements

p5136-Modules and Pragmata

p5136-Updated Modules and Pragmata

p5136-Documentation

p5136-Changes to Existing Documentation

p5136-perlapi

p5136-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p5136-Changes to Existing Diagnostics

p5136-Testing

p5136-Platform Support

p5136-Platform-Specific Notes

p5136-IRIX

Conversion of strings to floating-point numbers is now more accurate on IRIX systems [perl #32380].

p5136-Mac OS X

Early versions of Mac OS X (Darwin) had buggy implementations of the setregid, setreuid, setrgid and setruid functions, so perl would pretend they did not exist.

These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and higher, as they have been fixed [perl #72990].

p5136-OpenVOS

perl now builds again with OpenVOS (formerly known as Stratus VOS) [perl #78132].

p5136-VMS

The shortening of symbols longer than 31 characters in the C sources is now done by the compiler rather than by xsubpp (which could only do so for generated symbols in XS code).

p5136-Windows

$Config{gccversion} is now set correctly when perl is built using the mingw64 compiler from http://mingw64.org [perl #73754].

The build process proceeds more smoothly with mingw and dmake when C:\MSYS\bin is in the PATH, due to a Cwd fix.

p5136-Internal Changes

p5136-Selected Bug Fixes

p5136-Errata

p5136-Acknowledgements

Perl 5.13.6 represents approximately one month of development since Perl 5.13.5 and contains 67920 lines of changes across 566 files from 47 authors and committers:

A. Sinan Unur, Aaron Crane, Alex Davies, Ali Polatel, Allen Smith, Andrew Rodland, Andy Dougherty, Ben Morrow, brian d foy, Casey West, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Eric Brine, Father Chrysostomos, Florian Ragwitz, George Greer, gregor herrmann, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Joshua Pritikin, Karl Williamson, kmx, Michael G Schwern, Mike Kelly, Nicholas Clark, Paul Green, Rafael Garcia-Suarez, Renee Baecker, Ricardo Signes, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay, Sullivan Beck, Tatsuhiko Miyagawa, Todd Rinaldo, Tony Cook, Tye McQueen, Vernon Lyon, Walt Mankowski, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5136-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5136-SEE ALSO

The Changes file for an explanation of how to view 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.

p5135-NAME

perl5135delta - what is new for perl v5.13.5

p5135-DESCRIPTION

This document describes differences between the 5.13.4 release and the 5.13.5 release.

If you are upgrading from an earlier release such as 5.13.3, first read "p5134-NAME", which describes differences between 5.13.3 and 5.13.4.

p5135-Core Enhancements

p5135-Adjacent pairs of nextstate opcodes are now optimized away

Previously, in code such as

    use constant DEBUG => 0;

    sub GAK {
        warn if DEBUG;
        print "stuff\n";
    }

the ops for warn if DEBUG; would be folded to a null op (ex-const), but the nextstate op would remain, resulting in a runtime op dispatch of nextstate, nextstate, ...

The execution of a sequence of nextstate ops is indistinguishable from just the last nextstate op so the peephole optimizer now eliminates the first of a pair of nextstate ops, except where the first carries a label, since labels must not be eliminated by the optimizer and label usage isn't conclusively known at compile time.

p5135-API function to parse statements

The parse_fullstmt function has been added to allow parsing of a single complete Perl statement. See perlapi for details.

p5135-API functions for accessing the runtime hinthash

A new C API for introspecting the hinthash %^H at runtime has been added. See cop_hints_2hv, cop_hints_fetchpvn, cop_hints_fetchpvs, cop_hints_fetchsv, and hv_copy_hints_hv in perlapi for details.

p5135-C interface to caller()

The caller_cx function has been added as an XSUB-writer's equivalent of caller(). See perlapi for details.

p5135-Incompatible Changes

p5135-Magic variables outside the main package

In previous versions of Perl, magic variables like $!, %SIG, etc. would 'leak' into other packages. So %foo::SIG could be used to access signals, ${"foo::!"} (with strict mode off) to access C's errno, etc.

This was a bug, or an 'unintentional' feature, which caused various ill effects, such as signal handlers being wiped when modules were loaded, etc.

This has been fixed (or the feature has been removed, depending on how you see it).

p5135-Smart-matching against array slices

Previously, the following code resulted in a successful match:

    my @a = qw(a y0 z);
    my @b = qw(a x0 z);
    @a[0 .. $#b] ~~ @b;

This odd behaviour has now been fixed [perl #77468].

p5135-C API changes

The first argument of the C API function Perl_fetch_cop_label has changed from struct refcounted he * to COP *, to better insulate the user from implementation details.

This API function was marked as "may change", and likely isn't in use outside the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other references to it.)

p5135-Deprecations

p5135-Use of qw(...) as parentheses

Historically the parser fooled itself into thinking that qw(...) literals were always enclosed in parentheses, and as a result you could sometimes omit parentheses around them:

    for $x qw(a b c) { ... }

The parser no longer lies to itself in this way. Wrap the list literal in parentheses, like:

    for $x (qw(a b c)) { ... }

p5135-Performance Enhancements

p5135-Modules and Pragmata

p5135-Updated Modules and Pragmata

p5135-bignum

Upgraded from version 0.23 to 0.25.

p5135-blib

Upgraded from version 1.05 to 1.06.

p5135-open

Upgraded from version 1.07 to 1.08.

p5135-threads-shared

Upgraded from version 1.33_02 to 1.33_03.

p5135-warnings and warnings::register

Upgraded from version 1.10 to 1.11 and from version 1.01 to 1.02 respectively.

It is now possible to register warning categories other than the names of packages using warnings::register. See perllexwarn for more information.

p5135-B::Debug

Upgraded from version 1.12 to 1.16.

p5135-CPANPLUS::Dist::Build

Upgraded from version 0.46 to 0.48.

p5135-Data::Dumper

Upgraded from version 2.126 to 2.128.

This fixes a crash when using custom sort functions that might cause the stack to change.

p5135-Encode

Upgraded from version 2.39 to 2.40.

p5135-Errno

Upgraded from version 1.12 to 1.13.

On some platforms with unusual header files, like Win32/gcc using mingw64 headers, some constants which weren't actually error numbers have been exposed by Errno. This has been fixed [perl #77416].

p5135-ExtUtils::MakeMaker

Upgraded from version 6.5601 to 6.57_05.

p5135-Filter::Simple

Upgraded from version 0.84 to 0.85.

p5135-Hash::Util

Upgraded from version 0.08 to 0.09.

p5135-Math::BigInt

Upgraded from version 1.89_01 to 1.95.

This fixes, among other things, incorrect results when computing binomial coefficients [perl #77640].

p5135-Math::BigInt::FastCalc

Upgraded from version 0.19 to 0.22.

p5135-Math::BigRat

Upgraded from version 0.24 to 0.26.

p5135-Module::CoreList

Upgraded from version 2.37 to 2.38.

p5135-PerlIO::scalar

Upgraded from version 0.08 to 0.09.

p5135-POSIX

Upgraded from version 1.19 to 1.20.

It now includes constants for POSIX signal constants.

p5135-Safe

Upgraded from version 2.27 to 2.28.

This fixes a possible infinite loop when looking for coderefs.

p5135-Test::Simple

Upgraded from version 0.96 to 0.97_01.

p5135-Tie::Hash

Upgraded from version 1.03 to 1.04.

Calling Tie::Hash->TIEHASH() used to loop forever. Now it croaks.

p5135-Unicode::Collate

Upgraded from version 0.56 to 0.59.

p5135-XSLoader

Upgraded from version 0.10 to 0.11.

p5135-Documentation

p5135-Changes to Existing Documentation

p5135-perlapi

p5135-perlbook

p5135-perlfaq

p5135-Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

p5135-New Diagnostics

p5135-Changes to Existing Diagnostics

p5135-Utility Changes

p5135-h2ph

p5135-Testing

p5135-Platform Support

p5135-Platform-Specific Notes

p5135-VMS

p5135-Internal Changes

p5135-Selected Bug Fixes

p5135-Known Problems

p5135-Acknowledgements

Perl 5.13.5 represents approximately one month of development since Perl 5.13.4 and contains 74558 lines of changes across 549 files from 45 authors and committers:

Abigail, Alexander Alekseev, Aristotle Pagaltzis, Ben Morrow, Bram, brian d foy, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, Dagfinn Ilmari Mannsåker, David Golden, David Leadbeater, David Mitchell, Eric Brine, Father Chrysostomos, Florian Ragwitz, Gisle Aas, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Jirka Hruška, Karl Williamson, Michael G. Schwern, Nicholas Clark, Paul Johnson, Philippe Bruhat (BooK), Piotr Fusik, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Rob Hoelz, Robin Barker, Steffen Mueller, Steve Hay, Steve Peters, Todd Rinaldo, Tony Cook, Vincent Pit, Yves Orton, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5135-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5135-SEE ALSO

The Changes file for an explanation of how to view 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.

p5134-NAME

perl5134delta - what is new for perl v5.13.4

p5134-DESCRIPTION

This document describes differences between the 5.13.4 release and the 5.13.3 release.

If you are upgrading from an earlier release such as 5.13.2, first read "p5133-NAME", which describes differences between 5.13.2 and 5.13.3.

p5134-Core Enhancements

p5134-srand() now returns the seed

This allows programs that need to have repeatable results to not have to come up with their own seed generating mechanism. Instead, they can use srand() and somehow stash the return for future use. Typical is a test program which has too many combinations to test comprehensively in the time available to it each run. It can test a random subset each time, and should there be a failure, log the seed used for that run so that it can later be used to reproduce the exact results.

p5134-\N{name} and charnames enhancements

\N{}, charnames::vianame, charnames::viacode now know about every character in Unicode. Previously, they didn't know about the Hangul syllables nor a number of CJK (Chinese/Japanese/Korean) characters.

p5134-Incompatible Changes

p5134-Declare API incompatibility between blead releases

Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often break this compatibility. However, prior to perl 5.13.4, all blead releases had the same PERL_API_REVISION, PERL_API_VERSION, and PERL_API_SUBVERSION, effectively declaring them as binary compatible, which they weren't. From now on, blead releases will have a PERL_API_SUBVERSION equal to their PERL_SUBVERSION, explicitly marking them as incompatible with each other.

Maintenance releases of stable perl versions will continue to make no intentionally incompatible API changes.

p5134-Check API compatibility when loading XS modules

When perl's API changes in incompatible ways (which usually happens between every major release), XS modules compiled for previous versions of perl will not work anymore. They will need to be recompiled against the new perl.

In order to ensure that modules are recompiled, and to prevent users from accidentally loading modules compiled for old perls into newer ones, the XS_APIVERSION_BOOTCHECK macro has been added. That macro, which is called when loading every newly compiled extension, compares the API version of the running perl with the version a module has been compiled for and raises an exception if they don't match.

p5134-Binary Incompatible with all previous Perls

Some bit fields have been reordered; therefore, this release will not be binary compatible with any previous Perl release.

p5134-Change in the parsing of certain prototypes

Functions declared with the following prototypes now behave correctly as unary functions:

Due to this bug fix, functions using the (*), (;$) and (;*) prototypes are parsed with higher precedence than before. So in the following example:

  sub foo($);
  foo $a < $b;

the second line is now parsed correctly as foo($a) < $b, rather than foo($a < $b). This happens when one of these operators is used in an unparenthesised argument:

  < > <= >= lt gt le ge
  == != <=> eq ne cmp ~~
  &
  | ^
  &&
  || //
  .. ...
  ?:
  = += -= *= etc.

p5134-Deprecations

p5134-List assignment to $[

After assignment to $[ has been deprecated and started to give warnings in perl version 5.12.0, this version of perl also starts to emit a warning when assigning to $[ in list context. This fixes an oversight in 5.12.0.

p5134-Performance Enhancements

p5134-Modules and Pragmata

p5134-New Modules and Pragmata

This release does not introduce any new modules or pragmata.

p5134-Updated Modules and Pragmata

p5134-Archive::Tar

Upgraded from version 1.64 to 1.68.

Among other things, the new version adds a new option to ptar to allow safe creation of tarballs without world-writable files on Windows, allowing those archives to be uploaded to CPAN.

p5134-B::Lint

Upgraded from version 1.11 to 1.12.

p5134-Carp

Upgraded from version 1.16 to 1.18.

Carp now detects incomplete caller() overrides and avoids using bogus @DB::args. To provide backtraces, Carp relies on particular behaviour of the caller built-in. Carp now detects if other code has overridden this with an incomplete implementation, and modifies its backtrace accordingly. Previously incomplete overrides would cause incorrect values in backtraces (best case), or obscure fatal errors (worst case)

This fixes certain cases of Bizarre copy of ARRAY caused by modules overriding caller() incorrectly.

p5134-Compress::Raw::Bzip2

Upgraded from version 2.027 to 2.030.

p5134-Compress::Raw::Zlib

Upgraded from version 2.027 to 2.030.

p5134-File::Spec

Upgraded from version 3.31 to 3.31_01.

Various issues in File::Spec::VMS have been fixed.

p5134-I18N::Langinfo

Upgraded from version 0.03 to 0.04.

langinfo() now defaults to using $_ if there is no argument given, just like the documentation always claimed it did.

p5134-IO::Compress

Upgraded from version 2.027 to 2.030.

p5134-Module::CoreList

Upgraded from version 2.36 to 2.37.

Besides listing the updated core modules of this release, it also stops listing the Filespec module. That module never existed in core. The scripts generating Module::CoreList confused it with VMS::Filespec, which actually is a core module, since the time of perl 5.8.7.

p5134-Test::Harness

Upgraded from version 3.21 to 3.22.

p5134-Test::Simple

Upgraded from version 0.94 to 0.96.

Among many other things, subtests without a plan or no_plan now have an implicit done_testing() added to them.

p5134-Unicode::Collate

Upgraded from version 0.53 to 0.56.

Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and supports a couple of new locales.

p5134-feature

Upgraded from version 1.17 to 1.18.

p5134-Removed Modules and Pragmata

This release does not remove any modules or pragmata.

p5134-Documentation

p5134-Changes to Existing Documentation

p5134-perldiag

p5134-perlport

p5134-perlre

p5134-Configuration and Compilation

p5134-Testing

p5134-Platform Support

p5134-Platform-Specific Notes

p5134-Win32

p5134-Internal Changes

p5134-Removed PERL_POLLUTE

The option to define PERL_POLLUTE to expose older 5.005 symbols for backwards compatibility has been removed. It's use was always discouraged, and MakeMaker contains a more specific escape hatch:

    perl Makefile.PL POLLUTE=1

This can be used for modules that have not been upgraded to 5.6 naming conventions (and really should be completely obsolete by now).

p5134-Added PERL_STATIC_INLINE

The PERL_STATIC_INLINE define has been added to provide the best-guess incantation to use for static inline functions, if the C compiler supports C99-style static inline. If it doesn't, it'll give a plain static.

HAS_STATIC_INLINE can be used to check if the compiler actually supports inline functions.

p5134-Selected Bug Fixes

p5134-Known Problems

p5134-Acknowledgements

Perl 5.13.4 represents approximately one month of development since Perl 5.13.3, and contains 91,200 lines of changes across 436 files from 34 authors and committers.

Thank you to the following for contributing to this release:

Abigail, Andy Armstrong, Andy Dougherty, Chas. Owens, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, David Cantrell, David Golden, David Mitchell, Eric Brine, Father Chrysostomos, Florian Ragwitz, George Greer, Gerard Goossen, H.Merijn Brand, James Mastros, Jan Dubois, Jerry D. Hedden, Joshua ben Jore, Karl Williamson, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Leon Brocard, Lubomir Rintel, Nicholas Clark, Paul Marquess, Rafael Garcia-Suarez, Reini Urban, Robin Barker, Slaven Rezic, Steve Peters, Tony Cook, Wolfram Humann, Zefram

p5134-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5134-SEE ALSO

The Changes file for an explanation of how to view 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.

p5133-NAME

perl5133delta - what is new for perl v5.13.3

p5133-DESCRIPTION

This document describes differences between the 5.13.3 release and the 5.13.2 release.

If you are upgrading from an earlier release such as 5.13.1, first read "p5132-NAME", which describes differences between 5.13.1 and 5.13.2.

p5133-Core Enhancements

p5133-\o{...} for octals

There is a new escape sequence, "\o", in double-quote-like contexts. It must be followed by braces enclosing an octal number of at least one digit. It interpolates as the character with an ordinal value equal to the octal number. This construct allows large octal ordinals beyond the current max of 0777 to be represented. It also allows you to specify a character in octal which can safely be concatenated with other regex snippets and which won't be confused with being a backreference to a regex capture group. See "Capture groups" in perlre.

p5133-\N{name} and charnames enhancements

\N{} and charnames::vianame now know about the abbreviated character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as well as all the customary abbreviations for the C0 and C1 control characters (such as ACK, BEL, CAN, etc.), as well as a few new variants in common usage of some C1 full names.

In the past, it was ineffective to override one of Perl's abbreviations with your own custom alias. Now it works.

You can also create a custom alias directly to the ordinal of a character, known by \N{...}, charnames::vianame(), and charnames::viacode(). Previously, an alias had to be to an official Unicode character name. This made it impossible to create an alias for a code point that had no name, such as the ones reserved for private use. So this change allows you to make more effective use of private use characters. Only if there is no official name will charnames::viacode() return your custom one.

See charnames for details on all these changes.

p5133-Uppercase X/B allowed in hexadecimal/binary literals

Literals may now use either upper case 0X... or 0B... prefixes, in addition to the already supported 0x... and 0b... syntax. (RT#76296) (a674e8d, 333f87f)

C, Ruby, Python and PHP already supported this syntax, and it makes Perl more internally consistent. A round-trip with eval sprintf "%#X", 0x10 now returns 16 in addition to eval sprintf "%#x", 0x10, which worked before.

p5133-Incompatible Changes

p5133-\400 - \777

Use of \400 - \777 in regexes in certain circumstances has given different, anomalous behavior than their use in all other double-quote-like contexts. Since 5.10.1, a deprecated warning message has been raised when this happens. Now, all double-quote-like contexts have the same behavior, namely to be equivalent to \x{100} - \x{1FF}, with no deprecation warning. Use of these values in the command line option "-0" retains the current meaning to slurp input files whole; previously, this was documented only for "-0777". It is recommended, however, because of various ambiguities, to use the new \o{...} construct to represent characters in octal. (fa1639c..f6993e9).

p5133-Deprecations

p5133-Omitting a space between a regular expression and subsequent word

Omitting a space between a regex pattern or pattern modifiers and the following word is deprecated. Deprecation for regular expression matches was added in Perl 5.13.2. In this release, the deprecation is extended to regular expression substitutions. For example, s/foo/bar/sand $bar will still be parsed as s/foo/bar/s and $bar but will issue a warning. (aa78b66)

p5133-Deprecation warning added for deprecated-in-core .pl libs

This is a mandatory warning, not obeying -X or lexical warning bits. The warning is modelled on that supplied by deprecate.pm for deprecated-in-core .pm libraries. It points to the specific CPAN distribution that contains the .pl libraries. The CPAN version, of course, does not generate the warning. (0111154)

p5133-Performance Enhancements

There are several small optimizations to reduce CPU cache misses in various very commonly used modules like warnings and Carp as well in accessing file-handles for reading.

p5133-Modules and Pragmata

p5133-Updated Modules and Pragmata

p5133-autodie

Upgraded from version 2.06_01 to 2.10.

p5133-charnames

Upgraded from version 1.08 to 1.10.

viacode() is now significantly faster. (f3227b7)

p5133-lib

Upgraded from version 0.62 to 0.63.

p5133-threads

Upgraded from version 1.77_02 to 1.77_03.

p5133-threads::shared

Upgraded from version 1.33_01 to 1.33_02.

p5133-warnings

Upgraded from version 1.09 to 1.10.

Calling use warnings without arguments is now significantly more efficient. (8452af9)

p5133-Archive::Extract

Upgraded from version 0.38 to 0.42.

Updates since 0.38 include: a safe print method that guards Archive::Extract from changes to $\; a fix to the tests when run in core perl; support for TZ files; and a modification for the lzma logic to favour IO::Uncompress::Unlzma (d7f8799)

p5133-Archive::Tar

Upgraded from version 1.54 to 1.64.

Important changes since 1.54 include: compatibility with busybox implementations of tar; a fix so that write() and create_archive() close only handles they opened; and a bug was fixed regarding the exit code of extract_archive. (afabe0e)

p5133-Attribute::Handlers

Upgraded from version 0.87 to 0.88.

p5133-Compress::Raw::Bzip2

Upgraded from version 2.024 to 2.027.

p5133-Compress::Raw::Zlib

Upgraded from version 2.024 to 2.027_01.

p5133-Compress::Zlib

Upgraded from version 2.024 to 2.027.

p5133-CPANPLUS

Upgraded from version 0.90 to 0.9007.

Fixed the shell test to skip if test is not being run under a terminal; resolved the issue where a prereq on Config would not be recognised as a core module. (d4e225a)

p5133-Digest::MD5

Upgraded from version 2.39 to 2.40.

p5133-Digest::SHA

Upgraded from version 5.47 to 5.48.

p5133-Exporter

Upgraded from version 5.64_02 to 5.64_03.

Exporter no longer overrides $SIG{__WARN__} (RT #74472) (9b86bb5)

p5133-ExtUtils::CBuilder

Upgraded from version 0.27 to 0.2703.

p5133-ExtUtils::Manifest

Upgraded from version 1.57 to 1.58.

p5133-ExtUtils::ParseXS

Upgraded from version 2.2205 to 2.2206.

p5133-File::Copy

Upgraded from version 2.19 to 2.20.

Skips suid tests on a nosuid partition. These tests were being skipped on OpenBSD, but nosuid partitions can exist on other systems too. Now it just checks if it can create a suid directory, if not the tests are skipped. Perl builds without errors in a nosuid /tmp with this patch. (cae9400)

p5133-I18N::LangTags

Upgraded from version 0.35 to 0.35_01.

p5133-IPC::Cmd

Upgraded from version 0.58 to 0.60.

p5133-IPC::SysV

Upgraded from version 2.01 to 2.03.

p5133-Locale::Maketext

Upgraded from version 1.14 to 1.15.

Locale::Maketext guts have been merged back into the main module (87d86da) and adds external cache support (ace47d6)

p5133-Module::Build

Upgraded from version 0.3603 to 0.3607.

p5133-Module::CoreList

Upgraded from version 2.34 to 2.36.

p5133-Module::Load

Upgraded from version 0.16 to 0.18.

p5133-Term::ANSIColor

Upgraded from version 2.02 to 3.00.

p5133-Test::Harness

Upgraded from version 3.17 to 3.21.

The core update from Test-Harness 3.17 to 3.21 fixed some things, but also introduced a known problem with argument passing to non-Perl tests.

p5133-Time::HiRes

Upgraded from version 1.9719 to 1.9721.

p5133-Time::Piece

Upgraded from version 1.15_01 to 1.20_01.

p5133-Unicode::Collate

Upgraded from version 0.52_01 to 0.53.

Includes Unicode Collation Algorithm 18 (74b94a7)

p5133-Unicode::Normalize

Upgraded from version 1.03 to 1.06.

p5133-Documentation

p5133-New Documentation

p5133-"p5121-NAME"

The Perl 5.12.1 perldelta file was added from the Perl maintenance branch

p5133-Changes to Existing Documentation

p5133-General changes

p5133-perlfunc

p5133-perlop

p5133-perlrun

p5133-perlpolicy

p5133-perlre

p5133-perltie

p5133-Utility Changes

p5133-perldb

p5133-Configuration and Compilation

p5133-Testing

p5133-Platform Support

p5133-Discontinued Platforms

p5133-MacOS Classic

Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in December 2004. Vestigial MacOS Classic specific code has now been removed from other core modules as well (8f8c2a4..c457df0)

p5133-Platform-Specific Notes

p5133-Win32

t/io/openpid.t now uses the alarm() watchdog strategy for more robustness (5732108)

p5133-Internal Changes

p5133-Selected Bug Fixes

p5133-Known Problems

p5133-Errata

p5133-Acknowledgements

Perl 5.13.3 represents approximately one month of development since Perl 5.13.2, and contains 12,184 lines of changes across 575 files from 104 authors and committers.

Thank you to the following for contributing to this release:

Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern, Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston, Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino, Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic, kmx, Ævar Arnfjörð Bjarmason

p5133-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5133-SEE ALSO

The Changes file for an explanation of how to view 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.

p5132-NAME

perl5132delta - what is new for perl v5.13.2

p5132-DESCRIPTION

This document describes differences between the 5.13.2 release and the 5.13.1 release.

If you are upgrading from an earlier release such as 5.10, first read "p5120-NAME", which describes differences between 5.10 and 5.12.

p5132-Incompatible Changes

p5132-localised tied scalars are tied again.

The change in behaviour in 5.13.1 of localising tied scalar values has been reverted to the existing 5.12.0 and earlier behaviour (the change for arrays and hashes remains).

p5132-Naming fixes in Policy_sh.SH may invalidate Policy.sh

Several long-standing typos and naming confusions in Policy_sh.SH have been fixed, standardizing on the variable names used in config.sh.

This will change the behavior of Policy.sh if you happen to have been accidentally relying on the Policy.sh incorrect behavior. We'd appreciate feedback from anyone using Policy.sh to be sure nothing is broken by this change (c1bd23).

p5132-Stashes are now always defined

defined %Foo:: now always returns true, even when no symbols have yet been defined in that package.

This is a side effect of removing a special case kludge in the tokeniser, added for 5.10.0, to hide side effects of changes to the internal storage of hashes that to drastically reduce their memory usage overhead.

Calling defined on a stash has been deprecated since 5.6.0, warned on lexicals since 5.6.0, and has warned for stashes (and other package variables) since 5.12.0. defined %hash has always exposed an implementation detail - emptying a hash by deleting all entries from it does not make defined %hash false, hence defined %hash is not valid code to determine whether an arbitrary hash is empty. Instead, use the behaviour that an empty %hash always returns false in a scalar context.

p5132-Core Enhancements

p5132-Non-destructive substitution

The substitution operator now supports a /r option that copies the input variable, carries out the substitution on the copy and returns the result. The original remains unmodified.

  my $old = 'cat';
  my $new = $old =~ s/cat/dog/r;
  # $old is 'cat' and $new is 'dog'

This is particularly useful with map. See perlop for more examples (4f4d75, 000c65).

p5132-package block syntax

A package declaration can now contain a code block, in which case the declaration is in scope only inside that block. So package Foo { ... } is precisely equivalent to { package Foo; ... }. It also works with a version number in the declaration, as in package Foo 1.2 { ... }. See perlfunc (434da3..36f77d, 702646).

p5132-CLONE_PARAMS structure added to ease correct thread creation

Modules that create threads should now create CLONE_PARAMS structures by calling the new function Perl_clone_params_new(), and free them with Perl_clone_params_del(). This will ensure compatibility with any future changes to the internals of the CLONE_PARAMS structure layout, and that it is correctly allocated and initialised.

p5132-perl -h no longer recommends -w

perl -h used to mark the -w option as recommended; since this option is far less useful than it used to be due to lexical 'use warnings' and since perl -h is primary a list and brief explanation of the command line switches, the recommendation has now been removed (60eaec).

p5132-Modules and Pragmata

p5132-Updated Modules

p5132-Locale-Codes 3.13

Locale::Country, Locale::Language and Locale::Currency were updated from 3.12 to 3.13 of the Locale-Codes distribution to include locale code changes (e1137b).

p5132-Thread-Semaphore 2.11

Added new methods ->down_nb() and ->down_force() at the suggestion of Rick Garlick.

Refactored methods to skip argument validation when no argument is supplied.

(04febe, f06daa)

p5132-CPAN.pm 1.94_57

(742adb)

p5132-Hash::Util warning fix

Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious warnings from undefined hash values (RT #74280).

p5132-B::Deparse now handles 'no VERSION'

The 'no 5.13.2' or similar form is now correctly handled by B::Deparse.

p5132-IO::Socket doc additions

getsockopt and setsockopt are now documented.

p5132-B::Concise updated for OPpDEREF

B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag as "DREFed".

p5132-File::Copy doc clarification

An extra stanza was added explaining behaviours when the copy destination already exists and is a directory.

p5132-Multiple POD spelling fixes.

Fixes were made to VMS::DCLsym, mro, Search::Dist, B::t::OptreeCheck and UNIVERSAL.

p5132-Changes to Existing Documentation

p5132-Replace wrong tr/// table in perlebcdic.pod

perlebcdic.pod contains a helpful table to use in tr/// to convert between EBCDIC and Latin1/ASCII. Unfortunately, the table was the inverse of the one it describes, though the code that used the table worked correctly for the specific example given.

The table has been changed to its inverse, and the sample code changed to correspond, as this is easier for the person trying to follow the instructions since deriving the old table is somewhat more complicated.

The table has also been changed to hex from octal, as that is more the norm these days, and the recipes in the pod altered to print out leading zeros to make all the values the same length, as the table that they can generate has them (5f26d5).

p5132-Document tricks for user-defined casing

perlunicode.pod now contains an explanation of how to override, mangle and otherwise tweak the way perl handles upper, lower and other case conversions on unicode data, and how to provide scoped changes to alter one's own code's behaviour without stomping on anybody else (71648f).

p5132-Document $# and $* as removed and clarify $#array usage

$# and $* were both disabled as of perl5 version 10; this release adds documentation to that effect, a description of the results of continuing to try and use them, and a note explaining that $# can also function as a sigil in the $#array form (7f315d2).

p5132-INSTALL explicitly states the requirement for C89

This was already true but it's now Officially Stated For The Record (51eec7).

p5132-No longer advertise Math::TrulyRandom

This module hasn't been updated since 1996 so we can't recommend it any more (83918a).

p5132-perlfaq synchronised to upstream

The FAQ has been updated to commit 37550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository at git@github.com:briandfoy/perlfaq.git

p5132-Performance Enhancements

Only allocate entries for @_ on demand - this not only saves memory per subroutine defined but should hopefully improve COW behaviour (77bac2).

p5132-Multiple small improvements to threads

The internal structures of threading now make fewer API calls and fewer allocations, resulting in noticeably smaller object code. Additionally, many thread context checks have been deferred so that they're only done when required (although this is only possible for non-debugging builds).

p5132-Size optimisations to SV and HV structures

xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and on some systems will cause struct xpvhv to become cache aligned. To avoid this memory saving causing a slowdown elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when actually required is now calculated on demand, the cases when this needs to be done should be few and far between (f4431c .. fcd245).

The order of structure elements in SV bodies has changed. Effectively, the NV slot has swapped location with STASH and MAGIC. As all access to SV members is via macros, this should be completely transparent. This change allows the space saving for PVHVs documented above, and may reduce the memory allocation needed for PVIVs on some architectures.

p5132-Optimisation of regexp engine string comparison work

The foldEQ_utf8 API function for case-insensitive comparison of strings (which is used heavily by the regexp engine) was substantially refactored and optimised - and its documentation much improved as a free bonus gift (8b3587, e6226b).

p5132-Memory consumption improvements to Exporter

The @EXPORT_FAIL AV is no longer created unless required, hence neither is the typeglob backing it - this saves about 200 bytes per Exporter using package that doesn't use this functionality.

p5132-Installation and Configuration Improvements

p5132-Compilation improvements

Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME).

This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now set correctly (23ae7f).

p5132-Selected Bug Fixes

p5132-Changed Internals

p5132-Deprecations

The following items are now deprecated.

p5132-Platform Specific Notes

p5132-Recent OpenBSDs now use perl's malloc

OpenBSD > 3.7 has a new malloc implementation which is mmap based and as such can release memory back to the OS; however for perl using this malloc causes a substantial slowdown so we now default to using perl's malloc instead (RT #75742) (9b58b5).

p5132-Acknowledgements

Perl 5.13.2 represents thirty days of development since Perl 5.13.1 (and two days of waiting around while the release manager remembered where he left his brain) and contains 3685 lines of changes across 194 files from 30 authors and committers.

Thank you to the following for contributing to this release:

Abigail, Andreas J. Koenig, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, David Caldwell, David Golden, David Mitchell, Father Chrysostomos, George Greer, H.Merijn Brand, Jerry D. Hedden, Karl Williamson, Maik Hentsche, Matt S Trout, Nicholas Clark, Rafael Garcia-Suarez, Ricardo Signes, Salvador Fandino, Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Sullivan Beck, Tony Cook, Vincent Pit, Zefram, brian d foy, Ævar Arnfjörð Bjarmason

Your humble release manager would like to specifically call out Karl Williamson for making the tests a better place to be, and Shlomi Fish for a passel of tiny incremental docfixes of the sort that don't get made often enough.

p5132-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5132-SEE ALSO

The Changes file for an explanation of how to view 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.

p5131-NAME

perl5131delta - what is new for perl v5.13.1

p5131-DESCRIPTION

This document describes differences between the 5.13.0 release and the 5.13.1 release.

If you are upgrading from an earlier release such as 5.10, first read "p5120-NAME", which describes differences between 5.10 and 5.12.

p5131-Incompatible Changes

p5131-"\cX"

The backslash-c construct was designed as a way of specifying non-printable characters, but there were no restrictions (on ASCII platforms) on what the character following the c could be. Now, that character must be one of the ASCII characters.

p5131-localised tied hashes, arrays and scalars are no longed tied

In the following:

    tie @a, ...;
    {
        local @a;
        # here, @a is a now a new, untied array
    }
    # here, @a refers again to the old, tied array

The new local array used to be made tied too, which was fairly pointless, and has now been fixed. This fix could however potentially cause a change in behaviour of some code.

p5131-given return values

Starting from this release, given blocks returns the last evaluated expression, or an empty list if the block was exited by break. Thus you can now write:

    my $type = do {
     given ($num) {
      break     when undef;
      'integer' when /^[+-]?[0-9]+$/;
      'float'   when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
      'unknown';
     }
    };

See "Return value" in perlsyn for details.

p5131-Core Enhancements

p5131-Exception Handling Reliability

Several changes have been made to the way die, warn, and $@ behave, in order to make them more reliable and consistent.

When an exception is thrown inside an eval, the exception is no longer at risk of being clobbered by code running during unwinding (e.g., destructors). Previously, the exception was written into $@ early in the throwing process, and would be overwritten if eval was used internally in the destructor for an object that had to be freed while exiting from the outer eval. Now the exception is written into $@ last thing before exiting the outer eval, so the code running immediately thereafter can rely on the value in $@ correctly corresponding to that eval.

Likewise, a local $@ inside an eval will no longer clobber any exception thrown in its scope. Previously, the restoration of $@ upon unwinding would overwrite any exception being thrown. Now the exception gets to the eval anyway. So local $@ is safe inside an eval, albeit of rather limited use.

Exceptions thrown from object destructors no longer modify the $@ of the surrounding context. (If the surrounding context was exception unwinding, this used to be another way to clobber the exception being thrown. Due to the above change it no longer has that significance, but there are other situations where $@ is significant.) Previously such an exception was sometimes emitted as a warning, and then either string-appended to the surrounding $@ or completely replaced the surrounding $@, depending on whether that exception and the surrounding $@ were strings or objects. Now, an exception in this situation is always emitted as a warning, leaving the surrounding $@ untouched. In addition to object destructors, this also affects any function call performed by XS code using the G_KEEPERR flag.

$@ is also no longer used as an internal temporary variable when preparing to die. Previously it was internally necessary to put any exception object (any non-string exception) into $@ first, before it could be used as an exception. (The C API still offers the old option, so an XS module might still clobber $@ in the old way.) This change together with the foregoing means that, in various places, $@ may be observed to contain its previously-assigned value, rather than having been overwritten by recent exception-related activity.

Warnings for warn can now be objects, in the same way as exceptions for die. If an object-based warning gets the default handling, of writing to standard error, it will of course still be stringified along the way. But a $SIG{__WARN__} handler will now receive an object-based warning as an object, where previously it was passed the result of stringifying the object.

p5131-Modules and Pragmata

p5131-Updated Modules

p5131-Errno

The implementation of Errno has been refactored to use about 55% less memory. There should be no user-visible changes.

p5131-Perl 4 .pl libraries

These historical libraries have been minimally modified to avoid using $[. This is to prepare them for the deprecation of $[.

p5131-B::Deparse

A bug has been fixed when deparsing a nextstate op that has both a change of package (relative to the previous nextstate), or a change of %^H or other state, and a label. Previously the label was emitted first, leading to syntactically invalid output because a label is not permitted immediately before a package declaration, BEGIN block, or some other things. Now the label is emitted last.

p5131-Removed Modules and Pragmata

The following modules have been removed from the core distribution, and if needed should be installed from CPAN instead.

p5131-Class::ISA
p5131-Pod::Plainer
p5131-Switch

The removal of Shell has been deferred until after 5.14, as the implementation of Shell shipped with 5.12.0 did not correctly issue the warning that it was to be removed from core.

p5131-New Documentation

p5131-perlgpl

perlgpl has been updated to contain GPL version 1, as is included in the README distributed with perl.

p5131-Selected Bug Fixes

p5131-Changed Internals

p5131-Deprecations

The following items are now deprecated.

p5131-Perl_ptr_table_clear

Perl_ptr_table_clear is no longer part of Perl's public API. Calling it now generates a deprecation warning, and it will be removed in a future release.

p5131-Acknowledgements

Perl 5.13.1 represents thirty days of development since Perl 5.13.0 and contains 15390 lines of changes across 289 files from 34 authors and committers.

Thank you to the following for contributing to this release:

Ævar Arnfjörð Bjarmason, Arkturuz, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, David Golden, David Mitchell, Father Chrysostomos, Gene Sullivan, gfx, Gisle Aas, H.Merijn Brand, James E Keenan, James Mastros, Jan Dubois, Jesse Vincent, Karl Williamson, Leon Brocard, Lubomir Rintel (GoodData), Nicholas Clark, Philippe Bruhat (BooK), Rafael Garcia-Suarez, Rainer Tammer, Ricardo Signes, Richard Soderberg, Robin Barker, Ruslan Zakirov, Steffen Mueller, Todd Rinaldo, Tony Cook, Vincent Pit, Zefram

p5131-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5131-SEE ALSO

The Changes file for an explanation of how to view 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.

p5130-NAME

perl5130delta - what is new for perl v5.13.0

p5130-DESCRIPTION

This document describes differences between the 5.12.0 release and the 5.13.0 release.

If you are upgrading from an earlier release such as 5.10.0, first read "p5120-NAME", which describes differences between 5.10.0 and 5.12.0.

p5130-Core Enhancements

p5130-"safe signals" optimization

Signal dispatch has been moved from the runloop into control ops. This should give a few percent speed increase, and eliminates almost all of the speed penalty caused by the introduction of "safe signals" in 5.8.0. Signals should still be dispatched within the same statement as they were previously - if this is not the case, or it is possible to create uninterruptible loops, this is a bug, and reports are encouraged of how to recreate such issues.

p5130-Assignment to $0 sets the legacy process name with prctl() on Linux

On Linux the legacy process name will be set with prctl(2), in addition to altering the POSIX name via argv[0] as perl has done since version 4.000. Now system utilities that read the legacy process name such as ps, top and killall will recognize the name you set when assigning to $0. The string you supply will be cut off at 16 bytes, this is a limitation imposed by Linux.

p5130-Optimization of shift; and pop; calls without arguments

Additional two OPs are not added anymore into op tree for shift and pop calls without argument (when it works on @_). Makes shift; 5% faster over shift @_; on not threaded perl and 25% faster on threaded.

p5130-Modules and Pragmata

p5130-Updated Modules

p5130-CGI

Updated to version 3.49.

p5130-Data::Dumper

Updated to version 2.126.

p5130-MIME::Base64

Updated to 3.09.

p5130-threads

Updated to version 1.77

p5130-threads-shared

Updated to version 1.33

p5130-Installation and Configuration Improvements

p5130-Platform Specific Changes

p5130-AIX

Allow building on AIX 4.2.

p5130-Acknowledgements

Perl 5.13.0 represents eight days of development since Perl 5.12.0 and contains 3,766 lines of changes across 151 files from 29 authors and committers.

Thank you to the following for contributing to this release:

Ævar Arnfjörð Bjarmason, Alex Vandiver, Chris Williams, chromatic, Craig A. Berry, David Golden, David Mitchell, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gisle Aas, H.Merijn Brand, Hugo van der Sanden, Jesse Vincent, Josh ben Jore, Karl Williamson, Leon Brocard, Michael G Schwern, Michael G. Schwern, Nga Tang Chan, Nicholas Clark, Niko Tyni, Rafael Garcia-Suarez, Ricardo Signes, Robin Barker, Slaven Rezic, Steffen Mueller, Zefram.

p5130-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5130-SEE ALSO

The Changes file for an explanation of how to view 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.

p5123-NAME

perldelta - what is new for perl v5.12.3

p5123-DESCRIPTION

This document describes differences between the 5.12.2 release and the 5.12.3 release.

If you are upgrading from an earlier release such as 5.12.1, first read "p5122-NAME", which describes differences between 5.12.1 and 5.12.2. The major changes made in 5.12.0 are described in "p5120-NAME".

p5123-Incompatible Changes

    There are no changes intentionally incompatible with 5.12.2. If any
    exist, they are bugs and reports are welcome.

p5123-Core Enhancements

p5123-keys, values work on arrays

You can now use the keys, values, each builtin functions on arrays (previously you could only use them on hashes). See perlfunc for details. This is actually a change introduced in perl 5.12.0, but it was missed from that release's perldelta.

p5123-Bug Fixes

"no VERSION" will now correctly deparse with B::Deparse, as will certain constant expressions.

Module::Build should be more reliably pass its tests under cygwin.

Lvalue subroutines are again able to return copy-on-write scalars. This had been broken since version 5.10.0.

p5123-Platform Specific Notes

p5123-Solaris

A separate DTrace is now build for miniperl, which means that perl can be compiled with -Dusedtrace on Solaris again.

p5123-VMS

A number of regressions on VMS have been fixed. In addition to minor cleanup of questionable expressions in vms.c, file permissions should no longer be garbled by the PerlIO layer, and spurious record boundaries should no longer be introduced by the PerlIO layer during output.

For more details and discussion on the latter, see:

    http://www.nntp.perl.org/group/perl.vmsperl/2010/11/msg15419.html
p5123-VOS

A few very small changes were made to the build process on VOS to better support the platform. Longer-than-32-character filenames are now supported on OpenVOS, and build properly without IPv6 support.

p5123-Acknowledgements

Perl 5.12.3 represents approximately four months of development since Perl 5.12.2 and contains approximately 2500 lines of changes across 54 files from 16 authors.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.12.3:

Craig A. Berry, David Golden, David Leadbeater, Father Chrysostomos, Florian Ragwitz, Jesse Vincent, Karl Williamson, Nick Johnston, Nicolas Kaiser, Paul Green, Rafael Garcia-Suarez, Rainer Tammer, Ricardo Signes, Steffen Mueller, Zsbán Ambrus, Ævar Arnfjörð Bjarmason

p5123-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5123-SEE ALSO

The Changes file for an explanation of how to view 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.

p5122-NAME

perl5122delta - what is new for perl v5.12.2

p5122-DESCRIPTION

This document describes differences between the 5.12.1 release and the 5.12.2 release.

If you are upgrading from an earlier major version, such as 5.10.1, first read "p5120-NAME", which describes differences between 5.10.1 and 5.12.0, as well as "p5121-NAME", which describes earlier changes in the 5.12 stable release series.

p5122-Incompatible Changes

There are no changes intentionally incompatible with 5.12.1. If any exist, they are bugs and reports are welcome.

p5122-Core Enhancements

Other than the bug fixes listed below, there should be no user-visible changes to the core language in this release.

p5122-Modules and Pragmata

p5122-New Modules and Pragmata

This release does not introduce any new modules or pragmata.

p5122-Pragmata Changes

In the previous release, no VERSION; statements triggered a bug which could cause feature bundles to be loaded and strict mode to be enabled unintentionally.

p5122-Updated Modules

p5122-Carp

Upgraded from version 1.16 to 1.17.

Carp now detects incomplete caller() overrides and avoids using bogus @DB::args. To provide backtraces, Carp relies on particular behaviour of the caller built-in. Carp now detects if other code has overridden this with an incomplete implementation, and modifies its backtrace accordingly. Previously incomplete overrides would cause incorrect values in backtraces (best case), or obscure fatal errors (worst case)

This fixes certain cases of Bizarre copy of ARRAY caused by modules overriding caller() incorrectly.

p5122-CPANPLUS

A patch to cpanp-run-perl has been backported from CPANPLUS 0.9004. This resolves RT #55964 and RT #57106, both of which related to failures to install distributions that use Module::Install::DSL.

p5122-File::Glob

A regression which caused a failure to find CORE::GLOBAL::glob after loading File::Glob to crash has been fixed. Now, it correctly falls back to external globbing via pp_glob.

p5122-File::Copy

File::Copy::copy(FILE, DIR) is now documented.

p5122-File::Spec

Upgraded from version 3.31 to 3.31_01.

Several portability fixes were made in File::Spec::VMS: a colon is now recognized as a delimiter in native filespecs; caret-escaped delimiters are recognized for better handling of extended filespecs; catpath() returns an empty directory rather than the current directory if the input directory name is empty; abs2rel() properly handles Unix-style input.

p5122-Utility Changes

p5122-Changes to Existing Documentation

p5122-Installation and Configuration Improvements

p5122-Configuration improvements

p5122-Compilation improvements

p5122-Selected Bug Fixes

p5122-Platform Specific Notes

p5122-AIX

p5122-Windows

p5122-VMS

p5122-Acknowledgements

Perl 5.12.2 represents approximately three months of development since Perl 5.12.1 and contains approximately 2,000 lines of changes across 100 files from 36 authors.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.12.2:

Abigail, Ævar Arnfjörð Bjarmason, Ben Morrow, brian d foy, Brian Phillips, Chas. Owens, Chris 'BinGOs' Williams, Chris Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, David Golden, David Mitchell, Father Chrysostomos, Florian Ragwitz, George Greer, H.Merijn Brand, Jan Dubois, Jesse Vincent, Jim Cromie, Karl Williamson, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Leon Brocard, Maik Hentsche, Matt S Trout, Nicholas Clark, Rafael Garcia-Suarez, Rainer Tammer, Ricardo Signes, Salvador Ortiz Garcia, Sisyphus, Slaven Rezic, Steffen Mueller, Tony Cook, Vincent Pit and Yves Orton.

p5122-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5122-SEE ALSO

The Changes file for an explanation of how to view 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.

p5121-NAME

perl5121delta - what is new for perl v5.12.1

p5121-DESCRIPTION

This document describes differences between the 5.12.0 release and the 5.12.1 release.

If you are upgrading from an earlier release such as 5.10.1, first read "p5120-NAME", which describes differences between 5.10.1 and 5.12.0.

p5121-Incompatible Changes

There are no changes intentionally incompatible with 5.12.0. If any incompatibilities with 5.12.0 exist, they are bugs. Please report them.

p5121-Core Enhancements

Other than the bug fixes listed below, there should be no user-visible changes to the core language in this release.

p5121-Modules and Pragmata

p5121-Pragmata Changes

p5121-Updated Modules

p5121-Changes to Existing Documentation

p5121-Testing

p5121-Testing Improvements

p5121-Installation and Configuration Improvements

p5121-Configuration improvements

p5121-Bug Fixes

p5121-Platform Specific Notes

p5121-HP-UX

p5121-AIX

p5121-FreeBSD 7

p5121-VMS

p5121-Known Problems

p5121-Acknowledgements

Perl 5.12.1 represents approximately four weeks of development since Perl 5.12.0 and contains approximately 4,000 lines of changes across 142 files from 28 authors.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.12.1:

Ævar Arnfjörð Bjarmason, Chris Williams, chromatic, Craig A. Berry, David Golden, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene Sullivan, Goro Fuji, H.Merijn Brand, James E Keenan, Jan Dubois, Jesse Vincent, Josh ben Jore, Karl Williamson, Leon Brocard, Michael Schwern, Nga Tang Chan, Nicholas Clark, Niko Tyni, Philippe Bruhat, Rafael Garcia-Suarez, Ricardo Signes, Steffen Mueller, Todd Rinaldo, Vincent Pit and Zefram.

p5121-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5121-SEE ALSO

The Changes file for an explanation of how to view 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.

p5120-NAME

perl5120delta - what is new for perl v5.12.0

p5120-DESCRIPTION

This document describes differences between the 5.10.0 release and the 5.12.0 release.

Many of the bug fixes in 5.12.0 are already included in the 5.10.1 maintenance release.

You can see the list of those changes in the 5.10.1 release notes ("p5101-NAME").

p5120-Core Enhancements

p5120-New package NAME VERSION syntax

This new syntax allows a module author to set the $VERSION of a namespace when the namespace is declared with 'package'. It eliminates the need for our $VERSION = ... and similar constructs. E.g.

      package Foo::Bar 1.23;
      # $Foo::Bar::VERSION == 1.23

There are several advantages to this:

It does not break old code with only package NAME, but code that uses package NAME VERSION will need to be restricted to perl 5.12.0 or newer This is analogous to the change to open from two-args to three-args. Users requiring the latest Perl will benefit, and perhaps after several years, it will become a standard practice.

However, package NAME VERSION requires a new, 'strict' version number format. See "p5120-Version number formats" for details.

p5120-The ... operator

A new operator, ..., nicknamed the Yada Yada operator, has been added. It is intended to mark placeholder code that is not yet implemented. See "Yada Yada Operator" in perlop.

p5120-Implicit strictures

Using the use VERSION syntax with a version number greater or equal to 5.11.0 will lexically enable strictures just like use strict would do (in addition to enabling features.) The following:

    use 5.12.0;

means:

    use strict;
    use feature ':5.12';

p5120-Unicode improvements

Perl 5.12 comes with Unicode 5.2, the latest version available to us at the time of release. This version of Unicode was released in October 2009. See http://www.unicode.org/versions/Unicode5.2.0 for further details about what's changed in this version of the standard. See perlunicode for instructions on installing and using other versions of Unicode.

Additionally, Perl's developers have significantly improved Perl's Unicode implementation. For full details, see "p5120-Unicode overhaul" below.

p5120-Y2038 compliance

Perl's core time-related functions are now Y2038 compliant. (It may not mean much to you, but your kids will love it!)

p5120-qr overloading

It is now possible to overload the qr// operator, that is, conversion to regexp, like it was already possible to overload conversion to boolean, string or number of objects. It is invoked when an object appears on the right hand side of the =~ operator or when it is interpolated into a regexp. See overload.

p5120-Pluggable keywords

Extension modules can now cleanly hook into the Perl parser to define new kinds of keyword-headed expression and compound statement. The syntax following the keyword is defined entirely by the extension. This allow a completely non-Perl sublanguage to be parsed inline, with the correct ops cleanly generated.

See "PL_keyword_plugin" in perlapi for the mechanism. The Perl core source distribution also includes a new module XS::APItest::KeywordRPN, which implements reverse Polish notation arithmetic via pluggable keywords. This module is mainly used for test purposes, and is not normally installed, but also serves as an example of how to use the new mechanism.

Perl's developers consider this feature to be experimental. We may remove it or change it in a backwards-incompatible way in Perl 5.14.

p5120-APIs for more internals

The lowest layers of the lexer and parts of the pad system now have C APIs available to XS extensions. These are necessary to support proper use of pluggable keywords, but have other uses too. The new APIs are experimental, and only cover a small proportion of what would be necessary to take full advantage of the core's facilities in these areas. It is intended that the Perl 5.13 development cycle will see the addition of a full range of clean, supported interfaces.

Perl's developers consider this feature to be experimental. We may remove it or change it in a backwards-incompatible way in Perl 5.14.

p5120-Overridable function lookup

Where an extension module hooks the creation of rv2cv ops to modify the subroutine lookup process, this now works correctly for bareword subroutine calls. This means that prototypes on subroutines referenced this way will be processed correctly. (Previously bareword subroutine names were initially looked up, for parsing purposes, by an unhookable mechanism, so extensions could only properly influence subroutine names that appeared with an & sigil.)

p5120-A proper interface for pluggable Method Resolution Orders

As of Perl 5.12.0 there is a new interface for plugging and using method resolution orders other than the default linear depth first search. The C3 method resolution order added in 5.10.0 has been re-implemented as a plugin, without changing its Perl-space interface. See perlmroapi for more information.

p5120-\N experimental regex escape

Perl now supports \N, a new regex escape which you can think of as the inverse of \n. It will match any character that is not a newline, independently from the presence or absence of the single line match modifier /s. It is not usable within a character class. \N{3} means to match 3 non-newlines; \N{5,} means to match at least 5. \N{NAME} still means the character or sequence named NAME, but NAME no longer can be things like 3, or 5,.

This will break a custom charnames translator which allows numbers for character names, as \N{3} will now mean to match 3 non-newline characters, and not the character whose name is 3. (No name defined by the Unicode standard is a number, so only custom translators might be affected.)

Perl's developers are somewhat concerned about possible user confusion with the existing \N{...} construct which matches characters by their Unicode name. Consequently, this feature is experimental. We may remove it or change it in a backwards-incompatible way in Perl 5.14.

p5120-DTrace support

Perl now has some support for DTrace. See "DTrace support" in INSTALL.

p5120-Support for configure_requires in CPAN module metadata

Both CPAN and CPANPLUS now support the configure_requires keyword in the META.yml metadata file included in most recent CPAN distributions. This allows distribution authors to specify configuration prerequisites that must be installed before running Makefile.PL or Build.PL.

See the documentation for ExtUtils::MakeMaker or Module::Build for more on how to specify configure_requires when creating a distribution for CPAN.

p5120-each, keys, values are now more flexible

The each, keys, values function can now operate on arrays.

p5120-when as a statement modifier

when is now allowed to be used as a statement modifier.

p5120-$, flexibility

The variable $, may now be tied.

p5120-// in when clauses

// now behaves like || in when clauses

p5120-Enabling warnings from your shell environment

You can now set -W from the PERL5OPT environment variable

p5120-delete local

delete local now allows you to locally delete a hash entry.

p5120-New support for Abstract namespace sockets

Abstract namespace sockets are Linux-specific socket type that live in AF_UNIX family, slightly abusing it to be able to use arbitrary character arrays as addresses: They start with nul byte and are not terminated by nul byte, but with the length passed to the socket() system call.

p5120-32-bit limit on substr arguments removed

The 32-bit limit on substr arguments has now been removed. The full range of the system's signed and unsigned integers is now available for the pos and len arguments.

p5120-Potentially Incompatible Changes

p5120-Deprecations warn by default

Over the years, Perl's developers have deprecated a number of language features for a variety of reasons. Perl now defaults to issuing a warning if a deprecated language feature is used. Many of the deprecations Perl now warns you about have been deprecated for many years. You can find a list of what was deprecated in a given release of Perl in the perl5xxdelta.pod file for that release.

To disable this feature in a given lexical scope, you should use no warnings 'deprecated'; For information about which language features are deprecated and explanations of various deprecation warnings, please see perldiag. See "p5120-Deprecations" below for the list of features and modules Perl's developers have deprecated as part of this release.

p5120-Version number formats

Acceptable version number formats have been formalized into "strict" and "lax" rules. package NAME VERSION takes a strict version number. UNIVERSAL::VERSION and the version object constructors take lax version numbers. Providing an invalid version will result in a fatal error. The version argument in use NAME VERSION is first parsed as a numeric literal or v-string and then passed to UNIVERSAL::VERSION (and must then pass the "lax" format test).

These formats are documented fully in the version module. To a first approximation, a "strict" version number is a positive decimal number (integer or decimal-fraction) without exponentiation or else a dotted-decimal v-string with a leading 'v' character and at least three components. A "lax" version number allows v-strings with fewer than three components or without a leading 'v'. Under "lax" rules, both decimal and dotted-decimal versions may have a trailing "alpha" component separated by an underscore character after a fractional or dotted-decimal component.

The version module adds version::is_strict and version::is_lax functions to check a scalar against these rules.

p5120-@INC reorganization

In @INC, ARCHLIB and PRIVLIB now occur after after the current version's site_perl and vendor_perl. Modules installed into site_perl and vendor_perl will now be loaded in preference to those installed in ARCHLIB and PRIVLIB.

p5120-REGEXPs are now first class

Internally, Perl now treats compiled regular expressions (such as those created with qr//) as first class entities. Perl modules which serialize, deserialize or otherwise have deep interaction with Perl's internal data structures need to be updated for this change. Most affected CPAN modules have already been updated as of this writing.

p5120-Switch statement changes

The given/when switch statement handles complex statements better than Perl 5.10.0 did (These enhancements are also available in 5.10.1 and subsequent 5.10 releases.) There are two new cases where when now interprets its argument as a boolean, instead of an expression to be used in a smart match:

p5120-flip-flop operators

The .. and ... flip-flop operators are now evaluated in boolean context, following their usual semantics; see "Range Operators" in perlop.

Note that, as in perl 5.10.0, when (1..10) will not work to test whether a given value is an integer between 1 and 10; you should use when ([1..10]) instead (note the array reference).

However, contrary to 5.10.0, evaluating the flip-flop operators in boolean context ensures it can now be useful in a when(), notably for implementing bistable conditions, like in:

    when (/^=begin/ .. /^=end/) {
      # do something
    }
p5120-defined-or operator

A compound expression involving the defined-or operator, as in when (expr1 // expr2), will be treated as boolean if the first expression is boolean. (This just extends the existing rule that applies to the regular or operator, as in when (expr1 || expr2).)

p5120-Smart match changes

Since Perl 5.10.0, Perl's developers have made a number of changes to the smart match operator. These, of course, also alter the behaviour of the switch statements where smart matching is implicitly used. These changes were also made for the 5.10.1 release, and will remain in subsequent 5.10 releases.

p5120-Changes to type-based dispatch

The smart match operator ~~ is no longer commutative. The behaviour of a smart match now depends primarily on the type of its right hand argument. Moreover, its semantics have been adjusted for greater consistency or usefulness in several cases. While the general backwards compatibility is maintained, several changes must be noted:

The full dispatch table for the smart match operator is given in "Smart matching in detail" in perlsyn.

p5120-Smart match and overloading

According to the rule of dispatch based on the rightmost argument type, when an object overloading ~~ appears on the right side of the operator, the overload routine will always be called (with a 3rd argument set to a true value, see overload.) However, when the object will appear on the left, the overload routine will be called only when the rightmost argument is a simple scalar. This way, distributivity of smart match across arrays is not broken, as well as the other behaviours with complex types (coderefs, hashes, regexes). Thus, writers of overloading routines for smart match mostly need to worry only with comparing against a scalar, and possibly with stringification overloading; the other common cases will be automatically handled consistently.

~~ will now refuse to work on objects that do not overload it (in order to avoid relying on the object's underlying structure). (However, if the object overloads the stringification or the numification operators, and if overload fallback is active, it will be used instead, as usual.)

p5120-Other potentially incompatible changes

p5120-Deprecations

From time to time, Perl's developers find it necessary to deprecate features or modules we've previously shipped as part of the core distribution. We are well aware of the pain and frustration that a backwards-incompatible change to Perl can cause for developers building or maintaining software in Perl. You can be sure that when we deprecate a functionality or syntax, it isn't a choice we make lightly. Sometimes, we choose to deprecate functionality or syntax because it was found to be poorly designed or implemented. Sometimes, this is because they're holding back other features or causing performance problems. Sometimes, the reasons are more complex. Wherever possible, we try to keep deprecated functionality available to developers in its previous form for at least one major release. So long as a deprecated feature isn't actively disrupting our ability to maintain and extend Perl, we'll try to leave it in place as long as possible.

The following items are now deprecated:

p5120-suidperl

suidperl is no longer part of Perl. It used to provide a mechanism to emulate setuid permission bits on systems that don't support it properly.

p5120-Use of := to mean an empty attribute list

An accident of Perl's parser meant that these constructions were all equivalent:

    my $pi := 4;
    my $pi : = 4;
    my $pi :  = 4;

with the : being treated as the start of an attribute list, which ends before the =. As whitespace is not significant here, all are parsed as an empty attribute list, hence all the above are equivalent to, and better written as

    my $pi = 4;

because no attribute processing is done for an empty list.

As is, this meant that := cannot be used as a new token, without silently changing the meaning of existing code. Hence that particular form is now deprecated, and will become a syntax error. If it is absolutely necessary to have empty attribute lists (for example, because of a code generator) then avoid the warning by adding a space before the =.

p5120-UNIVERSAL->import()

The method UNIVERSAL->import() is now deprecated. Attempting to pass import arguments to a use UNIVERSAL statement will result in a deprecation warning.

p5120-Use of "goto" to jump into a construct

Using goto to jump from an outer scope into an inner scope is now deprecated. This rare use case was causing problems in the implementation of scopes.

p5120-Custom character names in \N{name} that don't look like names

In \N{name}, name can be just about anything. The standard Unicode names have a very limited domain, but a custom name translator could create names that are, for example, made up entirely of punctuation symbols. It is now deprecated to make names that don't begin with an alphabetic character, and aren't alphanumeric or contain other than a very few other characters, namely spaces, dashes, parentheses and colons. Because of the added meaning of \N (See "p5120-\N experimental regex escape"), names that look like curly brace -enclosed quantifiers won't work. For example, \N{3,4} now means to match 3 to 4 non-newlines; before a custom name 3,4 could have been created.

p5120-Deprecated Modules

The following modules will be removed from the core distribution in a future release, and should be installed from CPAN instead. Distributions on CPAN which require these should add them to their prerequisites. The core versions of these modules warnings will issue a deprecation warning.

If you ship a packaged version of Perl, either alone or as part of a larger system, then you should carefully consider the repercussions of core module deprecations. You may want to consider shipping your default build of Perl with packages for some or all deprecated modules which install into vendor or site perl library directories. This will inhibit the deprecation warnings.

Alternatively, you may want to consider patching lib/deprecate.pm to provide deprecation warnings specific to your packaging system or distribution of Perl, consistent with how your packaging system or distribution manages a staged transition from a release where the installation of a single package provides the given functionality, to a later release where the system administrator needs to know to install multiple packages to get that same functionality.

You can silence these deprecation warnings by installing the modules in question from CPAN. To install the latest version of all of them, just install Task::Deprecations::5_12.

p5120-Class::ISA
p5120-Pod::Plainer
p5120-Shell
p5120-Switch

Switch is buggy and should be avoided. You may find Perl's new given/when feature a suitable replacement. See "Switch statements" in perlsyn for more information.

p5120-Assignment to $[
p5120-Use of the attribute :locked on subroutines
p5120-Use of "locked" with the attributes pragma
p5120-Use of "unique" with the attributes pragma
p5120-Perl_pmflag

Perl_pmflag is no longer part of Perl's public API. Calling it now generates a deprecation warning, and it will be removed in a future release. Although listed as part of the API, it was never documented, and only ever used in toke.c, and prior to 5.10, regcomp.c. In core, it has been replaced by a static function.

p5120-Numerous Perl 4-era libraries

termcap.pl, tainted.pl, stat.pl, shellwords.pl, pwd.pl, open3.pl, open2.pl, newgetopt.pl, look.pl, find.pl, finddepth.pl, importenv.pl, hostname.pl, getopts.pl, getopt.pl, getcwd.pl, flush.pl, fastcwd.pl, exceptions.pl, ctime.pl, complete.pl, cacheout.pl, bigrat.pl, bigint.pl, bigfloat.pl, assert.pl, abbrev.pl, dotsh.pl, and timelocal.pl are all now deprecated. Earlier, Perl's developers intended to remove these libraries from Perl's core for the 5.14.0 release.

During final testing before the release of 5.12.0, several developers discovered current production code using these ancient libraries, some inside the Perl core itself. Accordingly, the pumpking granted them a stay of execution. They will begin to warn about their deprecation in the 5.14.0 release and will be removed in the 5.16.0 release.

p5120-Unicode overhaul

Perl's developers have made a concerted effort to update Perl to be in sync with the latest Unicode standard. Changes for this include:

Perl can now handle every Unicode character property. New documentation, perluniprops, lists all available non-Unihan character properties. By default, perl does not expose Unihan, deprecated or Unicode-internal properties. See below for more details on these; there is also a section in the pod listing them, and explaining why they are not exposed.

Perl now fully supports the Unicode compound-style of using = and : in writing regular expressions: \p{property=value} and \p{property:value} (both of which mean the same thing).

Perl now fully supports the Unicode loose matching rules for text between the braces in \p{...} constructs. In addition, Perl allows underscores between digits of numbers.

Perl now accepts all the Unicode-defined synonyms for properties and property values.

qr/\X/, which matches a Unicode logical character, has been expanded to work better with various Asian languages. It now is defined as an extended grapheme cluster. (See http://www.unicode.org/reports/tr29/). Anything matched previously and that made sense will continue to be accepted. Additionally:

Otherwise, this change should be transparent for the non-affected languages.

\p{...} matches using the Canonical_Combining_Class property were completely broken in previous releases of Perl. They should now work correctly.

Before Perl 5.12, the Unicode Decomposition_Type=Compat property and a Perl extension had the same name, which led to neither matching all the correct values (with more than 100 mistakes in one, and several thousand in the other). The Perl extension has now been renamed to be Decomposition_Type=Noncanonical (short: dt=noncanon). It has the same meaning as was previously intended, namely the union of all the non-canonical Decomposition types, with Unicode Compat being just one of those.

\p{Decomposition_Type=Canonical} now includes the Hangul syllables.

\p{Uppercase} and \p{Lowercase} now work as the Unicode standard says they should. This means they each match a few more characters than they used to.

\p{Cntrl} now matches the same characters as \p{Control}. This means it no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format (gc=cf) code points. The Format code points represent the biggest possible problem. All but 36 of them are either officially deprecated or strongly discouraged from being used. Of those 36, likely the most widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and similar characters, plus bidirectional controls.

\p{Alpha} now matches the same characters as \p{Alphabetic}. Before 5.12, Perl's definition definition included a number of things that aren't really alpha (all marks) while omitting many that were. The definitions of \p{Alnum} and \p{Word} depend on Alpha's definition and have changed accordingly.

\p{Word} no longer incorrectly matches non-word characters such as fractions.

\p{Print} no longer matches the line control characters: Tab, LF, CR, FF, VT, and NEL. This brings it in line with standards and the documentation.

\p{XDigit} now matches the same characters as \p{Hex_Digit}. This means that in addition to the characters it currently matches, [A-Fa-f0-9], it will also match the 22 fullwidth equivalents, for example U+FF10: FULLWIDTH DIGIT ZERO.

The Numeric type property has been extended to include the Unihan characters.

There is a new Perl extension, the 'Present_In', or simply 'In', property. This is an extension of the Unicode Age property, but \p{In=5.0} matches any code point whose usage has been determined as of Unicode version 5.0. The \p{Age=5.0} only matches code points added in precisely version 5.0.

A number of properties now have the correct values for unassigned code points. The affected properties are Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type, Hangul_Syllable_Type, Numeric_Type, and Line_Break.

The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties are now up to date with current Unicode definitions.

Earlier versions of Perl erroneously exposed certain properties that are supposed to be Unicode internal-only. Use of these in regular expressions will now generate, if enabled, a deprecation warning message. The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and Other_Uppercase.

It is now possible to change which Unicode properties Perl understands on a per-installation basis. As mentioned above, certain properties are turned off by default. These include all the Unihan properties (which should be accessible via the CPAN module Unicode::Unihan) and any deprecated or Unicode internal-only property that Perl has never exposed.

The generated files in the lib/unicore/To directory are now more clearly marked as being stable, directly usable by applications. New hash entries in them give the format of the normal entries, which allows for easier machine parsing. Perl can generate files in this directory for any property, though most are suppressed. You can find instructions for changing which are written in perluniprops.

p5120-Modules and Pragmata

p5120-New Modules and Pragmata

p5120-autodie

autodie is a new lexically-scoped alternative for the Fatal module. The bundled version is 2.06_01. Note that in this release, using a string eval when autodie is in effect can cause the autodie behaviour to leak into the surrounding scope. See "BUGS" in autodie for more details.

Version 2.06_01 has been added to the Perl core.

p5120-Compress::Raw::Bzip2

Version 2.024 has been added to the Perl core.

p5120-overloading

overloading allows you to lexically disable or enable overloading for some or all operations.

Version 0.001 has been added to the Perl core.

p5120-parent

parent establishes an ISA relationship with base classes at compile time. It provides the key feature of base without further unwanted behaviors.

Version 0.223 has been added to the Perl core.

p5120-Parse::CPAN::Meta

Version 1.40 has been added to the Perl core.

p5120-VMS::DCLsym

Version 1.03 has been added to the Perl core.

p5120-VMS::Stdio

Version 2.4 has been added to the Perl core.

p5120-XS::APItest::KeywordRPN

Version 0.003 has been added to the Perl core.

p5120-Updated Pragmata

p5120-base

Upgraded from version 2.13 to 2.15.

p5120-bignum

Upgraded from version 0.22 to 0.23.

p5120-charnames

charnames now contains the Unicode NameAliases.txt database file. This has the effect of adding some extra \N character names that formerly wouldn't have been recognised; for example, "\N{LATIN CAPITAL LETTER GHA}".

Upgraded from version 1.06 to 1.07.

p5120-constant

Upgraded from version 1.13 to 1.20.

p5120-diagnostics

diagnostics now supports %.0f formatting internally.

diagnostics no longer suppresses Use of uninitialized value in range (or flip) warnings. [perl #71204]

Upgraded from version 1.17 to 1.19.

p5120-feature

In feature, the meaning of the :5.10 and :5.10.X feature bundles has changed slightly. The last component, if any (i.e. X) is simply ignored. This is predicated on the assumption that new features will not, in general, be added to maintenance releases. So :5.10 and :5.10.X have identical effect. This is a change to the behaviour documented for 5.10.0.

feature now includes the unicode_strings feature:

    use feature "unicode_strings";

This pragma turns on Unicode semantics for the case-changing operations (uc, lc, ucfirst, lcfirst) on strings that don't have the internal UTF-8 flag set, but that contain single-byte characters between 128 and 255.

Upgraded from version 1.11 to 1.16.

p5120-less

less now includes the stash_name method to allow subclasses of less to pick where in %^H to store their stash.

Upgraded from version 0.02 to 0.03.

p5120-lib

Upgraded from version 0.5565 to 0.62.

p5120-mro

mro is now implemented as an XS extension. The documented interface has not changed. Code relying on the implementation detail that some mro:: methods happened to be available at all times gets to "keep both pieces".

Upgraded from version 1.00 to 1.02.

p5120-overload

overload now allow overloading of 'qr'.

Upgraded from version 1.06 to 1.10.

p5120-threads

Upgraded from version 1.67 to 1.75.

p5120-threads::shared

Upgraded from version 1.14 to 1.32.

p5120-version

version now has support for "p5120-Version number formats" as described earlier in this document and in its own documentation.

Upgraded from version 0.74 to 0.82.

p5120-warnings

warnings has a new warnings::fatal_enabled() function. It also includes a new illegalproto warning category. See also "p5120-New or Changed Diagnostics" for this change.

Upgraded from version 1.06 to 1.09.

p5120-Updated Modules

p5120-Archive::Extract

Upgraded from version 0.24 to 0.38.

p5120-Archive::Tar

Upgraded from version 1.38 to 1.54.

p5120-Attribute::Handlers

Upgraded from version 0.79 to 0.87.

p5120-AutoLoader

Upgraded from version 5.63 to 5.70.

p5120-B::Concise

Upgraded from version 0.74 to 0.78.

p5120-B::Debug

Upgraded from version 1.05 to 1.12.

p5120-B::Deparse

Upgraded from version 0.83 to 0.96.

p5120-B::Lint

Upgraded from version 1.09 to 1.11_01.

p5120-CGI

Upgraded from version 3.29 to 3.48.

p5120-Class::ISA

Upgraded from version 0.33 to 0.36.

NOTE: Class::ISA is deprecated and may be removed from a future version of Perl.

p5120-Compress::Raw::Zlib

Upgraded from version 2.008 to 2.024.

p5120-CPAN

Upgraded from version 1.9205 to 1.94_56.

p5120-CPANPLUS

Upgraded from version 0.84 to 0.90.

p5120-CPANPLUS::Dist::Build

Upgraded from version 0.06_02 to 0.46.

p5120-Data::Dumper

Upgraded from version 2.121_14 to 2.125.

p5120-DB_File

Upgraded from version 1.816_1 to 1.820.

p5120-Devel::PPPort

Upgraded from version 3.13 to 3.19.

p5120-Digest

Upgraded from version 1.15 to 1.16.

p5120-Digest::MD5

Upgraded from version 2.36_01 to 2.39.

p5120-Digest::SHA

Upgraded from version 5.45 to 5.47.

p5120-Encode

Upgraded from version 2.23 to 2.39.

p5120-Exporter

Upgraded from version 5.62 to 5.64_01.

p5120-ExtUtils::CBuilder

Upgraded from version 0.21 to 0.27.

p5120-ExtUtils::Command

Upgraded from version 1.13 to 1.16.

p5120-ExtUtils::Constant

Upgraded from version 0.2 to 0.22.

p5120-ExtUtils::Install

Upgraded from version 1.44 to 1.55.

p5120-ExtUtils::MakeMaker

Upgraded from version 6.42 to 6.56.

p5120-ExtUtils::Manifest

Upgraded from version 1.51_01 to 1.57.

p5120-ExtUtils::ParseXS

Upgraded from version 2.18_02 to 2.21.

p5120-File::Fetch

Upgraded from version 0.14 to 0.24.

p5120-File::Path

Upgraded from version 2.04 to 2.08_01.

p5120-File::Temp

Upgraded from version 0.18 to 0.22.

p5120-Filter::Simple

Upgraded from version 0.82 to 0.84.

p5120-Filter::Util::Call

Upgraded from version 1.07 to 1.08.

p5120-Getopt::Long

Upgraded from version 2.37 to 2.38.

p5120-IO

Upgraded from version 1.23_01 to 1.25_02.

p5120-IO::Zlib

Upgraded from version 1.07 to 1.10.

p5120-IPC::Cmd

Upgraded from version 0.40_1 to 0.54.

p5120-IPC::SysV

Upgraded from version 1.05 to 2.01.

p5120-Locale::Maketext

Upgraded from version 1.12 to 1.14.

p5120-Locale::Maketext::Simple

Upgraded from version 0.18 to 0.21.

p5120-Log::Message

Upgraded from version 0.01 to 0.02.

p5120-Log::Message::Simple

Upgraded from version 0.04 to 0.06.

p5120-Math::BigInt

Upgraded from version 1.88 to 1.89_01.

p5120-Math::BigInt::FastCalc

Upgraded from version 0.16 to 0.19.

p5120-Math::BigRat

Upgraded from version 0.21 to 0.24.

p5120-Math::Complex

Upgraded from version 1.37 to 1.56.

p5120-Memoize

Upgraded from version 1.01_02 to 1.01_03.

p5120-MIME::Base64

Upgraded from version 3.07_01 to 3.08.

p5120-Module::Build

Upgraded from version 0.2808_01 to 0.3603.

p5120-Module::CoreList

Upgraded from version 2.12 to 2.29.

p5120-Module::Load

Upgraded from version 0.12 to 0.16.

p5120-Module::Load::Conditional

Upgraded from version 0.22 to 0.34.

p5120-Module::Loaded

Upgraded from version 0.01 to 0.06.

p5120-Module::Pluggable

Upgraded from version 3.6 to 3.9.

p5120-Net::Ping

Upgraded from version 2.33 to 2.36.

p5120-NEXT

Upgraded from version 0.60_01 to 0.64.

p5120-Object::Accessor

Upgraded from version 0.32 to 0.36.

p5120-Package::Constants

Upgraded from version 0.01 to 0.02.

p5120-PerlIO

Upgraded from version 1.04 to 1.06.

p5120-Pod::Parser

Upgraded from version 1.35 to 1.37.

p5120-Pod::Perldoc

Upgraded from version 3.14_02 to 3.15_02.

p5120-Pod::Plainer

Upgraded from version 0.01 to 1.02.

NOTE: Pod::Plainer is deprecated and may be removed from a future version of Perl.

p5120-Pod::Simple

Upgraded from version 3.05 to 3.13.

p5120-Safe

Upgraded from version 2.12 to 2.22.

p5120-SelfLoader

Upgraded from version 1.11 to 1.17.

p5120-Storable

Upgraded from version 2.18 to 2.22.

p5120-Switch

Upgraded from version 2.13 to 2.16.

NOTE: Switch is deprecated and may be removed from a future version of Perl.

p5120-Sys::Syslog

Upgraded from version 0.22 to 0.27.

p5120-Term::ANSIColor

Upgraded from version 1.12 to 2.02.

p5120-Term::UI

Upgraded from version 0.18 to 0.20.

p5120-Test

Upgraded from version 1.25 to 1.25_02.

p5120-Test::Harness

Upgraded from version 2.64 to 3.17.

p5120-Test::Simple

Upgraded from version 0.72 to 0.94.

p5120-Text::Balanced

Upgraded from version 2.0.0 to 2.02.

p5120-Text::ParseWords

Upgraded from version 3.26 to 3.27.

p5120-Text::Soundex

Upgraded from version 3.03 to 3.03_01.

p5120-Thread::Queue

Upgraded from version 2.00 to 2.11.

p5120-Thread::Semaphore

Upgraded from version 2.01 to 2.09.

p5120-Tie::RefHash

Upgraded from version 1.37 to 1.38.

p5120-Time::HiRes

Upgraded from version 1.9711 to 1.9719.

p5120-Time::Local

Upgraded from version 1.18 to 1.1901_01.

p5120-Time::Piece

Upgraded from version 1.12 to 1.15.

p5120-Unicode::Collate

Upgraded from version 0.52 to 0.52_01.

p5120-Unicode::Normalize

Upgraded from version 1.02 to 1.03.

p5120-Win32

Upgraded from version 0.34 to 0.39.

p5120-Win32API::File

Upgraded from version 0.1001_01 to 0.1101.

p5120-XSLoader

Upgraded from version 0.08 to 0.10.

p5120-Removed Modules and Pragmata

p5120-attrs

Removed from the Perl core. Prior version was 1.02.

p5120-CPAN::API::HOWTO

Removed from the Perl core. Prior version was 'undef'.

p5120-CPAN::DeferedCode

Removed from the Perl core. Prior version was 5.50.

p5120-CPANPLUS::inc

Removed from the Perl core. Prior version was 'undef'.

p5120-DCLsym

Removed from the Perl core. Prior version was 1.03.

p5120-ExtUtils::MakeMaker::bytes

Removed from the Perl core. Prior version was 6.42.

p5120-ExtUtils::MakeMaker::vmsish

Removed from the Perl core. Prior version was 6.42.

p5120-Stdio

Removed from the Perl core. Prior version was 2.3.

p5120-Test::Harness::Assert

Removed from the Perl core. Prior version was 0.02.

p5120-Test::Harness::Iterator

Removed from the Perl core. Prior version was 0.02.

p5120-Test::Harness::Point

Removed from the Perl core. Prior version was 0.01.

p5120-Test::Harness::Results

Removed from the Perl core. Prior version was 0.01.

p5120-Test::Harness::Straps

Removed from the Perl core. Prior version was 0.26_01.

p5120-Test::Harness::Util

Removed from the Perl core. Prior version was 0.01.

p5120-XSSymSet

Removed from the Perl core. Prior version was 1.1.

p5120-Deprecated Modules and Pragmata

See "p5120-Deprecated Modules" above.

p5120-Documentation

p5120-New Documentation

p5120-Changes to Existing Documentation

p5120-Selected Performance Enhancements

p5120-Installation and Configuration Improvements

p5120-Internal Changes

Each release of Perl sees numerous internal changes which shouldn't affect day to day usage but may still be notable for developers working with Perl's source code.

p5120-Testing

p5120-Testing improvements

p5120-Parallel tests

The core distribution can now run its regression tests in parallel on Unix-like platforms. Instead of running make test, set TEST_JOBS in your environment to the number of tests to run in parallel, and run make test_harness. On a Bourne-like shell, this can be done as

    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel

An environment variable is used, rather than parallel make itself, because TAP::Harness needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to make utilities to interact with their job schedulers.

Note that currently some test scripts may fail when run in parallel (most notably ext/IO/t/io_dir.t). If necessary run just the failing scripts again sequentially and see if the failures go away.

p5120-Test harness flexibility

It's now possible to override PERL5OPT and friends in t/TEST

p5120-Test watchdog

Several tests that have the potential to hang forever if they fail now incorporate a "watchdog" functionality that will kill them after a timeout, which helps ensure that make test and make test_harness run to completion automatically.

p5120-New Tests

Perl's developers have added a number of new tests to the core. In addition to the items listed below, many modules updated from CPAN incorporate new tests.

p5120-New or Changed Diagnostics

p5120-New Diagnostics

p5120-Changed Diagnostics

A number of existing diagnostic messages have been improved or corrected:

The following diagnostic messages have been removed:

p5120-Utility Changes

p5120-Selected Bug Fixes

p5120-Platform Specific Changes

Perl is incredibly portable. In general, if a platform has a C compiler, someone has ported Perl to it (or will soon). We're happy to announce that Perl 5.12 includes support for several new platforms. At the same time, it's time to bid farewell to some (very) old friends.

p5120-New Platforms

p5120-Haiku

Perl's developers have merged patches from Haiku's maintainers. Perl should now build on Haiku.

p5120-MirOS BSD

Perl should now build on MirOS BSD.

p5120-Discontinued Platforms

p5120-Domain/OS
p5120-MiNT
p5120-Tenon MachTen

p5120-Updated Platforms

p5120-AIX
p5120-Cygwin
p5120-Darwin (Mac OS X)
p5120-DragonFly BSD
p5120-FreeBSD
p5120-Irix
p5120-NetBSD
p5120-OpenVMS
p5120-Stratus VOS
p5120-Symbian
p5120-Windows

p5120-Known Problems

This is a list of some significant unfixed bugs, which are regressions from either 5.10.x or 5.8.x.

p5120-Errata

p5120-Acknowledgements

Perl 5.12.0 represents approximately two years of development since Perl 5.10.0 and contains over 750,000 lines of changes across over 3,000 files from over 200 authors and committers.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.12.0:

Aaron Crane, Abe Timmerman, Abhijit Menon-Sen, Abigail, Adam Russell, Adriano Ferreira, Ævar Arnfjörð Bjarmason, Alan Grover, Alexandr Ciornii, Alex Davies, Alex Vandiver, Andreas Koenig, Andrew Rodland, andrew@sundale.net, Andy Armstrong, Andy Dougherty, Jose AUGUSTE-ETIENNE, Benjamin Smith, Ben Morrow, bharanee rathna, Bo Borgerson, Bo Lindbergh, Brad Gilbert, Bram, Brendan O'Dea, brian d foy, Charles Bailey, Chip Salzenberg, Chris 'BinGOs' Williams, Christoph Lamprecht, Chris Williams, chromatic, Claes Jakobsson, Craig A. Berry, Dan Dascalescu, Daniel Frederick Crisman, Daniel M. Quinlan, Dan Jacobson, Dan Kogai, Dave Mitchell, Dave Rolsky, David Cantrell, David Dick, David Golden, David Mitchell, David M. Syzdek, David Nicol, David Wheeler, Dennis Kaarsemaker, Dintelmann, Peter, Dominic Dunlop, Dr.Ruud, Duke Leto, Enrico Sorcinelli, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gabor Szabo, Gene Sullivan, Geoffrey T. Dairiki, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, Green, Paul, Hans Dieter Pearcey, Harmen, H. Merijn Brand, Hugo van der Sanden, Ian Goodacre, Igor Sutton, Ingo Weinhold, James Bence, James Mastros, Jan Dubois, Jari Aalto, Jarkko Hietaniemi, Jay Hannah, Jerry Hedden, Jesse Vincent, Jim Cromie, Jody Belka, John E. Malmberg, John Malmberg, John Peacock, John Peacock via RT, John P. Linderman, John Wright, Josh ben Jore, Jos I. Boumans, Karl Williamson, Kenichi Ishigaki, Ken Williams, Kevin Brintnall, Kevin Ryde, Kurt Starsinic, Leon Brocard, Lubomir Rintel, Luke Ross, Marcel Grünauer, Marcus Holland-Moritz, Mark Jason Dominus, Marko Asplund, Martin Hasch, Mashrab Kuvatov, Matt Kraai, Matt S Trout, Max Maischein, Michael Breen, Michael Cartmell, Michael G Schwern, Michael Witten, Mike Giroux, Milosz Tanski, Moritz Lenz, Nicholas Clark, Nick Cleaton, Niko Tyni, Offer Kaye, Osvaldo Villalon, Paul Fenwick, Paul Gaborit, Paul Green, Paul Johnson, Paul Marquess, Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer, Rajesh Mandalemula, Reini Urban, Renée Bäcker, Ricardo Signes, Ricardo SIGNES, Richard Foley, Rich Rauenzahn, Rick Delaney, Risto Kankkunen, Robert May, Roberto C. Sanchez, Robin Barker, SADAHIRO Tomoyuki, Salvador Ortiz Garcia, Sam Vilain, Scott Lanning, Sébastien Aperghis-Tramoni, Sérgio Durigan Júnior, Shlomi Fish, Simon 'corecode' Schubert, Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steffen Ullrich, Stepan Kasal, Steve Hay, Steven Schubiger, Steve Peters, Tels, The Doctor, Tim Bunce, Tim Jenness, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tom Wyant, Tony Cook, Torsten Schoenfeld, Tye McQueen, Vadim Konovalov, Vincent Pit, Hio YAMASHINA, Yasuhiro Matsumoto, Yitzchak Scott-Thoennes, Yuval Kogman, Yves Orton, Zefram, Zsban Ambrus

This is woefully incomplete as it's automatically generated from version control history. In particular, it doesn't include the names of the (very much appreciated) contributors who reported issues in previous versions of Perl that helped make Perl 5.12.0 better. For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl 5.12.0 distribution.

Our "retired" pumpkings Nicholas Clark and Rafael Garcia-Suarez deserve special thanks for their brilliant and substantive ongoing contributions. Nicholas personally authored over 30% of the patches since 5.10.0. Rafael comes in second in patch authorship with 11%, but is first by a long shot in committing patches authored by others, pushing 44% of the commits since 5.10.0 in this category, often after providing considerable coaching to the patch authors. These statistics in no way comprise all of their contributions, but express in shorthand that we couldn't have done it without them.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5120-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://rt.perl.org/perlbug/. There may also be information at http://www.perl.org/, 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 analyzed by the Perl porting team.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5120-SEE ALSO

The Changes file for an explanation of how to view 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.

http://dev.perl.org/perl5/errata.html for a list of issues found after this release, as well as a list of CPAN modules known to be incompatible with this release.

p5115-NAME

perl5115delta - what is new for perl v5.11.5

p5115-DESCRIPTION

This document describes differences between the 5.11.4 release and the 5.11.5 release.

If you are upgrading from an earlier release such as 5.11.3, first read "p5114-NAME", which describes differences between 5.11.3 and 5.11.4.

p5115-Core Enhancements

p5115-32-bit limit on substr arguments removed

The 32-bit limit on substr arguments has now been removed. The full range of the system's signed and unsigned integers is now available for the pos and len arguments.

p5115-Modules and Pragmata

p5115-Pragmata Changes

p5115-version

Upgraded from version 0.81 to 0.82.

The is_lax and is_strict functions can now be optionally exported to the caller's namespace and are also now documented.

Undefined version objects are now uninitialized with zero rather than undef.

p5115-Updated Modules

p5115-B::Debug

Upgraded from version 1.11 to 1.12.

p5115-CPAN

Upgraded from version 1.94_53 to 1.94_56.

This resolves RT #72362, in which CPAN was ignoring configure_requires, and RT #72348, in which the command o conf init in the CPAN shell could cause an exception to be thrown.

This module is also now built in a less specialized way, which resolves a problem that caused make after make clean to fail, fixing RT #72218.

p5115-CPANPLUS::Dist::Build

Upgraded from version 0.44 to 0.46.

This makes the prereq resolving fall back to _build/ querying if the prereq_data action fails.

p5115-Pod::Perldoc

Upgraded from version 3.15_01 to 3.15_02.

p5115-Pod::Plainer

Upgraded from version 1.01 to 1.02.

p5115-Safe

Upgraded from version 2.21 to 2.22.

This resolves RT #72700, in which an exception thrown from a closure was getting lost.

p5115-Socket

Upgraded from version 1.85 to 1.86.

This makes the new Socket implementation of inet_pton consistent with the existing Socket6 implementation of inet_pton, fixing RT #72884.

p5115-podlators

Upgraded from version 2.2.2 to 2.3.1.

p5115-Changes to Existing Documentation

The syntax unless (EXPR) BLOCK else BLOCK is now documented as valid, as is the syntax unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK, although actually using the latter may not be the best idea for the readability of your source code.

p5115-Installation and Configuration Improvements

p5115-Configuration improvements

Support for SystemTap's dtrace compatibility layer has been added and an issue with linking miniperl has been fixed in the process.

less -R is now used instead of less for groff's new usage of ANSI escape codes by setting $Config{less} (and thereby $Config{pager}, which fixes RT #72156.

USE_PERL_ATOF is now reported in the compile-time options listed by the -V switch.

p5115-Selected Bug Fixes

p5115-New or Changed Diagnostics

p5115-New Tests

p5115-t/op/filehandle.t

Tests some suitably portable filetest operators to check that they work as expected, particularly in the light of some internal changes made in how filehandles are blessed.

p5115-t/op/time_loop.t

Tests that times greater than 2**63, which can now be handed to gmtime and localtime, do not cause an internal overflow or an excessively long loop.

p5115-Known Problems

Perl 5.11.5 is a development release leading up to Perl 5.12.0. Some notable known problems found in 5.11.5 are listed as dependencies of RT #69710, the Perl 5 version 12 meta-ticket.

p5115-Acknowledgements

Perl 5.11.5 represents approximately one month of development since Perl 5.11.4 and contains 9618 lines of changes across 151 files from 33 authors and committers:

Ævar Arnfjörð Bjarmason, Abigail, brian d foy, Chris Williams, David Golden, David Mitchell, Eric Brine, Frank Wiegand, Gisle Aas, H.Merijn Brand, Jan Dubois, Jesse Vincent, Jim Cromie, John Peacock, Josh ben Jore, Karl Williamson, Marcus Holland-Moritz, Michael G Schwern, Nicholas Clark, Offer Kaye, Philippe Bruhat (BooK), Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Robin Barker, Slaven Rezic, Steffen Mueller, Steve Hay, Steve Peters, Tim Bunce, Todd Rinaldo, Tony Cook and Vincent Pit.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5115-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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 analyzed by the Perl porting team.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5115-SEE ALSO

The Changes file for an explanation of how to view 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.

p5114-NAME

perl5114delta - what is new for perl v5.11.4

p5114-DESCRIPTION

This document describes differences between the 5.11.3 release and the 5.11.4 release.

If you are upgrading from an earlier release such as 5.11.2, first read "p5113-NAME", which describes differences between 5.11.2 and 5.11.3.

p5114-Incompatible Changes

p5114-Version number formats

Acceptable version number formats have been formalized into "strict" and "lax" rules. package NAME VERSION takes a strict version number. use NAME VERSION takes a lax version number. UNIVERSAL::VERSION and the version object constructors take lax version numbers. Providing an invalid version will result in a fatal error.

These formats will be documented fully in the version module in a subsequent release of Perl 5.11. To a first approximation, a "strict" version number is a positive decimal number (integer or decimal-fraction) without exponentiation or else a dotted-decimal v-string with a leading 'v' character and at least three components. A "lax" version number allows v-strings with fewer than three components or without a leading 'v'. Under "lax" rules, both decimal and dotted-decimal versions may have a trailing "alpha" component separated by an underscore character after a fractional or dotted-decimal component.

The version module adds version::is_strict and version::is_lax functions to check a scalar against these rules.

p5114-Core Enhancements

p5114-Unicode properties

\p{XDigit} now matches the same characters as \p{Hex_Digit}. This means that in addition to the characters it currently matches, [A-Fa-f0-9], it will also match their fullwidth equivalent forms, for example U+FF10: FULLWIDTH DIGIT ZERO.

p5114-Modules and Pragmata

p5114-Pragmata Changes

p5114-less

Upgraded from version 0.02 to 0.03.

This version introduces the stash_name method to allow subclasses of less to pick where in %^H to store their stash.

p5114-version

Upgraded from version 0.77 to 0.81.

This version adds support for "p5114-Version number formats" as described earlier in this document and in its own documentation.

p5114-warnings

Upgraded from version 1.08 to 1.09.

This version adds the illegalproto warning category. See also "p5114-New or Changed Diagnostics" for this change.

p5114-Updated Modules

p5114-Archive::Extract

Upgraded from version 0.36 to 0.38.

p5114-B::Deparse

Upgraded from version 0.93 to 0.94.

p5114-Compress::Raw::Bzip2

Upgraded from version 2.021 to 2.024.

p5114-Compress::Raw::Zlib

Upgraded from version 2.021 to 2.024.

p5114-CPAN

Upgraded from version 1.94_5301 to 1.94_54.

p5114-File::Fetch

Upgraded from version 0.22 to 0.24.

p5114-Module::Build

Upgraded from version 0.36 to 0.3603.

p5114-Safe

Upgraded from version 2.20 to 2.21.

Anonymous coderefs created in Safe containers no longer get bogus arguments passed to them, fixing RT #72068.

p5114-Removed Modules and Pragmata

p5114-Devel::DProf::V

Removed from the Perl core. Prior version was 'undef'.

p5114-Changes to Existing Documentation

A significant fraction of the core documentation has been updated to clarify the behavior of Perl's Unicode handling.

Much of the remaining core documentation has been reviewed and edited for clarity, consistent use of language, and to fix the spelling of Tom Christiansen's name.

p5114-Configuration improvements

USE_ATTRIBUTES_FOR_PERLIO is now reported in the compile-time options listed by the -V switch.

p5114-Platform Specific Changes

p5114-VMS

The default pipe buffer size on VMS has been updated to 8192 on 64-bit systems.

p5114-Selected Bug Fixes

p5114-New or Changed Diagnostics

p5114-New warning category illegalproto

The two warnings :

  Illegal character in prototype for %s : %s
  Prototype after '%c' for %s : %s

have been moved from the syntax top-level warnings category into a new first-level category, illegalproto. These two warnings are currently the only ones emitted during parsing of an invalid/illegal prototype, so one can now do

  no warnings 'illegalproto';

to suppress only those, but not other syntax-related warnings. Warnings where prototypes are changed, ignored, or not met are still in the prototype category as before. (Matt S. Trout)

p5114-lvalue attribute ignored after the subroutine has been defined

This new warning is issued when one attempts to mark a subroutine as lvalue after it has been defined.

p5114-Changed Internals

p5114-Known Problems

Perl 5.11.4 is a development release leading up to Perl 5.12.0. Some notable known problems found in 5.11.4 are listed as dependencies of RT #69710, the Perl 5 version 12 meta-ticket.

p5114-Deprecations

The following items are now deprecated.

p5114-UNIVERSAL->import()

The method UNIVERSAL->import() is now deprecated. Attempting to pass import arguments to a use UNIVERSAL statement will result in a deprecation warning. (This is a less noisy version of the full deprecation warning added in 5.11.0.)

p5114-Acknowledgements

Perl 5.11.4 represents approximately one month of development since Perl 5.11.3 and contains 17682 lines of changes across 318 files from 40 authors and committers:

Abigail, Andy Dougherty, brian d foy, Chris Williams, Craig A. Berry, David Golden, David Mitchell, Father Chrysostomos, Gerard Goossen, H.Merijn Brand, Jesse Vincent, Jim Cromie, Josh ben Jore, Karl Williamson, kmx, Matt S Trout, Nicholas Clark, Niko Tyni, Paul Marquess, Philip Hazel, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Shlomi Fish, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tony Cook, Vincent Pit, and Zefram

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5114-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://rt.perl.org/perlbug/. There may also be information at http://www.perl.org/, 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 analyzed by the Perl porting team.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5114-SEE ALSO

The Changes file for an explanation of how to view 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.

p5113-NAME

perl5113delta - what is new for perl v5.11.3

p5113-DESCRIPTION

This document describes differences between the 5.11.2 release and the 5.11.3 release.

If you are upgrading from an earlier release such as 5.11.1, first read the "p5112-NAME", which describes differences between 5.11.1 and 5.11.2

p5113-Incompatible Changes

p5113-Filehandles are blessed directly into IO::Handle, as FileHandle is merely a wrapper around IO::Handle.

The previous behaviour was to bless Filehandles into FileHandle (an empty proxy class) if it was loaded into memory and otherwise to bless them into IO::Handle.

p5113-Core Enhancements

p5113-Unicode version

Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See http://www.unicode.org/versions/Unicode5.2.0 for details about this release of Unicode. See perlunicode for instructions on installing and using older versions of Unicode.

p5113-Unicode properties

Perl can now handle every Unicode character property. A new pod, perluniprops, lists all available non-Unihan character properties. By default the Unihan properties and certain others (deprecated and Unicode internal-only ones) are not exposed. See below for more details on these; there is also a section in the pod listing them, and why they are not exposed.

Perl now fully supports the Unicode compound-style of using = and : in writing regular expressions: \p{property=value} and \p{property:value} (both of which mean the same thing).

Perl now fully supports the Unicode loose matching rules for text between the braces in \p{...} constructs. In addition, Perl also allows underscores between digits of numbers.

All the Unicode-defined synonyms for properties and property values are now accepted.

qr/\X/, which matches a Unicode logical character, has been expanded to work better with various Asian languages. It now is defined as an extended grapheme cluster. (See http://www.unicode.org/reports/tr29/). Anything matched previously that made sense will continue to be matched. But in addition:

Otherwise, this change should be transparent for the non-affected languages.

\p{...} matches using the Canonical_Combining_Class property were completely broken in previous Perls. This is now fixed.

In previous Perls, the Unicode Decomposition_Type=Compat property and a Perl extension had the same name, which led to neither matching all the correct values (with more than 100 mistakes in one, and several thousand in the other). The Perl extension has now been renamed to be Decomposition_Type=Noncanonical (short: dt=noncanon). It has the same meaning as was previously intended, namely the union of all the non-canonical Decomposition types, with Unicode Compat being just one of those.

\p{Uppercase} and \p{Lowercase} have been brought into line with the Unicode definitions. This means they each match a few more characters than previously.

\p{Cntrl} now matches the same characters as \p{Control}. This means it no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format (gc=cf) code points. The Format code points represent the biggest possible problem. All but 36 of them are either officially deprecated or strongly discouraged from being used. Of those 36, likely the most widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and similar, plus Bi-directional controls.

\p{Alpha} now matches the same characters as \p{Alphabetic}. The Perl definition included a number of things that aren't really alpha (all marks), while omitting many that were. As a direct consequence, the definitions of \p{Alnum} and \p{Word} which depend on Alpha also change.

\p{Word} also now doesn't match certain characters it wasn't supposed to, such as fractions.

\p{Print} no longer matches the line control characters: Tab, LF, CR, FF, VT, and NEL. This brings it in line with the documentation.

\p{Decomposition_Type=Canonical} now includes the Hangul syllables.

The Numeric type property has been extended to include the Unihan characters.

There is a new Perl extension, the 'Present_In', or simply 'In', property. This is an extension of the Unicode Age property, but \p{In=5.0} matches any code point whose usage has been determined as of Unicode version 5.0. The \p{Age=5.0} only matches code points added in precisely version 5.0.

A number of properties did not have the correct values for unassigned code points. This is now fixed. The affected properties are Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type, Hangul_Syllable_Type, Numeric_Type, and Line_Break.

The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties have been updated to their current Unicode definitions.

Certain properties that are supposed to be Unicode internal-only were erroneously exposed by previous Perls. Use of these in regular expressions will now generate, if enabled, a deprecated warning message. The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and Other_Uppercase.

An installation can now fairly easily change which Unicode properties Perl understands. As mentioned above, certain properties are by default turned off. These include all the Unihan properties (which should be accessible via the CPAN module Unicode::Unihan) and any deprecated or Unicode internal-only property that Perl has never exposed.

The generated files in the lib/unicore/To directory are now more clearly marked as being stable, directly usable by applications. New hash entries in them give the format of the normal entries, which allows for easier machine parsing. Perl can generate files in this directory for any property, though most are suppressed. An installation can choose to change which get written. Instructions are in perluniprops.

p5113-Regular Expressions

U+0FFFF is now a legal character in regular expressions.

p5113-Modules and Pragmata

p5113-Pragmata Changes

p5113-constant

Upgraded from version 1.19 to 1.20.

p5113-diagnostics

This pragma no longer suppresses Use of uninitialized value in range (or flip) warnings. [perl #71204]

p5113-feature

Upgraded from 1.13 to 1.14. Added the unicode_strings feature:

    use feature "unicode_strings";

This pragma turns on Unicode semantics for the case-changing operations (uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set, but that contain single-byte characters between 128 and 255.

p5113-legacy

The experimental legacy pragma, introduced in 5.11.2, has been removed, and its functionality replaced by the new feature pragma, use feature "unicode_strings".

p5113-threads

Upgraded from version 1.74 to 1.75.

p5113-warnings

Upgraded from 1.07 to 1.08. Added new warnings::fatal_enabled() function.

p5113-Updated Modules

p5113-Archive::Extract

Upgraded from version 0.34 to 0.36.

p5113-CPAN

Upgraded from version 1.94_51 to 1.94_5301, which is 1.94_53 on CPAN plus some local fixes for bleadperl.

Includes better bzip2 support, improved FirstTime experience with auto-selection of CPAN mirrors, proper handling of modules removed from the Perl core, and an updated 'cpan' utility script

p5113-CPANPLUS

Upgraded from version 0.89_09 to 0.90.

p5113-Encode

Upgraded from version 2.38 to 2.39.

p5113-ExtUtils::MakeMaker

Upgraded from version 6.55_02 to 6.56. Adds new BUILD_REQUIRES key to indicate build-only prerequisites. Also adds support for mingw64 and the new "package NAME VERSION" syntax.

p5113-File::Path

Upgraded from version 2.08 to 2.08_01.

p5113-Module::Build

Upgraded from version 0.35_09 to 0.36. Compared to 0.35, this version has a new 'installdeps' action, supports the PERL_MB_OPT environment variable, adds a 'share_dir' property for File::ShareDir support, support the "package NAME VERSION" syntax and has many other enhancements and bug fixes. The 'passthrough' style of Module::Build::Compat has been deprecated.

p5113-Module::CoreList

Upgraded from version 2.23 to 2.24.

p5113-POSIX

Upgraded from version 1.18 to 1.19. Error codes for getaddrinfo() and getnameinfo() are now available.

p5113-Pod::Simple

Upgraded from version 3.10 to 3.13.

p5113-Safe

Upgraded from version 2.19 to 2.20.

p5113-Utility Changes

p5113-perlbug

No longer reports "Message sent" when it hasn't actually sent the message

p5113-Changes to Existing Documentation

The Pod specification (perlpodspec) has been updated to bring the specification in line with modern usage already supported by most Pod systems. A parameter string may now follow the format name in a "begin/end" region. Links to URIs with a text description are now allowed. The usage of L<"section"> has been marked as deprecated.

if.pm has been documented in "use" in perlfunc as a means to get conditional loading of modules despite the implicit BEGIN block around use.

p5113-Installation and Configuration Improvements

p5113-Testing improvements

p5113-It's now possible to override PERL5OPT and friends in t/TEST

p5113-Platform Specific Changes

p5113-Win32
p5113-cygwin
p5113-Enable IPv6 support on cygwin 1.7 and newer
p5113-OpenVMS
p5113-Make -UDEBUGGING the default on VMS for 5.12.0.

Like it has been everywhere else for ages and ages. Also make command-line selection of -UDEBUGGING and -DDEBUGGING work in configure.com; before the only way to turn it off was by saying no in answer to the interactive question.

p5113-Selected Bug Fixes

p5113-New or Changed Diagnostics

p5113-New Tests

Many modules updated from CPAN incorporate new tests.

p5113-t/comp/final_line_num.t

See if line numbers are correct at EOF

p5113-t/comp/form_scope.t

See if format scoping works

p5113-t/comp/line_debug.t

See if @{"_<$file"} works

p5113-t/op/filetest_t.t

See if -t file test works

p5113-t/op/qr.t

See if qr works

p5113-t/op/utf8cache.t

Tests malfunctions of utf8 cache

p5113-t/re/uniprops.t

Test unicode \p{} regex constructs

p5113-Deprecations

The following items are now deprecated.

p5113-Use of "goto" to jump into a construct is deprecated

Using goto to jump from an outer scope into an inner scope is now deprecated. This rare use case was causing problems in the implementation of scopes.

p5113-Acknowledgements

Perl 5.11.3 represents approximately one month of development since Perl 5.11.2 and contains 61407 lines of changes across 396 files from 40 authors and committers:

Abigail, Alex Davies, Alexandr Ciornii, Andrew Rodland, Andy Dougherty, Bram, brian d foy, Chip Salzenberg, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, David Golden, Dennis Kaarsemaker, Eric Brine, Father Chrysostomos, Gene Sullivan, Gerard Goossen, H. Merijn Brand, Hugo van der Sanden, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Karl Williamson, Leon Brocard, Max Maischein, Michael Breen, Moritz Lenz, Nicholas Clark, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Stepan Kasal, Steve Hay, Steve Peters, Tim Bunce, Tony Cook, Vincent Pit and Zefram.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5113-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5113-SEE ALSO

The Changes file for an explanation of how to view 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.

p5112-NAME

perl5112delta - what is new for perl v5.11.2

p5112-DESCRIPTION

This document describes differences between the 5.11.1 release and the 5.11.2 release.

p5112-Core Enhancements

p5112-qr overloading

It is now possible to overload the qr// operator, that is, conversion to regexp, like it was already possible to overload conversion to boolean, string or number of objects. It is invoked when an object appears on the right hand side of the =~ operator, or when it is interpolated into a regexp. See overload.

p5112-Pluggable keywords

Extension modules can now cleanly hook into the Perl parser to define new kinds of keyword-headed expression and compound statement. The syntax following the keyword is defined entirely by the extension. This allow a completely non-Perl sublanguage to be parsed inline, with the right ops cleanly generated. This feature is currently considered experimental.

See "PL_keyword_plugin" in perlapi for the mechanism. The Perl core source distribution also includes a new module XS::APItest::KeywordRPN, which implements reverse Polish notation arithmetic via pluggable keywords. This module is mainly used for test purposes, and is not normally installed, but also serves as an example of how to use the new mechanism.

p5112-APIs for more internals

The lowest layers of the lexer and parts of the pad system now have C APIs available to XS extensions. These are necessary to support proper use of pluggable keywords, but have other uses too. The new APIs are experimental, and only cover a small proportion of what would be necessary to take full advantage of the core's facilities in these areas. It is intended that the Perl 5.13 development cycle will see the addition of a full range of clean, supported interfaces.

p5112-Overridable function lookup

Where an extension module hooks the creation of rv2cv ops to modify the subroutine lookup process, this now works correctly for bareword subroutine calls. This means that prototypes on subroutines referenced this way will be processed correctly. (Previously bareword subroutine names were initially looked up, for parsing purposes, by an unhookable mechanism, so extensions could only properly influence subroutine names that appeared with an & sigil.)

p5112-Modules and Pragmata

p5112-New Modules and Pragmata

p5112-legacy

Preserves legacy behaviors or enable new non-default behaviors. Currently the only behaviour concerns semantics for the 128 characters on ASCII systems that have the 8th bit set.

p5112-Pragmata Changes

p5112-diagnostics

Supports %.0f formatting internally.

p5112-overload

Allow overloading of 'qr'.

p5112-Updated Modules

p5112-B::Concise

Optimize reversing an array in-place, avoid using defined %hash in core code and tests.

p5112-B::Deparse

Teach B::Deparse about in-place reverse.

p5112-Carp

Refine Carp caller() fix and add tests.

p5112-Compress::Zlib

Updated to 2.022.

p5112-CPANPLUS

Updated to 0.89_09.

p5112-Encode

Updated to 2.38.

p5112-ExtUtils::CBuilder

Updated to 0.27.

p5112-Env

Add EXISTS and DELETE methods to Env.pm.

p5112-File::Fetch

Updated to 0.22.

p5112-I8N::Langinfo

Correctly document export of I18N::Langinfo.

p5112-I8N::LangTags

In I18N::LangTags::Detect, avoid using defined @array and defined %hash.

p5112-IO::Compress

Updated to 2.022.

p5112-IPC::Cmd

Updated to 0.54.

p5112-List::Util

Updated to 1.22.

p5112-Locale::Maketext

In Locale::Maketext, avoid using defined @array and defined %hash. Convert the odd Locale::Maketext test out from Test to Test::More.

p5112-Module::Build

Updated to 0.35_08.

p5112-Module::CoreList

Implemented is_deprecated().

p5112-Pod::Simple

Updated to 3.10.

p5112-Scalar::Util

Updated to 1.22.

p5112-Switch

Updated to 2.16.

p5112-Utility Changes

p5112-a2p

Fixed bugs with the match() operator in list context, remove mention of $[.

p5112-Performance Enhancements

p5112-New or Changed Diagnostics

Several new diagnostics, see perldiag for details.

p5112-Bad plugin affecting keyword '%s'
p5112-gmtime(%.0f) too large
p5112-Lexing code attempted to stuff non-Latin-1 character into Latin-1 input
p5112-Lexing code internal error (%s)
p5112-localtime(%.0f) too large
p5112-Overloaded dereference did not return a reference
p5112-Overloaded qr did not return a REGEXP
p5112-Perl_pmflag() is deprecated, and will be removed from the XS API

One diagnostic has been removed:

p5112-Runaway format

p5112-Changed Internals

p5112-New Tests

p5112-t/op/while_readdir.t

Test that a bare readdir in while loop sets $_.

p5112-Known Problems

p5112-Known test failures on VMS

Perl 5.11.2 fails a small set of core and CPAN tests as of this release. With luck, that'll be sorted out for 5.11.3.

p5112-Deprecations

The following items are now deprecated.

p5112-Use of := to mean an empty attribute list is now deprecated.

An accident of Perl's parser meant that these constructions were all equivalent:

    my $pi := 4;
    my $pi : = 4;
    my $pi :  = 4;

with the : being treated as the start of an attribute list, which ends before the =. As whitespace is not significant here, all are parsed as an empty attribute list, hence all the above are equivalent to, and better written as

    my $pi = 4;

because no attribute processing is done for an empty list.

As is, this meant that := cannot be used as a new token, without silently changing the meaning of existing code. Hence that particular form is now deprecated, and will become a syntax error. If it is absolutely necessary to have empty attribute lists (for example, because of a code generator) then avoid the warning by adding a space before the =.

p5112-Acknowledgements

Perl 5.11.2 represents approximately 3 weeks development since Perl 5.11.1 and contains 29,992 lines of changes across 458 files from 38 authors and committers:

Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert, Bram, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave Rolsky, David E. Wheeler, David Golden, Eric Brine, Father Chrysostomos, Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr, Harmen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson, Kevin Ryde, Leon Brocard, Nicholas Clark, Paul Marquess, Philippe Bruhat, Rafael Garcia-Suarez, Sisyphus, Steffen Mueller, Steve Hay, Steve Peters, Vincent Pit, Yuval Kogman, Yves Orton, and Zefram.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5112-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5112-SEE ALSO

The Changes file for an explanation of how to view 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.

p5111-NAME

perl5111delta - what is new for perl v5.11.1

p5111-DESCRIPTION

This document describes differences between the 5.11.0 release and the 5.11.1 release.

p5111-Incompatible Changes

p5111-Core Enhancements

p5111-Add package NAME VERSION syntax

This new syntax allows a module author to set the $VERSION of a namespace when the namespace is declared with 'package'. It eliminates the need for our $VERSION = ... and similar constructs. E.g.

      package Foo::Bar 1.23;
      # $Foo::Bar::VERSION == 1.23

There are several advantages to this:

p5111-Modules and Pragmata

p5111-Updated Modules

p5111-New Documentation

p5111-Changes to Existing Documentation

p5111-Documentation for $1 in perlvar.pod clarified

p5111-Performance Enhancements

p5111-if (%foo) has been optimized to be faster than if (keys %foo)

p5111-Platform Specific Notes

p5111-Darwin (Mac OS X)
p5111-DragonFly BSD
p5111-Win32

p5111-Selected Bug Fixes

p5111-New or Changed Diagnostics

p5111-Testing

p5111-Known Problems

p5111-Untriaged test crashes on Windows 2000

Several porters have reported mysterious crashes when Perl's entire test suite is run after a build on certain Windows 2000 systems. When run by hand, the individual tests reportedly work fine.

p5111-Known test failures on VMS

Perl 5.11.1 fails a small set of core and CPAN tests as of this release. With luck, that'll be sorted out for 5.11.2

p5111-Errata for 5.11.0

p5111-The Perl 5.11.0 release notes incorrectly described 'delete local'

p5111-Acknowledgements

Perl 5.11.1 represents approximately 3 weeks development since Perl 5.11.0 contains 22,000 lines of changes across 396 files from 26 authors and committers:

Abigail, Alex Vandiver, brian d foy, Chris Williams, Craig A. Berry, David Fifield, David Golden, demerphq, Eric Brine, Geoffrey T. Dairiki, George Greer, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Josh ben Jore, Max Maischein, Nicholas Clark, Rafael Garcia-Suarez, Simon Schubert, Sisyphus, Smylers, Steve Hay, Steve Peters, Vincent Pit and Yves Orton.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

p5111-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5111-SEE ALSO

The Changes file for an explanation of how to view 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.

p5110-NAME

perl5110delta - what is new for perl v5.11.0

p5110-DESCRIPTION

This document describes differences between the 5.10.0 release and the 5.11.0 development release.

p5110-Incompatible Changes

p5110-Unicode interpretation of \w, \d, \s, and the POSIX character classes redefined.

Previous versions of Perl tried to map POSIX style character class definitions onto Unicode property names so that patterns would "dwim" when matches were made against latin-1 or unicode strings. This proved to be a mistake, breaking character class negation, causing forward compatibility problems (as Unicode keeps updating their property definitions and adding new characters), and other problems.

Therefore we have now defined a new set of artificial "unicode" property names which will be used to do unicode matching of patterns using POSIX style character classes and perl short-form escape character classes like \w and \d.

The key change here is that \d will no longer match every digit in the unicode standard (there are thousands) nor will \w match every word character in the standard, instead they will match precisely their POSIX or Perl definition.

Those needing to match based on Unicode properties can continue to do so by using the \p{} syntax to match whichever property they like, including the new artificial definitions.

NOTE: This is a backwards incompatible no-warning change in behaviour. If you are upgrading and you process large volumes of text look for POSIX and Perl style character classes and change them to the relevant property name (by removing the word 'Posix' from the current name).

The following table maps the POSIX character class names, the escapes and the old and new Unicode property mappings:

    POSIX  Esc  Class               New-Property  ! Old-Property
    ----------------------------------------------+-------------
    alnum       [0-9A-Za-z]         IsPosixAlnum  ! IsAlnum
    alpha       [A-Za-z]            IsPosixAlpha  ! IsAlpha
    ascii       [\000-\177]         IsASCII       = IsASCII
    blank       [\011 ]             IsPosixBlank  !
    cntrl       [\0-\37\177]        IsPosixCntrl  ! IsCntrl
    digit   \d  [0-9]               IsPosixDigit  ! IsDigit
    graph       [!-~]               IsPosixGraph  ! IsGraph
    lower       [a-z]               IsPosixLower  ! IsLower
    print       [ -~]               IsPosixPrint  ! IsPrint
    punct       [!-/:-@[-`{-~]      IsPosixPunct  ! IsPunct
    space       [\11-\15 ]          IsPosixSpace  ! IsSpace
            \s  [\11\12\14\15 ]     IsPerlSpace   ! IsSpacePerl
    upper       [A-Z]               IsPosixUpper  ! IsUpper
    word    \w  [0-9A-Z_a-z]        IsPerlWord    ! IsWord
    xdigit      [0-9A-Fa-f]         IsXDigit      = IsXDigit

If you wish to build perl with the old mapping you may do so by setting

        #define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1

in regcomp.h, and then setting

        PERL_TEST_LEGACY_POSIX_CC

to true your environment when testing.

p5110-@INC reorganization

In @INC, ARCHLIB and PRIVLIB now occur after after the current version's site_perl and vendor_perl.

p5110-Switch statement changes

The handling of complex expressions by the given/when switch statement has been enhanced. These enhancements are also available in 5.10.1 and subsequent 5.10 releases. There are two new cases where when now interprets its argument as a boolean, instead of an expression to be used in a smart match:

p5110-flip-flop operators

The .. and ... flip-flop operators are now evaluated in boolean context, following their usual semantics; see "Range Operators" in perlop.

Note that, as in perl 5.10.0, when (1..10) will not work to test whether a given value is an integer between 1 and 10; you should use when ([1..10]) instead (note the array reference).

However, contrary to 5.10.0, evaluating the flip-flop operators in boolean context ensures it can now be useful in a when(), notably for implementing bistable conditions, like in:

    when (/^=begin/ .. /^=end/) {
      # do something
    }
p5110-defined-or operator

A compound expression involving the defined-or operator, as in when (expr1 // expr2), will be treated as boolean if the first expression is boolean. (This just extends the existing rule that applies to the regular or operator, as in when (expr1 || expr2).)

The next section details more changes brought to the semantics to the smart match operator, that naturally also modify the behaviour of the switch statements where smart matching is implicitly used. These changers were also made for the 5.10.1 release, and will remain in subsequent 5.10 releases.

p5110-Smart match changes

p5110-Changes to type-based dispatch

The smart match operator ~~ is no longer commutative. The behaviour of a smart match now depends primarily on the type of its right hand argument. Moreover, its semantics have been adjusted for greater consistency or usefulness in several cases. While the general backwards compatibility is maintained, several changes must be noted:

The full dispatch table for the smart match operator is given in "Smart matching in detail" in perlsyn.

p5110-Smart match and overloading

According to the rule of dispatch based on the rightmost argument type, when an object overloading ~~ appears on the right side of the operator, the overload routine will always be called (with a 3rd argument set to a true value, see overload.) However, when the object will appear on the left, the overload routine will be called only when the rightmost argument is a simple scalar. This way distributivity of smart match across arrays is not broken, as well as the other behaviours with complex types (coderefs, hashes, regexes). Thus, writers of overloading routines for smart match mostly need to worry only with comparing against a scalar, and possibly with stringification overloading; the other common cases will be automatically handled consistently.

~~ will now refuse to work on objects that do not overload it (in order to avoid relying on the object's underlying structure). (However, if the object overloads the stringification or the numification operators, and if overload fallback is active, it will be used instead, as usual.)

p5110-Labels can't be keywords

Labels used as targets for the goto, last, next or redo statements cannot be keywords anymore. This restriction will prevent potential confusion between the goto LABEL and goto EXPR syntaxes: for example, a statement like goto print would jump to a label whose name would be the return value of print(), (usually 1), instead of a label named print. Moreover, the other control flow statements would just ignore any keyword passed to them as a label name. Since such labels cannot be defined anymore, this kind of error will be avoided.

p5110-Other incompatible changes

p5110-Core Enhancements

p5110-Unicode Character Database 5.1.0

The copy of the Unicode Character Database included in Perl 5.11.0 has been updated to 5.1.0 from 5.0.0. See http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes for the notable changes.

p5110-A proper interface for pluggable Method Resolution Orders

As of Perl 5.11.0 there is a new interface for plugging and using method resolution orders other than the default (linear depth first search). The C3 method resolution order added in 5.10.0 has been re-implemented as a plugin, without changing its Perl-space interface. See perlmroapi for more information.

p5110-The overloading pragma

This pragma allows you to lexically disable or enable overloading for some or all operations. (Yuval Kogman)

p5110-\N regex escape

A new regex escape has been added, \N. It will match any character that is not a newline, independently from the presence or absence of the single line match modifier /s. (If \N is followed by an opening brace and by a letter, perl will still assume that a Unicode character name is coming, so compatibility is preserved.) (Rafael Garcia-Suarez)

p5110-Implicit strictures

Using the use VERSION syntax with a version number greater or equal to 5.11.0 will also lexically enable strictures just like use strict would do (in addition to enabling features.) So, the following:

    use 5.11.0;

will now imply:

    use strict;
    use feature ':5.11';

p5110-Parallel tests

The core distribution can now run its regression tests in parallel on Unix-like platforms. Instead of running make test, set TEST_JOBS in your environment to the number of tests to run in parallel, and run make test_harness. On a Bourne-like shell, this can be done as

    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel

An environment variable is used, rather than parallel make itself, because TAP::Harness needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to make utilities to interact with their job schedulers.

Note that currently some test scripts may fail when run in parallel (most notably ext/IO/t/io_dir.t). If necessary run just the failing scripts again sequentially and see if the failures go away.

p5110-The ... operator

A new operator, ..., nicknamed the Yada Yada operator, has been added. It is intended to mark placeholder code, that is not yet implemented. See "Yada Yada Operator" in perlop. (chromatic)

p5110-DTrace support

Some support for DTrace has been added. See "DTrace support" in INSTALL.

p5110-Support for configure_requires in CPAN module metadata

Both CPAN and CPANPLUS now support the configure_requires keyword in the META.yml metadata file included in most recent CPAN distributions. This allows distribution authors to specify configuration prerequisites that must be installed before running Makefile.PL or Build.PL.

See the documentation for ExtUtils::MakeMaker or Module::Build for more on how to specify configure_requires when creating a distribution for CPAN.

p5110-each is now more flexible

The each function can now operate on arrays.

p5110-Y2038 compliance

Perl's core time-related functions are now Y2038 compliant. (With 29 years to spare!)

p5110-$, flexibility

The variable $, may now be tied.

p5110-// in where clauses

// now behaves like || in when clauses

p5110-Enabling warnings from your shell environment

You can now set -W from the PERL5OPT environment variable

p5110-delete local

delete local now allows you to locally delete a hash entry.

p5110-New support for Abstract namespace sockets

Abstract namespace sockets are Linux-specific socket type that live in AF_UNIX family, slightly abusing it to be able to use arbitrary character arrays as addresses: They start with nul byte and are not terminated by nul byte, but with the length passed to the socket() system call.

p5110-Modules and Pragmata

p5110-Dual-lifed modules moved

Dual-lifed modules maintained primarily in the Perl core now live in dist/. Dual-lifed modules maintained primarily on CPAN now live in cpan/

In previous releases of Perl, it was customary to enumerate all module changes in this section of the perldelta file. From 5.11.0 forward only notable updates (such as new or deprecated modules ) will be listed in this section. For a complete reference to the versions of modules shipped in a given release of perl, please see Module::CoreList.

p5110-New Modules and Pragmata

p5110-autodie

This is a new lexically-scoped alternative for the Fatal module. The bundled version is 2.06_01. Note that in this release, using a string eval when autodie is in effect can cause the autodie behaviour to leak into the surrounding scope. See "BUGS" in autodie for more details.

p5110-Compress::Raw::Bzip2

This has been added to the core (version 2.020).

p5110-parent

This pragma establishes an ISA relationship with base classes at compile time. It provides the key feature of base without the feature creep.

p5110-Parse::CPAN::Meta

This has been added to the core (version 1.39).

p5110-Pragmata Changes

p5110-overloading

See "p5110-The overloading pragma" above.

p5110-attrs

The attrs pragma has been removed. It had been marked as deprecated since 5.6.0.

p5110-charnames

The Unicode NameAliases.txt database file has been added. This has the effect of adding some extra \N character names that formerly wouldn't have been recognised; for example, "\N{LATIN CAPITAL LETTER GHA}".

p5110-feature

The meaning of the :5.10 and :5.10.X feature bundles has changed slightly. The last component, if any (i.e. X) is simply ignored. This is predicated on the assumption that new features will not, in general, be added to maintenance releases. So :5.10 and :5.10.X have identical effect. This is a change to the behaviour documented for 5.10.0.

p5110-mro

Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40% faster - see "p5110-Performance Enhancements" below.

mro is now implemented as an XS extension. The documented interface has not changed. Code relying on the implementation detail that some mro:: methods happened to be available at all times gets to "keep both pieces".

p5110-Updated Modules

p5110-ExtUtils::MakeMaker

Upgraded from version 6.42 to 6.55_02.

Note that ExtUtils::MakeMaker::bytes and ExtUtils::MakeMaker::vmsish have been removed from this distribution.

p5110-Test::Harness

Upgraded from version 2.64 to 3.17.

Note that one side-effect of the 2.x to 3.x upgrade is that the experimental Test::Harness::Straps module (and its supporting Assert, Iterator, Point and Results modules) have been removed. If you still need this, then they are available in the (unmaintained) Test-Harness-Straps distribution on CPAN.

p5110-UNIVERSAL

Upgraded from version 1.04 to 1.05.

UNIVERSAL->import() is now deprecated.

p5110-Utility Changes

p5110-h2ph

Now looks in include-fixed too, which is a recent addition to gcc's search path.

p5110-h2xs

No longer incorrectly treats enum values like macros (Daniel Burr).

Now handles C++ style constants (//) properly in enums. (A patch from Rainer Weikusat was used; Daniel Burr also proposed a similar fix).

p5110-perl5db.pl

LVALUE subroutines now work under the debugger.

The debugger now correctly handles proxy constant subroutines, and subroutine stubs.

p5110-perlbug

perlbug now uses %Module::CoreList::bug_tracker to print out upstream bug tracker URLs.

Where the user names a module that their bug report is about, and we know the URL for its upstream bug tracker, provide a message to the user explaining that the core copies the CPAN version directly, and provide the URL for reporting the bug directly to upstream.

p5110-perlthanks

Perl 5.11.0 added a new utility perlthanks, which is a variant of perlbug, but for sending non-bug-reports to the authors and maintainers of Perl. Getting nothing but bug reports can become a bit demoralising: we'll see if this changes things.

p5110-New Documentation

p5110-perlhaiku

This contains instructions on how to build perl for the Haiku platform.

p5110-perlmroapi

This describes the new interface for pluggable Method Resolution Orders.

p5110-perlperf

This document, by Richard Foley, provides an introduction to the use of performance and optimization techniques which can be used with particular reference to perl programs.

p5110-perlrepository

This describes how to access the perl source using the git version control system.

p5110-Changes to Existing Documentation

The various large Changes* files (which listed every change made to perl over the last 18 years) have been removed, and replaced by a small file, also called Changes, which just explains how that same information may be extracted from the git version control system.

The file Porting/patching.pod has been deleted, as it mainly described interacting with the old Perforce-based repository, which is now obsolete. Information still relevant has been moved to perlrepository.

perlapi, perlintern, perlmodlib and perltoc are now all generated at build time, rather than being shipped as part of the release.

p5110-Performance Enhancements

p5110-Installation and Configuration Improvements

p5110-ext/ reorganisation

The layout of directories in ext has been revised. Specifically, all extensions are now flat, and at the top level, with / in pathnames replaced by -, so that ext/Data/Dumper/ is now ext/Data-Dumper/, etc. The names of the extensions as specified to Configure, and as reported by %Config::Config under the keys dynamic_ext, known_extensions, nonxs_ext and static_ext have not changed, and still use /. Hence this change will not have any affect once perl is installed. Safe has been split out from being part of Opcode, and mro is now an extension in its own right.

Nearly all dual-life modules have been moved from lib to ext, and will now appear as known nonxs_ext. This will made no difference to the structure of an installed perl, nor will the modules installed differ, unless you run Configure with options to specify an exact list of extensions to build. In this case, you will rapidly become aware that you need to add to your list, because various modules needed to complete the build, such as ExtUtils::ParseXS, have now become extensions, and without them the build will fail well before it attempts to run the regression tests.

p5110-Configuration improvements

If vendorlib and vendorarch are the same, then they are only added to @INC once.

$Config{usedevel} and the C-level PERL_USE_DEVEL are now defined if perl is built with -Dusedevel.

Configure will enable use of -fstack-protector, to provide protection against stack-smashing attacks, if the compiler supports it.

Configure will now determine the correct prototypes for re-entrant functions, and for gconvert, if you are using a C++ compiler rather than a C compiler.

On Unix, if you build from a tree containing a git repository, the configuration process will note the commit hash you have checked out, for display in the output of perl -v and perl -V. Unpushed local commits are automatically added to the list of local patches displayed by perl -V.

p5110-Compilation improvements

As part of the flattening of ext, all extensions on all platforms are built by make_ext.pl. This replaces the Unix-specific ext/util/make_ext, VMS-specific make_ext.com and Win32-specific win32/buildext.pl.

p5110-Platform Specific Changes

p5110-AIX

Removed libbsd for AIX 5L and 6.1. Only flock() was used from libbsd.

Removed libgdbm for AIX 5L and 6.1. The libgdbm is delivered as an optional package with the AIX Toolbox. Unfortunately the 64 bit version is broken.

Hints changes mean that AIX 4.2 should work again.

p5110-Cygwin

On Cygwin we now strip the last number from the DLL. This has been the behaviour in the cygwin.com build for years. The hints files have been updated.

p5110-DomainOS

Support for Apollo DomainOS was removed in Perl 5.11.0

p5110-FreeBSD

The hints files now identify the correct threading libraries on FreeBSD 7 and later.

p5110-Irix

We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: cc -E - unfortunately goes into K&R mode, but cc -E file.c doesn't.

p5110-Haiku

Patches from the Haiku maintainers have been merged in. Perl should now build on Haiku.

p5110-MachTen

Support for Tenon Intersystems MachTen Unix layer for MacOS Classic was removed in Perl 5.11.0

p5110-MiNT

Support for Atari MiNT was removed in Perl 5.11.0.

p5110-MirOS BSD

Perl should now build on MirOS BSD.

p5110-NetBSD

Hints now supports versions 5.*.

p5110-Stratus VOS

Various changes from Stratus have been merged in.

p5110-Symbian

There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.

p5110-Win32

Improved message window handling means that alarm and kill messages will no longer be dropped under race conditions.

p5110-VMS

Reads from the in-memory temporary files of PerlIO::scalar used to fail if $/ was set to a numeric reference (to indicate record-style reads). This is now fixed.

VMS now supports getgrgid.

Many improvements and cleanups have been made to the VMS file name handling and conversion code.

Enabling the PERL_VMS_POSIX_EXIT logical name now encodes a POSIX exit status in a VMS condition value for better interaction with GNV's bash shell and other utilities that depend on POSIX exit values. See "$?" in perlvms for details.

File::Copy now detects Unix compatibility mode on VMS.

p5110-Selected Bug Fixes

p5110-New or Changed Diagnostics

p5110-panic: sv_chop %s

This new fatal error occurs when the C routine Perl_sv_chop() was passed a position that is not within the scalar's string buffer. This could be caused by buggy XS code, and at this point recovery is not possible.

p5110-Can't locate package %s for the parents of %s

This warning has been removed. In general, it only got produced in conjunction with other warnings, and removing it allowed an ISA lookup optimisation to be added.

p5110-v-string in use/require is non-portable

This warning has been removed.

p5110-Deep recursion on subroutine "%s"

It is now possible to change the depth threshold for this warning from the default of 100, by recompiling the perl binary, setting the C pre-processor macro PERL_SUB_DEPTH_WARN to the desired value.

p5110-Changed Internals

p5110-New Tests

Many modules updated from CPAN incorporate new tests.

Several tests that have the potential to hang forever if they fail now incorporate a "watchdog" functionality that will kill them after a timeout, which helps ensure that make test and make test_harness run to completion automatically. (Jerry Hedden).

Some core-specific tests have been added:

p5110-t/comp/retainedlines.t

Check that the debugger can retain source lines from eval.

p5110-t/io/perlio_fail.t

Check that bad layers fail.

p5110-t/io/perlio_leaks.t

Check that PerlIO layers are not leaking.

p5110-t/io/perlio_open.t

Check that certain special forms of open work.

p5110-t/io/perlio.t

General PerlIO tests.

p5110-t/io/pvbm.t

Check that there is no unexpected interaction between the internal types PVBM and PVGV.

p5110-t/mro/package_aliases.t

Check that mro works properly in the presence of aliased packages.

p5110-t/op/dbm.t

Tests for dbmopen and dbmclose.

p5110-t/op/index_thr.t

Tests for the interaction of index and threads.

p5110-t/op/pat_thr.t

Tests for the interaction of esoteric patterns and threads.

p5110-t/op/qr_gc.t

Test that qr doesn't leak.

p5110-t/op/reg_email_thr.t

Tests for the interaction of regex recursion and threads.

p5110-t/op/regexp_qr_embed_thr.t

Tests for the interaction of patterns with embedded qr// and threads.

p5110-t/op/regexp_unicode_prop.t

Tests for Unicode properties in regular expressions.

p5110-t/op/regexp_unicode_prop_thr.t

Tests for the interaction of Unicode properties and threads.

p5110-t/op/reg_nc_tie.t

Test the tied methods of Tie::Hash::NamedCapture.

p5110-t/op/reg_posixcc.t

Check that POSIX character classes behave consistently.

p5110-t/op/re.t

Check that exportable re functions in universal.c work.

p5110-t/op/setpgrpstack.t

Check that setpgrp works.

p5110-t/op/substr_thr.t

Tests for the interaction of substr and threads.

p5110-t/op/upgrade.t

Check that upgrading and assigning scalars works.

p5110-t/uni/lex_utf8.t

Check that Unicode in the lexer works.

p5110-t/uni/tie.t

Check that Unicode and tie work.

p5110-Known Problems

This is a list of some significant unfixed bugs, which are regressions from either 5.10.0 or 5.8.x.

p5110-Deprecations

The following items are now deprecated.

p5110-Acknowledgements

Some of the work in this release was funded by a TPF grant funded by Dijkmat BV, The Netherlands.

Steffen Mueller and David Golden in particular helped getting CPAN modules polished and synchronised with their in-core equivalents.

Craig Berry was tireless in getting maint to run under VMS, no matter how many times we broke it for him.

The other core committers contributed most of the changes, and applied most of the patches sent in by the hundreds of contributors listed in AUTHORS.

Much of the work of categorizing changes in this perldelta file was contributed by the following porters using changelogger.bestpractical.com:

Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc, anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken, Mark Fowler, chorny, anonymous, tmtm

Finally, thanks to Larry Wall, without whom none of this would be necessary.

p5110-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5110-SEE ALSO

The Changes file for an explanation of how to view 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.

p5101-NAME

perl5101delta - what is new for perl v5.10.1

p5101-DESCRIPTION

This document describes differences between the 5.10.0 release and the 5.10.1 release.

If you are upgrading from an earlier release such as 5.8.8, first read the "p5100-NAME", which describes differences between 5.8.8 and 5.10.0

p5101-Incompatible Changes

p5101-Switch statement changes

The handling of complex expressions by the given/when switch statement has been enhanced. There are two new cases where when now interprets its argument as a boolean, instead of an expression to be used in a smart match:

p5101-flip-flop operators

The .. and ... flip-flop operators are now evaluated in boolean context, following their usual semantics; see "Range Operators" in perlop.

Note that, as in perl 5.10.0, when (1..10) will not work to test whether a given value is an integer between 1 and 10; you should use when ([1..10]) instead (note the array reference).

However, contrary to 5.10.0, evaluating the flip-flop operators in boolean context ensures it can now be useful in a when(), notably for implementing bistable conditions, like in:

    when (/^=begin/ .. /^=end/) {
      # do something
    }
p5101-defined-or operator

A compound expression involving the defined-or operator, as in when (expr1 // expr2), will be treated as boolean if the first expression is boolean. (This just extends the existing rule that applies to the regular or operator, as in when (expr1 || expr2).)

The next section details more changes brought to the semantics to the smart match operator, that naturally also modify the behaviour of the switch statements where smart matching is implicitly used.

p5101-Smart match changes

p5101-Changes to type-based dispatch

The smart match operator ~~ is no longer commutative. The behaviour of a smart match now depends primarily on the type of its right hand argument. Moreover, its semantics have been adjusted for greater consistency or usefulness in several cases. While the general backwards compatibility is maintained, several changes must be noted:

The full dispatch table for the smart match operator is given in "Smart matching in detail" in perlsyn.

p5101-Smart match and overloading

According to the rule of dispatch based on the rightmost argument type, when an object overloading ~~ appears on the right side of the operator, the overload routine will always be called (with a 3rd argument set to a true value, see overload.) However, when the object will appear on the left, the overload routine will be called only when the rightmost argument is a simple scalar. This way distributivity of smart match across arrays is not broken, as well as the other behaviours with complex types (coderefs, hashes, regexes). Thus, writers of overloading routines for smart match mostly need to worry only with comparing against a scalar, and possibly with stringification overloading; the other common cases will be automatically handled consistently.

~~ will now refuse to work on objects that do not overload it (in order to avoid relying on the object's underlying structure). (However, if the object overloads the stringification or the numification operators, and if overload fallback is active, it will be used instead, as usual.)

p5101-Other incompatible changes

p5101-Core Enhancements

p5101-Unicode Character Database 5.1.0

The copy of the Unicode Character Database included in Perl 5.10.1 has been updated to 5.1.0 from 5.0.0. See http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes for the notable changes.

p5101-A proper interface for pluggable Method Resolution Orders

As of Perl 5.10.1 there is a new interface for plugging and using method resolution orders other than the default (linear depth first search). The C3 method resolution order added in 5.10.0 has been re-implemented as a plugin, without changing its Perl-space interface. See perlmroapi for more information.

p5101-The overloading pragma

This pragma allows you to lexically disable or enable overloading for some or all operations. (Yuval Kogman)

p5101-Parallel tests

The core distribution can now run its regression tests in parallel on Unix-like platforms. Instead of running make test, set TEST_JOBS in your environment to the number of tests to run in parallel, and run make test_harness. On a Bourne-like shell, this can be done as

    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel

An environment variable is used, rather than parallel make itself, because TAP::Harness needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to make utilities to interact with their job schedulers.

Note that currently some test scripts may fail when run in parallel (most notably ext/IO/t/io_dir.t). If necessary run just the failing scripts again sequentially and see if the failures go away.

p5101-DTrace support

Some support for DTrace has been added. See "DTrace support" in INSTALL.

p5101-Support for configure_requires in CPAN module metadata

Both CPAN and CPANPLUS now support the configure_requires keyword in the META.yml metadata file included in most recent CPAN distributions. This allows distribution authors to specify configuration prerequisites that must be installed before running Makefile.PL or Build.PL.

See the documentation for ExtUtils::MakeMaker or Module::Build for more on how to specify configure_requires when creating a distribution for CPAN.

p5101-Modules and Pragmata

p5101-New Modules and Pragmata

p5101-autodie

This is a new lexically-scoped alternative for the Fatal module. The bundled version is 2.06_01. Note that in this release, using a string eval when autodie is in effect can cause the autodie behaviour to leak into the surrounding scope. See "BUGS" in autodie for more details.

p5101-Compress::Raw::Bzip2

This has been added to the core (version 2.020).

p5101-parent

This pragma establishes an ISA relationship with base classes at compile time. It provides the key feature of base without the feature creep.

p5101-Parse::CPAN::Meta

This has been added to the core (version 1.39).

p5101-Pragmata Changes

p5101-attributes

Upgraded from version 0.08 to 0.09.

p5101-attrs

Upgraded from version 1.02 to 1.03.

p5101-base

Upgraded from version 2.13 to 2.14. See parent for a replacement.

p5101-bigint

Upgraded from version 0.22 to 0.23.

p5101-bignum

Upgraded from version 0.22 to 0.23.

p5101-bigrat

Upgraded from version 0.22 to 0.23.

p5101-charnames

Upgraded from version 1.06 to 1.07.

The Unicode NameAliases.txt database file has been added. This has the effect of adding some extra \N character names that formerly wouldn't have been recognised; for example, "\N{LATIN CAPITAL LETTER GHA}".

p5101-constant

Upgraded from version 1.13 to 1.17.

p5101-feature

The meaning of the :5.10 and :5.10.X feature bundles has changed slightly. The last component, if any (i.e. X) is simply ignored. This is predicated on the assumption that new features will not, in general, be added to maintenance releases. So :5.10 and :5.10.X have identical effect. This is a change to the behaviour documented for 5.10.0.

p5101-fields

Upgraded from version 2.13 to 2.14 (this was just a version bump; there were no functional changes).

p5101-lib

Upgraded from version 0.5565 to 0.62.

p5101-open

Upgraded from version 1.06 to 1.07.

p5101-overload

Upgraded from version 1.06 to 1.07.

p5101-overloading

See "p5101-The overloading pragma" above.

p5101-version

Upgraded from version 0.74 to 0.77.

p5101-Updated Modules

p5101-Archive::Extract

Upgraded from version 0.24 to 0.34.

p5101-Archive::Tar

Upgraded from version 1.38 to 1.52.

p5101-Attribute::Handlers

Upgraded from version 0.79 to 0.85.

p5101-AutoLoader

Upgraded from version 5.63 to 5.68.

p5101-AutoSplit

Upgraded from version 1.05 to 1.06.

p5101-B

Upgraded from version 1.17 to 1.22.

p5101-B::Debug

Upgraded from version 1.05 to 1.11.

p5101-B::Deparse

Upgraded from version 0.83 to 0.89.

p5101-B::Lint

Upgraded from version 1.09 to 1.11.

p5101-B::Xref

Upgraded from version 1.01 to 1.02.

p5101-Benchmark

Upgraded from version 1.10 to 1.11.

p5101-Carp

Upgraded from version 1.08 to 1.11.

p5101-CGI

Upgraded from version 3.29 to 3.43. (also includes the "default_value for popup_menu()" fix from 3.45).

p5101-Compress::Zlib

Upgraded from version 2.008 to 2.020.

p5101-CPAN

Upgraded from version 1.9205 to 1.9402. CPAN::FTP has a local fix to stop it being too verbose on download failure.

p5101-CPANPLUS

Upgraded from version 0.84 to 0.88.

p5101-CPANPLUS::Dist::Build

Upgraded from version 0.06_02 to 0.36.

p5101-Cwd

Upgraded from version 3.25_01 to 3.30.

p5101-Data::Dumper

Upgraded from version 2.121_14 to 2.124.

p5101-DB

Upgraded from version 1.01 to 1.02.

p5101-DB_File

Upgraded from version 1.816_1 to 1.820.

p5101-Devel::PPPort

Upgraded from version 3.13 to 3.19.

p5101-Digest::MD5

Upgraded from version 2.36_01 to 2.39.

p5101-Digest::SHA

Upgraded from version 5.45 to 5.47.

p5101-DirHandle

Upgraded from version 1.01 to 1.03.

p5101-Dumpvalue

Upgraded from version 1.12 to 1.13.

p5101-DynaLoader

Upgraded from version 1.08 to 1.10.

p5101-Encode

Upgraded from version 2.23 to 2.35.

p5101-Errno

Upgraded from version 1.10 to 1.11.

p5101-Exporter

Upgraded from version 5.62 to 5.63.

p5101-ExtUtils::CBuilder

Upgraded from version 0.21 to 0.2602.

p5101-ExtUtils::Command

Upgraded from version 1.13 to 1.16.

p5101-ExtUtils::Constant

Upgraded from 0.20 to 0.22. (Note that neither of these versions are available on CPAN.)

p5101-ExtUtils::Embed

Upgraded from version 1.27 to 1.28.

p5101-ExtUtils::Install

Upgraded from version 1.44 to 1.54.

p5101-ExtUtils::MakeMaker

Upgraded from version 6.42 to 6.55_02.

Note that ExtUtils::MakeMaker::bytes and ExtUtils::MakeMaker::vmsish have been removed from this distribution.

p5101-ExtUtils::Manifest

Upgraded from version 1.51_01 to 1.56.

p5101-ExtUtils::ParseXS

Upgraded from version 2.18_02 to 2.2002.

p5101-Fatal

Upgraded from version 1.05 to 2.06_01. See also the new pragma autodie.

p5101-File::Basename

Upgraded from version 2.76 to 2.77.

p5101-File::Compare

Upgraded from version 1.1005 to 1.1006.

p5101-File::Copy

Upgraded from version 2.11 to 2.14.

p5101-File::Fetch

Upgraded from version 0.14 to 0.20.

p5101-File::Find

Upgraded from version 1.12 to 1.14.

p5101-File::Path

Upgraded from version 2.04 to 2.07_03.

p5101-File::Spec

Upgraded from version 3.2501 to 3.30.

p5101-File::stat

Upgraded from version 1.00 to 1.01.

p5101-File::Temp

Upgraded from version 0.18 to 0.22.

p5101-FileCache

Upgraded from version 1.07 to 1.08.

p5101-FileHandle

Upgraded from version 2.01 to 2.02.

p5101-Filter::Simple

Upgraded from version 0.82 to 0.84.

p5101-Filter::Util::Call

Upgraded from version 1.07 to 1.08.

p5101-FindBin

Upgraded from version 1.49 to 1.50.

p5101-GDBM_File

Upgraded from version 1.08 to 1.09.

p5101-Getopt::Long

Upgraded from version 2.37 to 2.38.

p5101-Hash::Util::FieldHash

Upgraded from version 1.03 to 1.04. This fixes a memory leak.

p5101-I18N::Collate

Upgraded from version 1.00 to 1.01.

p5101-IO

Upgraded from version 1.23_01 to 1.25.

This makes non-blocking mode work on Windows in IO::Socket::INET [CPAN #43573].

p5101-IO::Compress::*

Upgraded from version 2.008 to 2.020.

p5101-IO::Dir

Upgraded from version 1.06 to 1.07.

p5101-IO::Handle

Upgraded from version 1.27 to 1.28.

p5101-IO::Socket

Upgraded from version 1.30_01 to 1.31.

p5101-IO::Zlib

Upgraded from version 1.07 to 1.09.

p5101-IPC::Cmd

Upgraded from version 0.40_1 to 0.46.

p5101-IPC::Open3

Upgraded from version 1.02 to 1.04.

p5101-IPC::SysV

Upgraded from version 1.05 to 2.01.

p5101-lib

Upgraded from version 0.5565 to 0.62.

p5101-List::Util

Upgraded from version 1.19 to 1.21.

p5101-Locale::MakeText

Upgraded from version 1.12 to 1.13.

p5101-Log::Message

Upgraded from version 0.01 to 0.02.

p5101-Math::BigFloat

Upgraded from version 1.59 to 1.60.

p5101-Math::BigInt

Upgraded from version 1.88 to 1.89.

p5101-Math::BigInt::FastCalc

Upgraded from version 0.16 to 0.19.

p5101-Math::BigRat

Upgraded from version 0.21 to 0.22.

p5101-Math::Complex

Upgraded from version 1.37 to 1.56.

p5101-Math::Trig

Upgraded from version 1.04 to 1.20.

p5101-Memoize

Upgraded from version 1.01_02 to 1.01_03 (just a minor documentation change).

p5101-Module::Build

Upgraded from version 0.2808_01 to 0.34_02.

p5101-Module::CoreList

Upgraded from version 2.13 to 2.18. This release no longer contains the %Module::CoreList::patchlevel hash.

p5101-Module::Load

Upgraded from version 0.12 to 0.16.

p5101-Module::Load::Conditional

Upgraded from version 0.22 to 0.30.

p5101-Module::Loaded

Upgraded from version 0.01 to 0.02.

p5101-Module::Pluggable

Upgraded from version 3.6 to 3.9.

p5101-NDBM_File

Upgraded from version 1.07 to 1.08.

p5101-Net::Ping

Upgraded from version 2.33 to 2.36.

p5101-NEXT

Upgraded from version 0.60_01 to 0.64.

p5101-Object::Accessor

Upgraded from version 0.32 to 0.34.

p5101-OS2::REXX

Upgraded from version 1.03 to 1.04.

p5101-Package::Constants

Upgraded from version 0.01 to 0.02.

p5101-PerlIO

Upgraded from version 1.04 to 1.06.

p5101-PerlIO::via

Upgraded from version 0.04 to 0.07.

p5101-Pod::Man

Upgraded from version 2.16 to 2.22.

p5101-Pod::Parser

Upgraded from version 1.35 to 1.37.

p5101-Pod::Simple

Upgraded from version 3.05 to 3.07.

p5101-Pod::Text

Upgraded from version 3.08 to 3.13.

p5101-POSIX

Upgraded from version 1.13 to 1.17.

p5101-Safe

Upgraded from 2.12 to 2.18.

p5101-Scalar::Util

Upgraded from version 1.19 to 1.21.

p5101-SelectSaver

Upgraded from 1.01 to 1.02.

p5101-SelfLoader

Upgraded from 1.11 to 1.17.

p5101-Socket

Upgraded from 1.80 to 1.82.

p5101-Storable

Upgraded from 2.18 to 2.20.

p5101-Switch

Upgraded from version 2.13 to 2.14. Please see "p5101-Deprecations".

p5101-Symbol

Upgraded from version 1.06 to 1.07.

p5101-Sys::Syslog

Upgraded from version 0.22 to 0.27.

p5101-Term::ANSIColor

Upgraded from version 1.12 to 2.00.

p5101-Term::ReadLine

Upgraded from version 1.03 to 1.04.

p5101-Term::UI

Upgraded from version 0.18 to 0.20.

p5101-Test::Harness

Upgraded from version 2.64 to 3.17.

Note that one side-effect of the 2.x to 3.x upgrade is that the experimental Test::Harness::Straps module (and its supporting Assert, Iterator, Point and Results modules) have been removed. If you still need this, then they are available in the (unmaintained) Test-Harness-Straps distribution on CPAN.

p5101-Test::Simple

Upgraded from version 0.72 to 0.92.

p5101-Text::ParseWords

Upgraded from version 3.26 to 3.27.

p5101-Text::Tabs

Upgraded from version 2007.1117 to 2009.0305.

p5101-Text::Wrap

Upgraded from version 2006.1117 to 2009.0305.

p5101-Thread::Queue

Upgraded from version 2.00 to 2.11.

p5101-Thread::Semaphore

Upgraded from version 2.01 to 2.09.

p5101-threads

Upgraded from version 1.67 to 1.72.

p5101-threads::shared

Upgraded from version 1.14 to 1.29.

p5101-Tie::RefHash

Upgraded from version 1.37 to 1.38.

p5101-Tie::StdHandle

This has documentation changes, and has been assigned a version for the first time: version 4.2.

p5101-Time::HiRes

Upgraded from version 1.9711 to 1.9719.

p5101-Time::Local

Upgraded from version 1.18 to 1.1901.

p5101-Time::Piece

Upgraded from version 1.12 to 1.15.

p5101-Unicode::Normalize

Upgraded from version 1.02 to 1.03.

p5101-Unicode::UCD

Upgraded from version 0.25 to 0.27.

charinfo() now works on Unified CJK code points added to later versions of Unicode.

casefold() has new fields returned to provide both a simpler interface and previously missing information. The old fields are retained for backwards compatibility. Information about Turkic-specific code points is now returned.

The documentation has been corrected and expanded.

p5101-UNIVERSAL

Upgraded from version 1.04 to 1.05.

p5101-Win32

Upgraded from version 0.34 to 0.39.

p5101-Win32API::File

Upgraded from version 0.1001_01 to 0.1101.

p5101-XSLoader

Upgraded from version 0.08 to 0.10.

p5101-Utility Changes

p5101-h2ph

Now looks in include-fixed too, which is a recent addition to gcc's search path.

p5101-h2xs

No longer incorrectly treats enum values like macros (Daniel Burr).

Now handles C++ style constants (//) properly in enums. (A patch from Rainer Weikusat was used; Daniel Burr also proposed a similar fix).

p5101-perl5db.pl

LVALUE subroutines now work under the debugger.

The debugger now correctly handles proxy constant subroutines, and subroutine stubs.

p5101-perlthanks

Perl 5.10.1 adds a new utility perlthanks, which is a variant of perlbug, but for sending non-bug-reports to the authors and maintainers of Perl. Getting nothing but bug reports can become a bit demoralising: we'll see if this changes things.

p5101-New Documentation

p5101-perlhaiku

This contains instructions on how to build perl for the Haiku platform.

p5101-perlmroapi

This describes the new interface for pluggable Method Resolution Orders.

p5101-perlperf

This document, by Richard Foley, provides an introduction to the use of performance and optimization techniques which can be used with particular reference to perl programs.

p5101-perlrepository

This describes how to access the perl source using the git version control system.

p5101-perlthanks

This describes the new perlthanks utility.

p5101-Changes to Existing Documentation

The various large Changes* files (which listed every change made to perl over the last 18 years) have been removed, and replaced by a small file, also called Changes, which just explains how that same information may be extracted from the git version control system.

The file Porting/patching.pod has been deleted, as it mainly described interacting with the old Perforce-based repository, which is now obsolete. Information still relevant has been moved to perlrepository.

perlapi, perlintern, perlmodlib and perltoc are now all generated at build time, rather than being shipped as part of the release.

p5101-Performance Enhancements

p5101-Installation and Configuration Improvements

p5101-ext/ reorganisation

The layout of directories in ext has been revised. Specifically, all extensions are now flat, and at the top level, with / in pathnames replaced by -, so that ext/Data/Dumper/ is now ext/Data-Dumper/, etc. The names of the extensions as specified to Configure, and as reported by %Config::Config under the keys dynamic_ext, known_extensions, nonxs_ext and static_ext have not changed, and still use /. Hence this change will not have any affect once perl is installed. However, Attribute::Handlers, Safe and mro have now become extensions in their own right, so if you run Configure with options to specify an exact list of extensions to build, you will need to change it to account for this.

For 5.10.2, it is planned that many dual-life modules will have been moved from lib to ext; again this will have no effect on an installed perl, but will matter if you invoke Configure with a pre-canned list of extensions to build.

p5101-Configuration improvements

If vendorlib and vendorarch are the same, then they are only added to @INC once.

$Config{usedevel} and the C-level PERL_USE_DEVEL are now defined if perl is built with -Dusedevel.

Configure will enable use of -fstack-protector, to provide protection against stack-smashing attacks, if the compiler supports it.

Configure will now determine the correct prototypes for re-entrant functions, and for gconvert, if you are using a C++ compiler rather than a C compiler.

On Unix, if you build from a tree containing a git repository, the configuration process will note the commit hash you have checked out, for display in the output of perl -v and perl -V. Unpushed local commits are automatically added to the list of local patches displayed by perl -V.

p5101-Compilation improvements

As part of the flattening of ext, all extensions on all platforms are built by make_ext.pl. This replaces the Unix-specific ext/util/make_ext, VMS-specific make_ext.com and Win32-specific win32/buildext.pl.

p5101-Platform Specific Changes

p5101-AIX

Removed libbsd for AIX 5L and 6.1. Only flock() was used from libbsd.

Removed libgdbm for AIX 5L and 6.1. The libgdbm is delivered as an optional package with the AIX Toolbox. Unfortunately the 64 bit version is broken.

Hints changes mean that AIX 4.2 should work again.

p5101-Cygwin

On Cygwin we now strip the last number from the DLL. This has been the behaviour in the cygwin.com build for years. The hints files have been updated.

p5101-FreeBSD

The hints files now identify the correct threading libraries on FreeBSD 7 and later.

p5101-Irix

We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: cc -E - unfortunately goes into K&R mode, but cc -E file.c doesn't.

p5101-Haiku

Patches from the Haiku maintainers have been merged in. Perl should now build on Haiku.

p5101-MirOS BSD

Perl should now build on MirOS BSD.

p5101-NetBSD

Hints now supports versions 5.*.

p5101-Stratus VOS

Various changes from Stratus have been merged in.

p5101-Symbian

There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.

p5101-Win32

Improved message window handling means that alarm and kill messages will no longer be dropped under race conditions.

p5101-VMS

Reads from the in-memory temporary files of PerlIO::scalar used to fail if $/ was set to a numeric reference (to indicate record-style reads). This is now fixed.

VMS now supports getgrgid.

Many improvements and cleanups have been made to the VMS file name handling and conversion code.

Enabling the PERL_VMS_POSIX_EXIT logical name now encodes a POSIX exit status in a VMS condition value for better interaction with GNV's bash shell and other utilities that depend on POSIX exit values. See "$?" in perlvms for details.

p5101-Selected Bug Fixes

p5101-New or Changed Diagnostics

p5101-panic: sv_chop %s

This new fatal error occurs when the C routine Perl_sv_chop() was passed a position that is not within the scalar's string buffer. This could be caused by buggy XS code, and at this point recovery is not possible.

p5101-Can't locate package %s for the parents of %s

This warning has been removed. In general, it only got produced in conjunction with other warnings, and removing it allowed an ISA lookup optimisation to be added.

p5101-v-string in use/require is non-portable

This warning has been removed.

p5101-Deep recursion on subroutine "%s"

It is now possible to change the depth threshold for this warning from the default of 100, by recompiling the perl binary, setting the C pre-processor macro PERL_SUB_DEPTH_WARN to the desired value.

p5101-Changed Internals

p5101-New Tests

Many modules updated from CPAN incorporate new tests.

Several tests that have the potential to hang forever if they fail now incorporate a "watchdog" functionality that will kill them after a timeout, which helps ensure that make test and make test_harness run to completion automatically. (Jerry Hedden).

Some core-specific tests have been added:

p5101-t/comp/retainedlines.t

Check that the debugger can retain source lines from eval.

p5101-t/io/perlio_fail.t

Check that bad layers fail.

p5101-t/io/perlio_leaks.t

Check that PerlIO layers are not leaking.

p5101-t/io/perlio_open.t

Check that certain special forms of open work.

p5101-t/io/perlio.t

General PerlIO tests.

p5101-t/io/pvbm.t

Check that there is no unexpected interaction between the internal types PVBM and PVGV.

p5101-t/mro/package_aliases.t

Check that mro works properly in the presence of aliased packages.

p5101-t/op/dbm.t

Tests for dbmopen and dbmclose.

p5101-t/op/index_thr.t

Tests for the interaction of index and threads.

p5101-t/op/pat_thr.t

Tests for the interaction of esoteric patterns and threads.

p5101-t/op/qr_gc.t

Test that qr doesn't leak.

p5101-t/op/reg_email_thr.t

Tests for the interaction of regex recursion and threads.

p5101-t/op/regexp_qr_embed_thr.t

Tests for the interaction of patterns with embedded qr// and threads.

p5101-t/op/regexp_unicode_prop.t

Tests for Unicode properties in regular expressions.

p5101-t/op/regexp_unicode_prop_thr.t

Tests for the interaction of Unicode properties and threads.

p5101-t/op/reg_nc_tie.t

Test the tied methods of Tie::Hash::NamedCapture.

p5101-t/op/reg_posixcc.t

Check that POSIX character classes behave consistently.

p5101-t/op/re.t

Check that exportable re functions in universal.c work.

p5101-t/op/setpgrpstack.t

Check that setpgrp works.

p5101-t/op/substr_thr.t

Tests for the interaction of substr and threads.

p5101-t/op/upgrade.t

Check that upgrading and assigning scalars works.

p5101-t/uni/lex_utf8.t

Check that Unicode in the lexer works.

p5101-t/uni/tie.t

Check that Unicode and tie work.

p5101-Known Problems

This is a list of some significant unfixed bugs, which are regressions from either 5.10.0 or 5.8.x.

p5101-Deprecations

The following items are now deprecated.

p5101-Acknowledgements

Some of the work in this release was funded by a TPF grant.

Nicholas Clark officially retired from maintenance pumpking duty at the end of 2008; however in reality he has put much effort in since then to help get 5.10.1 into a fit state to be released, including writing a considerable chunk of this perldelta.

Steffen Mueller and David Golden in particular helped getting CPAN modules polished and synchronised with their in-core equivalents.

Craig Berry was tireless in getting maint to run under VMS, no matter how many times we broke it for him.

The other core committers contributed most of the changes, and applied most of the patches sent in by the hundreds of contributors listed in AUTHORS.

(Sorry to all the people I haven't mentioned by name).

Finally, thanks to Larry Wall, without whom none of this would be necessary.

p5101-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://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , 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.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

p5101-SEE ALSO

The Changes file for an explanation of how to view 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.

p5100-NAME

perl5100delta - what is new for perl 5.10.0

p5100-DESCRIPTION

This document describes the differences between the 5.8.8 release and the 5.10.0 release.

Many of the bug fixes in 5.10.0 were already seen in the 5.8.X maintenance releases; they are not duplicated here and are documented in the set of man pages named perl58[1-8]?delta.

p5100-Core Enhancements

p5100-The feature pragma

The feature pragma is used to enable new syntax that would break Perl's backwards-compatibility with older releases of the language. It's a lexical pragma, like strict or warnings.

Currently the following new features are available: switch (adds a switch statement), say (adds a say built-in function), and state (adds a state keyword for declaring "static" variables). Those features are described in their own sections of this document.

The feature pragma is also implicitly loaded when you require a minimal perl version (with the use VERSION construct) greater than, or equal to, 5.9.5. See feature for details.

p5100-New -E command-line switch

-E is equivalent to -e, but it implicitly enables all optional features (like use feature ":5.10").

p5100-Defined-or operator

A new operator // (defined-or) has been implemented. The following expression:

    $a // $b

is merely equivalent to

   defined $a ? $a : $b

and the statement

   $c //= $d;

can now be used instead of

   $c = $d unless defined $c;

The // operator has the same precedence and associativity as ||. Special care has been taken to ensure that this operator Do What You Mean while not breaking old code, but some edge cases involving the empty regular expression may now parse differently. See perlop for details.

p5100-Switch and Smart Match operator

Perl 5 now has a switch statement. It's available when use feature 'switch' is in effect. This feature introduces three new keywords, given, when, and default:

    given ($foo) {
        when (/^abc/) { $abc = 1; }
        when (/^def/) { $def = 1; }
        when (/^xyz/) { $xyz = 1; }
        default { $nothing = 1; }
    }

A more complete description of how Perl matches the switch variable against the when conditions is given in "Switch statements" in perlsyn.

This kind of match is called smart match, and it's also possible to use it outside of switch statements, via the new ~~ operator. See "Smart matching in detail" in perlsyn.

This feature was contributed by Robin Houston.

p5100-Regular expressions

p5100-Recursive Patterns

It is now possible to write recursive patterns without using the (??{}) construct. This new way is more efficient, and in many cases easier to read.

Each capturing parenthesis can now be treated as an independent pattern that can be entered by using the (?PARNO) syntax (PARNO standing for "parenthesis number"). For example, the following pattern will match nested balanced angle brackets:

    /
     ^                      # start of line
     (                      # start capture buffer 1
        <                   #   match an opening angle bracket
        (?:                 #   match one of:
            (?>             #     don't backtrack over the inside of this group
                [^<>]+      #       one or more non angle brackets
            )               #     end non backtracking group
        |                   #     ... or ...
            (?1)            #     recurse to bracket 1 and try it again
        )*                  #   0 or more times.
        >                   #   match a closing angle bracket
     )                      # end capture buffer one
     $                      # end of line
    /x

PCRE users should note that Perl's recursive regex feature allows backtracking into a recursed pattern, whereas in PCRE the recursion is atomic or "possessive" in nature. As in the example above, you can add (?>) to control this selectively. (Yves Orton)

p5100-Named Capture Buffers

It is now possible to name capturing parenthesis in a pattern and refer to the captured contents by name. The naming syntax is (?....). It's possible to backreference to a named buffer with the \k syntax. In code, the new magical hashes %+ and %- can be used to access the contents of the capture buffers.

Thus, to replace all doubled chars with a single copy, one could write

    s/(?.)\k/$+{letter}/g

Only buffers with defined contents will be "visible" in the %+ hash, so it's possible to do something like

    foreach my $name (keys %+) {
        print "content of buffer '$name' is $+{$name}\n";
    }

The %- hash is a bit more complete, since it will contain array refs holding values from all capture buffers similarly named, if there should be many of them.

%+ and %- are implemented as tied hashes through the new module Tie::Hash::NamedCapture.

Users exposed to the .NET regex engine will find that the perl implementation differs in that the numerical ordering of the buffers is sequential, and not "unnamed first, then named". Thus in the pattern

   /(A)(?B)(C)(?D)/

$1 will be 'A', $2 will be 'B', $3 will be 'C' and $4 will be 'D' and not $1 is 'A', $2 is 'C' and $3 is 'B' and $4 is 'D' that a .NET programmer would expect. This is considered a feature. :-) (Yves Orton)

p5100-Possessive Quantifiers

Perl now supports the "possessive quantifier" syntax of the "atomic match" pattern. Basically a possessive quantifier matches as much as it can and never gives any back. Thus it can be used to control backtracking. The syntax is similar to non-greedy matching, except instead of using a '?' as the modifier the '+' is used. Thus ?+, *+, ++, {min,max}+ are now legal quantifiers. (Yves Orton)

p5100-Backtracking control verbs

The regex engine now supports a number of special-purpose backtrack control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT), (*FAIL) and (*ACCEPT). See perlre for their descriptions. (Yves Orton)

p5100-Relative backreferences

A new syntax \g{N} or \gN where "N" is a decimal integer allows a safer form of back-reference notation as well as allowing relative backreferences. This should make it easier to generate and embed patterns that contain backreferences. See "Capture buffers" in perlre. (Yves Orton)

p5100-\K escape

The functionality of Jeff Pinyan's module Regexp::Keep has been added to the core. In regular expressions you can now use the special escape \K as a way to do something like floating length positive lookbehind. It is also useful in substitutions like:

  s/(foo)bar/$1/g

that can now be converted to

  s/foo\Kbar//g

which is much more efficient. (Yves Orton)

p5100-Vertical and horizontal whitespace, and linebreak

Regular expressions now recognize the \v and \h escapes that match vertical and horizontal whitespace, respectively. \V and \H logically match their complements.

\R matches a generic linebreak, that is, vertical whitespace, plus the multi-character sequence "\x0D\x0A".

p5100-say()

say() is a new built-in, only available when use feature 'say' is in effect, that is similar to print(), but that implicitly appends a newline to the printed string. See "say" in perlfunc. (Robin Houston)

p5100-Lexical $_

The default variable $_ can now be lexicalized, by declaring it like any other lexical variable, with a simple

    my $_;

The operations that default on $_ will use the lexically-scoped version of $_ when it exists, instead of the global $_.

In a map or a grep block, if $_ was previously my'ed, then the $_ inside the block is lexical as well (and scoped to the block).

In a scope where $_ has been lexicalized, you can still have access to the global version of $_ by using $::_, or, more simply, by overriding the lexical declaration with our $_. (Rafael Garcia-Suarez)

p5100-The _ prototype

A new prototype character has been added. _ is equivalent to $ but defaults to $_ if the corresponding argument isn't supplied (both $ and _ denote a scalar). Due to the optional nature of the argument, you can only use it at the end of a prototype, or before a semicolon.

This has a small incompatible consequence: the prototype() function has been adjusted to return _ for some built-ins in appropriate cases (for example, prototype('CORE::rmdir')). (Rafael Garcia-Suarez)

p5100-UNITCHECK blocks

UNITCHECK, a new special code block has been introduced, in addition to BEGIN, CHECK, INIT and END.

CHECK and INIT blocks, while useful for some specialized purposes, are always executed at the transition between the compilation and the execution of the main program, and thus are useless whenever code is loaded at runtime. On the other hand, UNITCHECK blocks are executed just after the unit which defined them has been compiled. See perlmod for more information. (Alex Gough)

p5100-New Pragma, mro

A new pragma, mro (for Method Resolution Order) has been added. It permits to switch, on a per-class basis, the algorithm that perl uses to find inherited methods in case of a multiple inheritance hierarchy. The default MRO hasn't changed (DFS, for Depth First Search). Another MRO is available: the C3 algorithm. See mro for more information. (Brandon Black)

Note that, due to changes in the implementation of class hierarchy search, code that used to undef the *ISA glob will most probably break. Anyway, undef'ing *ISA had the side-effect of removing the magic on the @ISA array and should not have been done in the first place. Also, the cache *::ISA::CACHE:: no longer exists; to force reset the @ISA cache, you now need to use the mro API, or more simply to assign to @ISA (e.g. with @ISA = @ISA).

p5100-readdir() may return a "short filename" on Windows

The readdir() function may return a "short filename" when the long filename contains characters outside the ANSI codepage. Similarly Cwd::cwd() may return a short directory name, and glob() may return short names as well. On the NTFS file system these short names can always be represented in the ANSI codepage. This will not be true for all other file system drivers; e.g. the FAT filesystem stores short filenames in the OEM codepage, so some files on FAT volumes remain unaccessible through the ANSI APIs.

Similarly, $^X, @INC, and $ENV{PATH} are preprocessed at startup to make sure all paths are valid in the ANSI codepage (if possible).

The Win32::GetLongPathName() function now returns the UTF-8 encoded correct long file name instead of using replacement characters to force the name into the ANSI codepage. The new Win32::GetANSIPathName() function can be used to turn a long pathname into a short one only if the long one cannot be represented in the ANSI codepage.

Many other functions in the Win32 module have been improved to accept UTF-8 encoded arguments. Please see Win32 for details.

p5100-readpipe() is now overridable

The built-in function readpipe() is now overridable. Overriding it permits also to override its operator counterpart, qx// (a.k.a. ``). Moreover, it now defaults to $_ if no argument is provided. (Rafael Garcia-Suarez)

p5100-Default argument for readline()

readline() now defaults to *ARGV if no argument is provided. (Rafael Garcia-Suarez)

p5100-state() variables

A new class of variables has been introduced. State variables are similar to my variables, but are declared with the state keyword in place of my. They're visible only in their lexical scope, but their value is persistent: unlike my variables, they're not undefined at scope entry, but retain their previous value. (Rafael Garcia-Suarez, Nicholas Clark)

To use state variables, one needs to enable them by using

    use feature 'state';

or by using the -E command-line switch in one-liners. See "Persistent Private Variables" in perlsub.

p5100-Stacked filetest operators

As a new form of syntactic sugar, it's now possible to stack up filetest operators. You can now write -f -w -x $file in a row to mean -x $file && -w _ && -f _. See "-X" in perlfunc.

p5100-UNIVERSAL::DOES()

The UNIVERSAL class has a new method, DOES(). It has been added to solve semantic problems with the isa() method. isa() checks for inheritance, while DOES() has been designed to be overridden when module authors use other types of relations between classes (in addition to inheritance). (chromatic)

See "$obj->DOES( ROLE )" in UNIVERSAL.

p5100-Formats

Formats were improved in several ways. A new field, ^*, can be used for variable-width, one-line-at-a-time text. Null characters are now handled correctly in picture lines. Using @# and ~~ together will now produce a compile-time error, as those format fields are incompatible. perlform has been improved, and miscellaneous bugs fixed.

p5100-Byte-order modifiers for pack() and unpack()

There are two new byte-order modifiers, > (big-endian) and < (little-endian), that can be appended to most pack() and unpack() template characters and groups to force a certain byte-order for that type or group. See "pack" in perlfunc and perlpacktut for details.

p5100-no VERSION

You can now use no followed by a version number to specify that you want to use a version of perl older than the specified one.

p5100-chdir, chmod and chown on filehandles

chdir, chmod and chown can now work on filehandles as well as filenames, if the system supports respectively fchdir, fchmod and fchown, thanks to a patch provided by Gisle Aas.

p5100-OS groups

$( and $) now return groups in the order where the OS returns them, thanks to Gisle Aas. This wasn't previously the case.

p5100-Recursive sort subs

You can now use recursive subroutines with sort(), thanks to Robin Houston.

p5100-Exceptions in constant folding

The constant folding routine is now wrapped in an exception handler, and if folding throws an exception (such as attempting to evaluate 0/0), perl now retains the current optree, rather than aborting the whole program. Without this change, programs would not compile if they had expressions that happened to generate exceptions, even though those expressions were in code that could never be reached at runtime. (Nicholas Clark, Dave Mitchell)

p5100-Source filters in @INC

It's possible to enhance the mechanism of subroutine hooks in @INC by adding a source filter on top of the filehandle opened and returned by the hook. This feature was planned a long time ago, but wasn't quite working until now. See "require" in perlfunc for details. (Nicholas Clark)

p5100-New internal variables

p5100-${^RE_DEBUG_FLAGS}

This variable controls what debug flags are in effect for the regular expression engine when running under use re "debug". See re for details.

p5100-${^CHILD_ERROR_NATIVE}

This variable gives the native status returned by the last pipe close, backtick command, successful call to wait() or waitpid(), or from the system() operator. See perlvar for details. (Contributed by Gisle Aas.)

p5100-${^RE_TRIE_MAXBUF}

See "p5100-Trie optimisation of literal string alternations".

p5100-${^WIN32_SLOPPY_STAT}

See "p5100-Sloppy stat on Windows".

p5100-Miscellaneous

unpack() now defaults to unpacking the $_ variable.

mkdir() without arguments now defaults to $_.

The internal dump output has been improved, so that non-printable characters such as newline and backspace are output in \x notation, rather than octal.

The -C option can no longer be used on the #! line. It wasn't working there anyway, since the standard streams are already set up at this point in the execution of the perl interpreter. You can use binmode() instead to get the desired behaviour.

p5100-UCD 5.0.0

The copy of the Unicode Character Database included in Perl 5 has been updated to version 5.0.0.

p5100-MAD

MAD, which stands for Miscellaneous Attribute Decoration, is a still-in-development work leading to a Perl 5 to Perl 6 converter. To enable it, it's necessary to pass the argument -Dmad to Configure. The obtained perl isn't binary compatible with a regular perl 5.10, and has space and speed penalties; moreover not all regression tests still pass with it. (Larry Wall, Nicholas Clark)

p5100-kill() on Windows

On Windows platforms, kill(-9, $pid) now kills a process tree. (On Unix, this delivers the signal to all processes in the same process group.)

p5100-Incompatible Changes

p5100-Packing and UTF-8 strings

The semantics of pack() and unpack() regarding UTF-8-encoded data has been changed. Processing is now by default character per character instead of byte per byte on the underlying encoding. Notably, code that used things like pack("a*", $string) to see through the encoding of string will now simply get back the original $string. Packed strings can also get upgraded during processing when you store upgraded characters. You can get the old behaviour by using use bytes.

To be consistent with pack(), the C0 in unpack() templates indicates that the data is to be processed in character mode, i.e. character by character; on the contrary, U0 in unpack() indicates UTF-8 mode, where the packed string is processed in its UTF-8-encoded Unicode form on a byte by byte basis. This is reversed with regard to perl 5.8.X, but now consistent between pack() and unpack().

Moreover, C0 and U0 can also be used in pack() templates to specify respectively character and byte modes.

C0 and U0 in the middle of a pack or unpack format now switch to the specified encoding mode, honoring parens grouping. Previously, parens were ignored.

Also, there is a new pack() character format, W, which is intended to replace the old C. C is kept for unsigned chars coded as bytes in the strings internal representation. W represents unsigned (logical) character values, which can be greater than 255. It is therefore more robust when dealing with potentially UTF-8-encoded data (as C will wrap values outside the range 0..255, and not respect the string encoding).

In practice, that means that pack formats are now encoding-neutral, except C.

For consistency, A in unpack() format now trims all Unicode whitespace from the end of the string. Before perl 5.9.2, it used to strip only the classical ASCII space characters.

p5100-Byte/character count feature in unpack()

A new unpack() template character, ".", returns the number of bytes or characters (depending on the selected encoding mode, see above) read so far.

p5100-The $* and $# variables have been removed

$*, which was deprecated in favor of the /s and /m regexp modifiers, has been removed.

The deprecated $# variable (output format for numbers) has been removed.

Two new severe warnings, $#/$* is no longer supported, have been added.

p5100-substr() lvalues are no longer fixed-length

The lvalues returned by the three argument form of substr() used to be a "fixed length window" on the original string. In some cases this could cause surprising action at distance or other undefined behaviour. Now the length of the window adjusts itself to the length of the string assigned to it.

p5100-Parsing of -f _

The identifier _ is now forced to be a bareword after a filetest operator. This solves a number of misparsing issues when a global _ subroutine is defined.

p5100-:unique

The :unique attribute has been made a no-op, since its current implementation was fundamentally flawed and not threadsafe.

p5100-Effect of pragmas in eval

The compile-time value of the %^H hint variable can now propagate into eval("")uated code. This makes it more useful to implement lexical pragmas.

As a side-effect of this, the overloaded-ness of constants now propagates into eval("").

p5100-chdir FOO

A bareword argument to chdir() is now recognized as a file handle. Earlier releases interpreted the bareword as a directory name. (Gisle Aas)

p5100-Handling of .pmc files

An old feature of perl was that before require or use look for a file with a .pm extension, they will first look for a similar filename with a .pmc extension. If this file is found, it will be loaded in place of any potentially existing file ending in a .pm extension.

Previously, .pmc files were loaded only if more recent than the matching .pm file. Starting with 5.9.4, they'll be always loaded if they exist.

p5100-$^V is now a version object instead of a v-string

$^V can still be used with the %vd format in printf, but any character-level operations will now access the string representation of the version object and not the ordinals of a v-string. Expressions like substr($^V, 0, 2) or split //, $^V no longer work and must be rewritten.

p5100-@- and @+ in patterns

The special arrays @- and @+ are no longer interpolated in regular expressions. (Sadahiro Tomoyuki)

p5100-$AUTOLOAD can now be tainted

If you call a subroutine by a tainted name, and if it defers to an AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted. (Rick Delaney)

p5100-Tainting and printf

When perl is run under taint mode, printf() and sprintf() will now reject any tainted format argument. (Rafael Garcia-Suarez)

p5100-undef and signal handlers

Undefining or deleting a signal handler via undef $SIG{FOO} is now equivalent to setting it to 'DEFAULT'. (Rafael Garcia-Suarez)

p5100-strictures and dereferencing in defined()

use strict 'refs' was ignoring taking a hard reference in an argument to defined(), as in :

    use strict 'refs';
    my $x = 'foo';
    if (defined $$x) {...}

This now correctly produces the run-time error Can't use string as a SCALAR ref while "strict refs" in use.

defined @$foo and defined %$bar are now also subject to strict 'refs' (that is, $foo and $bar shall be proper references there.) (defined(@foo) and defined(%bar) are discouraged constructs anyway.) (Nicholas Clark)

p5100-(?p{}) has been removed

The regular expression construct (?p{}), which was deprecated in perl 5.8, has been removed. Use (??{}) instead. (Rafael Garcia-Suarez)

p5100-Pseudo-hashes have been removed

Support for pseudo-hashes has been removed from Perl 5.9. (The fields pragma remains here, but uses an alternate implementation.)

p5100-Removal of the bytecode compiler and of perlcc

perlcc, the byteloader and the supporting modules (B::C, B::CC, B::Bytecode, etc.) are no longer distributed with the perl sources. Those experimental tools have never worked reliably, and, due to the lack of volunteers to keep them in line with the perl interpreter developments, it was decided to remove them instead of shipping a broken version of those. The last version of those modules can be found with perl 5.9.4.

However the B compiler framework stays supported in the perl core, as with the more useful modules it has permitted (among others, B::Deparse and B::Concise).

p5100-Removal of the JPL

The JPL (Java-Perl Lingo) has been removed from the perl sources tarball.

p5100-Recursive inheritance detected earlier

Perl will now immediately throw an exception if you modify any package's @ISA in such a way that it would cause recursive inheritance.

Previously, the exception would not occur until Perl attempted to make use of the recursive inheritance while resolving a method or doing a $foo->isa($bar) lookup.

p5100-warnings::enabled and warnings::warnif changed to favor users of modules

The behaviour in 5.10.x favors the person using the module; The behaviour in 5.8.x favors the module writer;

Assume the following code:

  main calls Foo::Bar::baz()
  Foo::Bar inherits from Foo::Base
  Foo::Bar::baz() calls Foo::Base::_bazbaz()
  Foo::Base::_bazbaz() calls: warnings::warnif('substr', 'some warning 
message');

On 5.8.x, the code warns when Foo::Bar contains use warnings; It does not matter if Foo::Base or main have warnings enabled to disable the warning one has to modify Foo::Bar.

On 5.10.0 and newer, the code warns when main contains use warnings; It does not matter if Foo::Base or Foo::Bar have warnings enabled to disable the warning one has to modify main.

p5100-Modules and Pragmata

p5100-Upgrading individual core modules

Even more core modules are now also available separately through the CPAN. If you wish to update one of these modules, you don't need to wait for a new perl release. From within the cpan shell, running the 'r' command will report on modules with upgrades available. See perldoc CPAN for more information.

p5100-Pragmata Changes

p5100-feature

The new pragma feature is used to enable new features that might break old code. See "p5100-The feature pragma" above.

p5100-mro

This new pragma enables to change the algorithm used to resolve inherited methods. See "p5100-New Pragma, mro" above.

p5100-Scoping of the sort pragma

The sort pragma is now lexically scoped. Its effect used to be global.

p5100-Scoping of bignum, bigint, bigrat

The three numeric pragmas bignum, bigint and bigrat are now lexically scoped. (Tels)

p5100-base

The base pragma now warns if a class tries to inherit from itself. (Curtis "Ovid" Poe)

p5100-strict and warnings

strict and warnings will now complain loudly if they are loaded via incorrect casing (as in use Strict;). (Johan Vromans)

p5100-version

The version module provides support for version objects.

p5100-warnings

The warnings pragma doesn't load Carp anymore. That means that code that used Carp routines without having loaded it at compile time might need to be adjusted; typically, the following (faulty) code won't work anymore, and will require parentheses to be added after the function name:

    use warnings;
    require Carp;
    Carp::confess 'argh';
p5100-less

less now does something useful (or at least it tries to). In fact, it has been turned into a lexical pragma. So, in your modules, you can now test whether your users have requested to use less CPU, or less memory, less magic, or maybe even less fat. See less for more. (Joshua ben Jore)

p5100-New modules

p5100-Selected Changes to Core Modules

p5100-Attribute::Handlers

Attribute::Handlers can now report the caller's file and line number. (David Feldman)

All interpreted attributes are now passed as array references. (Damian Conway)

p5100-B::Lint

B::Lint is now based on Module::Pluggable, and so can be extended with plugins. (Joshua ben Jore)

p5100-B

It's now possible to access the lexical pragma hints (%^H) by using the method B::COP::hints_hash(). It returns a B::RHE object, which in turn can be used to get a hash reference via the method B::RHE::HASH(). (Joshua ben Jore)

p5100-Thread

As the old 5005thread threading model has been removed, in favor of the ithreads scheme, the Thread module is now a compatibility wrapper, to be used in old code only. It has been removed from the default list of dynamic extensions.

p5100-Utility Changes

p5100-perl -d

The Perl debugger can now save all debugger commands for sourcing later; notably, it can now emulate stepping backwards, by restarting and rerunning all bar the last command from a saved command history.

It can also display the parent inheritance tree of a given class, with the i command.

p5100-ptar

ptar is a pure perl implementation of tar that comes with Archive::Tar.

p5100-ptardiff

ptardiff is a small utility used to generate a diff between the contents of a tar archive and a directory tree. Like ptar, it comes with Archive::Tar.

p5100-shasum

shasum is a command-line utility, used to print or to check SHA digests. It comes with the new Digest::SHA module.

p5100-corelist

The corelist utility is now installed with perl (see "p5100-New modules" above).

p5100-h2ph and h2xs

h2ph and h2xs have been made more robust with regard to "modern" C code.

h2xs implements a new option --use-xsloader to force use of XSLoader even in backwards compatible modules.

The handling of authors' names that had apostrophes has been fixed.

Any enums with negative values are now skipped.

p5100-perlivp

perlivp no longer checks for *.ph files by default. Use the new -a option to run all tests.

p5100-find2perl

find2perl now assumes -print as a default action. Previously, it needed to be specified explicitly.

Several bugs have been fixed in find2perl, regarding -exec and -eval. Also the options -path, -ipath and -iname have been added.

p5100-config_data

config_data is a new utility that comes with Module::Build. It provides a command-line interface to the configuration of Perl modules that use Module::Build's framework of configurability (that is, *::ConfigData modules that contain local configuration information for their parent modules.)

p5100-cpanp

cpanp, the CPANPLUS shell, has been added. (cpanp-run-perl, a helper for CPANPLUS operation, has been added too, but isn't intended for direct use).

p5100-cpan2dist

cpan2dist is a new utility that comes with CPANPLUS. It's a tool to create distributions (or packages) from CPAN modules.

p5100-pod2html

The output of pod2html has been enhanced to be more customizable via CSS. Some formatting problems were also corrected. (Jari Aalto)

p5100-New Documentation

The perlpragma manpage documents how to write one's own lexical pragmas in pure Perl (something that is possible starting with 5.9.4).

The new perlglossary manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O'Reilly Media, Inc.

The perlreguts manpage, courtesy of Yves Orton, describes internals of the Perl regular expression engine.

The perlreapi manpage describes the interface to the perl interpreter used to write pluggable regular expression engines (by Ævar Arnfjörð Bjarmason).

The perlunitut manpage is an tutorial for programming with Unicode and string encodings in Perl, courtesy of Juerd Waalboer.

A new manual page, perlunifaq (the Perl Unicode FAQ), has been added (Juerd Waalboer).

The perlcommunity manpage gives a description of the Perl community on the Internet and in real life. (Edgar "Trizor" Bering)

The CORE manual page documents the CORE:: namespace. (Tels)

The long-existing feature of /(?{...})/ regexps setting $_ and pos() is now documented.

p5100-Performance Enhancements

p5100-In-place sorting

Sorting arrays in place (@a = sort @a) is now optimized to avoid making a temporary copy of the array.

Likewise, reverse sort ... is now optimized to sort in reverse, avoiding the generation of a temporary intermediate list.

p5100-Lexical array access

Access to elements of lexical arrays via a numeric constant between 0 and 255 is now faster. (This used to be only the case for global arrays.)

p5100-XS-assisted SWASHGET

Some pure-perl code that perl was using to retrieve Unicode properties and transliteration mappings has been reimplemented in XS.

p5100-Constant subroutines

The interpreter internals now support a far more memory efficient form of inlineable constants. Storing a reference to a constant value in a symbol table is equivalent to a full typeglob referencing a constant subroutine, but using about 400 bytes less memory. This proxy constant subroutine is automatically upgraded to a real typeglob with subroutine if necessary. The approach taken is analogous to the existing space optimisation for subroutine stub declarations, which are stored as plain scalars in place of the full typeglob.

Several of the core modules have been converted to use this feature for their system dependent constants - as a result use POSIX; now takes about 200K less memory.

p5100-PERL_DONT_CREATE_GVSV

The new compilation flag PERL_DONT_CREATE_GVSV, introduced as an option in perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perl from creating an empty scalar with every new typeglob. See "p589-NAME" for details.

p5100-Weak references are cheaper

Weak reference creation is now O(1) rather than O(n), courtesy of Nicholas Clark. Weak reference deletion remains O(n), but if deletion only happens at program exit, it may be skipped completely.

p5100-sort() enhancements

Salvador Fandiño provided improvements to reduce the memory usage of sort and to speed up some cases.

p5100-Memory optimisations

Several internal data structures (typeglobs, GVs, CVs, formats) have been restructured to use less memory. (Nicholas Clark)

p5100-UTF-8 cache optimisation

The UTF-8 caching code is now more efficient, and used more often. (Nicholas Clark)

p5100-Sloppy stat on Windows

On Windows, perl's stat() function normally opens the file to determine the link count and update attributes that may have been changed through hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up stat() by not performing this operation. (Jan Dubois)

p5100-Regular expressions optimisations

p5100-Engine de-recursivised

The regular expression engine is no longer recursive, meaning that patterns that used to overflow the stack will either die with useful explanations, or run to completion, which, since they were able to blow the stack before, will likely take a very long time to happen. If you were experiencing the occasional stack overflow (or segfault) and upgrade to discover that now perl apparently hangs instead, look for a degenerate regex. (Dave Mitchell)

p5100-Single char char-classes treated as literals

Classes of a single character are now treated the same as if the character had been used as a literal, meaning that code that uses char-classes as an escaping mechanism will see a speedup. (Yves Orton)

p5100-Trie optimisation of literal string alternations

Alternations, where possible, are optimised into more efficient matching structures. String literal alternations are merged into a trie and are matched simultaneously. This means that instead of O(N) time for matching N alternations at a given point, the new code performs in O(1) time. A new special variable, ${^RE_TRIE_MAXBUF}, has been added to fine-tune this optimization. (Yves Orton)

Note: Much code exists that works around perl's historic poor performance on alternations. Often the tricks used to do so will disable the new optimisations. Hopefully the utility modules used for this purpose will be educated about these new optimisations.

p5100-Aho-Corasick start-point optimisation

When a pattern starts with a trie-able alternation and there aren't better optimisations available, the regex engine will use Aho-Corasick matching to find the start point. (Yves Orton)

p5100-Installation and Configuration Improvements

p5100-Configuration improvements

p5100--Dusesitecustomize

Run-time customization of @INC can be enabled by passing the -Dusesitecustomize flag to Configure. When enabled, this will make perl run $sitelibexp/sitecustomize.pl before anything else. This script can then be set up to add additional entries to @INC.

p5100-Relocatable installations

There is now Configure support for creating a relocatable perl tree. If you Configure with -Duserelocatableinc, then the paths in @INC (and everything else in %Config) can be optionally located via the path of the perl executable.

That means that, if the string ".../" is found at the start of any path, it's substituted with the directory of $^X. So, the relocation can be configured on a per-directory basis, although the default with -Duserelocatableinc is that everything is relocated. The initial install is done to the original configured prefix.

p5100-strlcat() and strlcpy()

The configuration process now detects whether strlcat() and strlcpy() are available. When they are not available, perl's own version is used (from Russ Allbery's public domain implementation). Various places in the perl interpreter now use them. (Steve Peters)

p5100-d_pseudofork and d_printf_format_null

A new configuration variable, available as $Config{d_pseudofork} in the Config module, has been added, to distinguish real fork() support from fake pseudofork used on Windows platforms.

A new configuration variable, d_printf_format_null, has been added, to see if printf-like formats are allowed to be NULL.

p5100-Configure help

Configure -h has been extended with the most commonly used options.

p5100-Compilation improvements

p5100-Parallel build

Parallel makes should work properly now, although there may still be problems if make test is instructed to run in parallel.

p5100-Borland's compilers support

Building with Borland's compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.

p5100-Static build on Windows

Perl extensions on Windows now can be statically built into the Perl DLL.

Also, it's now possible to build a perl-static.exe that doesn't depend on the Perl DLL on Win32. See the Win32 makefiles for details. (Vadim Konovalov)

p5100-ppport.h files

All ppport.h files in the XS modules bundled with perl are now autogenerated at build time. (Marcus Holland-Moritz)

p5100-C++ compatibility

Efforts have been made to make perl and the core XS modules compilable with various C++ compilers (although the situation is not perfect with some of the compilers on some of the platforms tested.)

p5100-Support for Microsoft 64-bit compiler

Support for building perl with Microsoft's 64-bit compiler has been improved. (ActiveState)

p5100-Visual C++

Perl can now be compiled with Microsoft Visual C++ 2005 (and 2008 Beta 2).

p5100-Win32 builds

All win32 builds (MS-Win, WinCE) have been merged and cleaned up.

p5100-Installation improvements

p5100-Module auxiliary files

README files and changelogs for CPAN modules bundled with perl are no longer installed.

p5100-New Or Improved Platforms

Perl has been reported to work on Symbian OS. See perlsymbian for more information.

Many improvements have been made towards making Perl work correctly on z/OS.

Perl has been reported to work on DragonFlyBSD and MidnightBSD.

Perl has also been reported to work on NexentaOS ( http://www.gnusolaris.org/ ).

The VMS port has been improved. See perlvms.

Support for Cray XT4 Catamount/Qk has been added. See hints/catamount.sh in the source code distribution for more information.

Vendor patches have been merged for RedHat and Gentoo.

DynaLoader::dl_unload_file() now works on Windows.

p5100-Selected Bug Fixes

p5100-strictures in regexp-eval blocks

strict wasn't in effect in regexp-eval blocks (/(?{...})/).

p5100-Calling CORE::require()

CORE::require() and CORE::do() were always parsed as require() and do() when they were overridden. This is now fixed.

p5100-Subscripts of slices

You can now use a non-arrowed form for chained subscripts after a list slice, like in:

    ({foo => "bar"})[0]{foo}

This used to be a syntax error; a -> was required.

p5100-no warnings 'category' works correctly with -w

Previously when running with warnings enabled globally via -w, selective disabling of specific warning categories would actually turn off all warnings. This is now fixed; now no warnings 'io'; will only turn off warnings in the io class. Previously it would erroneously turn off all warnings.

p5100-threads improvements

Several memory leaks in ithreads were closed. Also, ithreads were made less memory-intensive.

threads is now a dual-life module, also available on CPAN. It has been expanded in many ways. A kill() method is available for thread signalling. One can get thread status, or the list of running or joinable threads.

A new threads->exit() method is used to exit from the application (this is the default for the main thread) or from the current thread only (this is the default for all other threads). On the other hand, the exit() built-in now always causes the whole application to terminate. (Jerry D. Hedden)

p5100-chr() and negative values

chr() on a negative value now gives \x{FFFD}, the Unicode replacement character, unless when the bytes pragma is in effect, where the low eight bits of the value are used.

p5100-PERL5SHELL and tainting

On Windows, the PERL5SHELL environment variable is now checked for taintedness. (Rafael Garcia-Suarez)

p5100-Using *FILE{IO}

stat() and -X filetests now treat *FILE{IO} filehandles like *FILE filehandles. (Steve Peters)

p5100-Overloading and reblessing

Overloading now works when references are reblessed into another class. Internally, this has been implemented by moving the flag for "overloading" from the reference to the referent, which logically is where it should always have been. (Nicholas Clark)

p5100-Overloading and UTF-8

A few bugs related to UTF-8 handling with objects that have stringification overloaded have been fixed. (Nicholas Clark)

p5100-eval memory leaks fixed

Traditionally, eval 'syntax error' has leaked badly. Many (but not all) of these leaks have now been eliminated or reduced. (Dave Mitchell)

p5100-Random device on Windows

In previous versions, perl would read the file /dev/urandom if it existed when seeding its random number generator. That file is unlikely to exist on Windows, and if it did would probably not contain appropriate data, so perl no longer tries to read it on Windows. (Alex Davies)

p5100-PERLIO_DEBUG

The PERLIO_DEBUG environment variable no longer has any effect for setuid scripts and for scripts run with -T.

Moreover, with a thread-enabled perl, using PERLIO_DEBUG could lead to an internal buffer overflow. This has been fixed.

p5100-PerlIO::scalar and read-only scalars

PerlIO::scalar will now prevent writing to read-only scalars. Moreover, seek() is now supported with PerlIO::scalar-based filehandles, the underlying string being zero-filled as needed. (Rafael, Jarkko Hietaniemi)

p5100-study() and UTF-8

study() never worked for UTF-8 strings, but could lead to false results. It's now a no-op on UTF-8 data. (Yves Orton)

p5100-Critical signals

The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in an "unsafe" manner (contrary to other signals, that are deferred until the perl interpreter reaches a reasonably stable state; see "Deferred Signals (Safe Signals)" in perlipc). (Rafael)

p5100-@INC-hook fix

When a module or a file is loaded through an @INC-hook, and when this hook has set a filename entry in %INC, __FILE__ is now set for this module accordingly to the contents of that %INC entry. (Rafael)

p5100--t switch fix

The -w and -t switches can now be used together without messing up which categories of warnings are activated. (Rafael)

p5100-Duping UTF-8 filehandles

Duping a filehandle which has the :utf8 PerlIO layer set will now properly carry that layer on the duped filehandle. (Rafael)

p5100-Localisation of hash elements

Localizing a hash element whose key was given as a variable didn't work correctly if the variable was changed while the local() was in effect (as in local $h{$x}; ++$x). (Bo Lindbergh)

p5100-New or Changed Diagnostics

p5100-Use of uninitialized value

Perl will now try to tell you the name of the variable (if any) that was undefined.

p5100-Deprecated use of my() in false conditional

A new deprecation warning, Deprecated use of my() in false conditional, has been added, to warn against the use of the dubious and deprecated construct

    my $x if 0;

See perldiag. Use state variables instead.

p5100-!=~ should be !~

A new warning, !=~ should be !~, is emitted to prevent this misspelling of the non-matching operator.

p5100-Newline in left-justified string

The warning Newline in left-justified string has been removed.

p5100-Too late for "-T" option

The error Too late for "-T" option has been reformulated to be more descriptive.

p5100-"%s" variable %s masks earlier declaration

This warning is now emitted in more consistent cases; in short, when one of the declarations involved is a my variable:

    my $x;   my $x;     # warns
    my $x;  our $x;     # warns
    our $x;  my $x;     # warns

On the other hand, the following:

    our $x; our $x;

now gives a "our" variable %s redeclared warning.

p5100-readdir()/closedir()/etc. attempted on invalid dirhandle

These new warnings are now emitted when a dirhandle is used but is either closed or not really a dirhandle.

p5100-Opening dirhandle/filehandle %s also as a file/directory

Two deprecation warnings have been added: (Rafael)

    Opening dirhandle %s also as a file
    Opening filehandle %s also as a directory
p5100-Use of -P is deprecated

Perl's command-line switch -P is now deprecated.

p5100-v-string in use/require is non-portable

Perl will warn you against potential backwards compatibility problems with the use VERSION syntax.

p5100-perl -V

perl -V has several improvements, making it more useable from shell scripts to get the value of configuration variables. See perlrun for details.

p5100-Changed Internals

In general, the source code of perl has been refactored, tidied up, and optimized in many places. Also, memory management and allocation has been improved in several points.

When compiling the perl core with gcc, as many gcc warning flags are turned on as is possible on the platform. (This quest for cleanliness doesn't extend to XS code because we cannot guarantee the tidiness of code we didn't write.) Similar strictness flags have been added or tightened for various other C compilers.

p5100-Reordering of SVt_* constants

The relative ordering of constants that define the various types of SV have changed; in particular, SVt_PVGV has been moved before SVt_PVLV, SVt_PVAV, SVt_PVHV and SVt_PVCV. This is unlikely to make any difference unless you have code that explicitly makes assumptions about that ordering. (The inheritance hierarchy of B::* objects has been changed to reflect this.)

p5100-Elimination of SVt_PVBM

Related to this, the internal type SVt_PVBM has been removed. This dedicated type of SV was used by the index operator and parts of the regexp engine to facilitate fast Boyer-Moore matches. Its use internally has been replaced by SVs of type SVt_PVGV.

p5100-New type SVt_BIND

A new type SVt_BIND has been added, in readiness for the project to implement Perl 6 on 5. There deliberately is no implementation yet, and they cannot yet be created or destroyed.

p5100-Removal of CPP symbols

The C preprocessor symbols PERL_PM_APIVERSION and PERL_XS_APIVERSION, which were supposed to give the version number of the oldest perl binary-compatible (resp. source-compatible) with the present one, were not used, and sometimes had misleading values. They have been removed.

p5100-Less space is used by ops

The BASEOP structure now uses less space. The op_seq field has been removed and replaced by a single bit bit-field op_opt. op_type is now 9 bits long. (Consequently, the B::OP class doesn't provide an seq method anymore.)

p5100-New parser

perl's parser is now generated by bison (it used to be generated by byacc.) As a result, it seems to be a bit more robust.

Also, Dave Mitchell improved the lexer debugging output under -DT.

p5100-Use of const

Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared const to the C compiler. Steve Peters provided new *_set macros and reworked the core to use these rather than assigning to macros in LVALUE context.

p5100-Mathoms

A new file, mathoms.c, has been added. It contains functions that are no longer used in the perl core, but that remain available for binary or source compatibility reasons. However, those functions will not be compiled in if you add -DNO_MATHOMS in the compiler flags.

p5100-AvFLAGS has been removed

The AvFLAGS macro has been removed.

p5100-av_* changes

The av_*() functions, used to manipulate arrays, no longer accept null AV* parameters.

p5100-$^H and %^H

The implementation of the special variables $^H and %^H has changed, to allow implementing lexical pragmas in pure Perl.

p5100-B:: modules inheritance changed

The inheritance hierarchy of B:: modules has changed; B::NV now inherits from B::SV (it used to inherit from B::IV).

p5100-Anonymous hash and array constructors

The anonymous hash and array constructors now take 1 op in the optree instead of 3, now that pp_anonhash and pp_anonlist return a reference to an hash/array when the op is flagged with OPf_SPECIAL. (Nicholas Clark)

p5100-Known Problems

There's still a remaining problem in the implementation of the lexical $_: it doesn't work inside /(?{...})/ blocks. (See the TODO test in t/op/mydef.t.)

Stacked filetest operators won't work when the filetest pragma is in effect, because they rely on the stat() buffer _ being populated, and filetest bypasses stat().

p5100-UTF-8 problems

The handling of Unicode still is unclean in several places, where it's dependent on whether a string is internally flagged as UTF-8. This will be made more consistent in perl 5.12, but that won't be possible without a certain amount of backwards incompatibility.

p5100-Platform Specific Problems

When compiled with g++ and thread support on Linux, it's reported that the $! stops working correctly. This is related to the fact that the glibc provides two strerror_r(3) implementation, and perl selects the wrong one.

p5100-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://rt.perl.org/rt3/ . There may also be information at http://www.perl.org/ , 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.

p5100-SEE ALSO

The Changes file and the perl590delta to perl595delta man pages 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.

p595-NAME

perl595delta - what is new for perl v5.9.5

p595-DESCRIPTION

This document describes differences between the 5.9.4 and the 5.9.5 development releases. See "p590-NAME", "p591-NAME", "p592-NAME", "p593-NAME" and "p594-NAME" for the differences between 5.8.0 and 5.9.4.

p595-Incompatible Changes

p595-Tainting and printf

When perl is run under taint mode, printf() and sprintf() will now reject any tainted format argument. (Rafael Garcia-Suarez)

p595-undef and signal handlers

Undefining or deleting a signal handler via undef $SIG{FOO} is now equivalent to setting it to 'DEFAULT'. (Rafael)

p595-strictures and array/hash dereferencing in defined()

defined @$foo and defined %$bar are now subject to strict 'refs' (that is, $foo and $bar shall be proper references there.) (Nicholas Clark)

(However, defined(@foo) and defined(%bar) are discouraged constructs anyway.)

p595-(?p{}) has been removed

The regular expression construct (?p{}), which was deprecated in perl 5.8, has been removed. Use (??{}) instead. (Rafael)

p595-Pseudo-hashes have been removed

Support for pseudo-hashes has been removed from Perl 5.9. (The fields pragma remains here, but uses an alternate implementation.)

p595-Removal of the bytecode compiler and of perlcc

perlcc, the byteloader and the supporting modules (B::C, B::CC, B::Bytecode, etc.) are no longer distributed with the perl sources. Those experimental tools have never worked reliably, and, due to the lack of volunteers to keep them in line with the perl interpreter developments, it was decided to remove them instead of shipping a broken version of those. The last version of those modules can be found with perl 5.9.4.

However the B compiler framework stays supported in the perl core, as with the more useful modules it has permitted (among others, B::Deparse and B::Concise).

p595-Removal of the JPL

The JPL (Java-Perl Linguo) has been removed from the perl sources tarball.

p595-Recursive inheritance detected earlier

Perl will now immediately throw an exception if you modify any package's @ISA in such a way that it would cause recursive inheritance.

Previously, the exception would not occur until Perl attempted to make use of the recursive inheritance while resolving a method or doing a $foo->isa($bar) lookup.

p595-Core Enhancements

p595-Regular expressions

p595-Recursive Patterns

It is now possible to write recursive patterns without using the (??{}) construct. This new way is more efficient, and in many cases easier to read.

Each capturing parenthesis can now be treated as an independent pattern that can be entered by using the (?PARNO) syntax (PARNO standing for "parenthesis number"). For example, the following pattern will match nested balanced angle brackets:

    /
     ^                      # start of line
     (                      # start capture buffer 1
        <                   #   match an opening angle bracket
        (?:                 #   match one of:
            (?>             #     don't backtrack over the inside of this group
                [^<>]+      #       one or more non angle brackets
            )               #     end non backtracking group
        |                   #     ... or ...
            (?1)            #     recurse to bracket 1 and try it again
        )*                  #   0 or more times.
        >                   #   match a closing angle bracket
     )                      # end capture buffer one
     $                      # end of line
    /x

Note, users experienced with PCRE will find that the Perl implementation of this feature differs from the PCRE one in that it is possible to backtrack into a recursed pattern, whereas in PCRE the recursion is atomic or "possessive" in nature. (Yves Orton)

p595-Named Capture Buffers

It is now possible to name capturing parenthesis in a pattern and refer to the captured contents by name. The naming syntax is (?....). It's possible to backreference to a named buffer with the \k syntax. In code, the new magical hashes %+ and %- can be used to access the contents of the capture buffers.

Thus, to replace all doubled chars, one could write

    s/(?.)\k/$+{letter}/g

Only buffers with defined contents will be "visible" in the %+ hash, so it's possible to do something like

    foreach my $name (keys %+) {
        print "content of buffer '$name' is $+{$name}\n";
    }

The %- hash is a bit more complete, since it will contain array refs holding values from all capture buffers similarly named, if there should be many of them.

%+ and %- are implemented as tied hashes through the new module Tie::Hash::NamedCapture.

Users exposed to the .NET regex engine will find that the perl implementation differs in that the numerical ordering of the buffers is sequential, and not "unnamed first, then named". Thus in the pattern

   /(A)(?B)(C)(?D)/

$1 will be 'A', $2 will be 'B', $3 will be 'C' and $4 will be 'D' and not $1 is 'A', $2 is 'C' and $3 is 'B' and $4 is 'D' that a .NET programmer would expect. This is considered a feature. :-) (Yves Orton)

p595-Possessive Quantifiers

Perl now supports the "possessive quantifier" syntax of the "atomic match" pattern. Basically a possessive quantifier matches as much as it can and never gives any back. Thus it can be used to control backtracking. The syntax is similar to non-greedy matching, except instead of using a '?' as the modifier the '+' is used. Thus ?+, *+, ++, {min,max}+ are now legal quantifiers. (Yves Orton)

p595-Backtracking control verbs

The regex engine now supports a number of special-purpose backtrack control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT), (*FAIL) and (*ACCEPT). See perlre for their descriptions. (Yves Orton)

p595-Relative backreferences

A new syntax \g{N} or \gN where "N" is a decimal integer allows a safer form of back-reference notation as well as allowing relative backreferences. This should make it easier to generate and embed patterns that contain backreferences. See "Capture buffers" in perlre. (Yves Orton)

p595-\K escape

The functionality of Jeff Pinyan's module Regexp::Keep has been added to the core. You can now use in regular expressions the special escape \K as a way to do something like floating length positive lookbehind. It is also useful in substitutions like:

  s/(foo)bar/$1/g

that can now be converted to

  s/foo\Kbar//g

which is much more efficient. (Yves Orton)

p595-Vertical and horizontal whitespace, and linebreak

Regular expressions now recognize the \v and \h escapes, that match vertical and horizontal whitespace, respectively. \V and \H logically match their complements.

\R matches a generic linebreak, that is, vertical whitespace, plus the multi-character sequence "\x0D\x0A".

p595-The _ prototype

A new prototype character has been added. _ is equivalent to $ (it denotes a scalar), but defaults to $_ if the corresponding argument isn't supplied. Due to the optional nature of the argument, you can only use it at the end of a prototype, or before a semicolon.

This has a small incompatible consequence: the prototype() function has been adjusted to return _ for some built-ins in appropriate cases (for example, prototype('CORE::rmdir')). (Rafael)

p595-UNITCHECK blocks

UNITCHECK, a new special code block has been introduced, in addition to BEGIN, CHECK, INIT and END.

CHECK and INIT blocks, while useful for some specialized purposes, are always executed at the transition between the compilation and the execution of the main program, and thus are useless whenever code is loaded at runtime. On the other hand, UNITCHECK blocks are executed just after the unit which defined them has been compiled. See perlmod for more information. (Alex Gough)

p595-readpipe() is now overridable

The built-in function readpipe() is now overridable. Overriding it permits also to override its operator counterpart, qx// (a.k.a. ``). Moreover, it now defaults to $_ if no argument is provided. (Rafael)

p595-default argument for readline()

readline() now defaults to *ARGV if no argument is provided. (Rafael)

p595-UCD 5.0.0

The copy of the Unicode Character Database included in Perl 5.9 has been updated to version 5.0.0.

p595-Smart match

The smart match operator (~~) is now available by default (you don't need to enable it with use feature any longer). (Michael G Schwern)

p595-Implicit loading of feature

The feature pragma is now implicitly loaded when you require a minimal perl version (with the use VERSION construct) greater than, or equal to, 5.9.5.

p595-Modules and Pragmas

p595-New Pragma, mro

A new pragma, mro (for Method Resolution Order) has been added. It permits to switch, on a per-class basis, the algorithm that perl uses to find inherited methods in case of a multiple inheritance hierarchy. The default MRO hasn't changed (DFS, for Depth First Search). Another MRO is available: the C3 algorithm. See mro for more information. (Brandon Black)

Note that, due to changes in the implementation of class hierarchy search, code that used to undef the *ISA glob will most probably break. Anyway, undef'ing *ISA had the side-effect of removing the magic on the @ISA array and should not have been done in the first place.

p595-bignum, bigint, bigrat

The three numeric pragmas bignum, bigint and bigrat are now lexically scoped. (Tels)

p595-Math::BigInt/Math::BigFloat

Many bugs have been fixed; noteworthy are comparisons with NaN, which no longer warn about undef values.

The following things are new:

p595-config()

The config() method now also supports the calling-style config('lib') in addition to config()->{'lib'}.

p595-import()

Upon import, using lib => 'Foo' now warns if the low-level library cannot be found. To suppress the warning, you can use try => 'Foo' instead. To convert the warning into a die, use only => 'Foo' instead.

p595-roundmode common

A rounding mode of common is now supported.

Also, support for the following methods has been added:

p595-bpi(), bcos(), bsin(), batan(), batan2()
p595-bmuladd()
p595-bexp(), bnok()
p595-from_hex(), from_oct(), and from_bin()
p595-as_oct()

In addition, the default math-backend (Calc (Perl) and FastCalc (XS)) now support storing numbers in parts with 9 digits instead of 7 on Perls with either 64bit integer or long double support. This means math operations scale better and are thus faster for really big numbers.

p595-New Core Modules

p595-Module changes

p595-assertions

The assertions pragma, its submodules assertions::activate and assertions::compat and the -A command-line switch have been removed. The interface was not judged mature enough for inclusion in a stable release.

p595-base

The base pragma now warns if a class tries to inherit from itself. (Curtis "Ovid" Poe)

p595-strict and warnings

strict and warnings will now complain loudly if they are loaded via incorrect casing (as in use Strict;). (Johan Vromans)

p595-warnings

The warnings pragma doesn't load Carp anymore. That means that code that used Carp routines without having loaded it at compile time might need to be adjusted; typically, the following (faulty) code won't work anymore, and will require parentheses to be added after the function name:

    use warnings;
    require Carp;
    Carp::confess "argh";
p595-less

less now does something useful (or at least it tries to). In fact, it has been turned into a lexical pragma. So, in your modules, you can now test whether your users have requested to use less CPU, or less memory, less magic, or maybe even less fat. See less for more. (Joshua ben Jore)

p595-Attribute::Handlers

Attribute::Handlers can now report the caller's file and line number. (David Feldman)

p595-B::Lint

B::Lint is now based on Module::Pluggable, and so can be extended with plugins. (Joshua ben Jore)

p595-B

It's now possible to access the lexical pragma hints (%^H) by using the method B::COP::hints_hash(). It returns a B::RHE object, which in turn can be used to get a hash reference via the method B::RHE::HASH(). (Joshua ben Jore)

p595-Thread

As the old 5005thread threading model has been removed, in favor of the ithreads scheme, the Thread module is now a compatibility wrapper, to be used in old code only. It has been removed from the default list of dynamic extensions.

p595-Utility Changes

p595-cpanp

cpanp, the CPANPLUS shell, has been added. (cpanp-run-perl, an helper for CPANPLUS operation, has been added too, but isn't intended for direct use).

p595-cpan2dist

cpan2dist is a new utility, that comes with CPANPLUS. It's a tool to create distributions (or packages) from CPAN modules.

p595-pod2html

The output of pod2html has been enhanced to be more customizable via CSS. Some formatting problems were also corrected. (Jari Aalto)

p595-Documentation

p595-New manpage, perlunifaq

A new manual page, perlunifaq (the Perl Unicode FAQ), has been added (Juerd Waalboer).

p595-Installation and Configuration Improvements

p595-C++ compatibility

Efforts have been made to make perl and the core XS modules compilable with various C++ compilers (although the situation is not perfect with some of the compilers on some of the platforms tested.)

p595-Visual C++

Perl now can be compiled with Microsoft Visual C++ 2005.

p595-Static build on Win32

It's now possible to build a perl-static.exe that doesn't depend on perl59.dll on Win32. See the Win32 makefiles for details. (Vadim Konovalov)

p595-win32 builds

All win32 builds (MS-Win, WinCE) have been merged and cleaned up.

p595-d_pseudofork and d_printf_format_null

A new configuration variable, available as $Config{d_pseudofork} in the Config module, has been added, to distinguish real fork() support from fake pseudofork used on Windows platforms.

A new configuration variable, d_printf_format_null, has been added, to see if printf-like formats are allowed to be NULL.

p595-Help

Configure -h has been extended with the most used option.

Much less 'Whoa there' messages.

p595-64bit systems

Better detection of 64bit(only) systems, and setting all the (library) paths accordingly.

p595-Ports

Perl has been reported to work on MidnightBSD.

Support for Cray XT4 Catamount/Qk has been added.

Vendor patches have been merged for RedHat and GenToo.

p595-Selected Bug Fixes

PerlIO::scalar will now prevent writing to read-only scalars. Moreover, seek() is now supported with PerlIO::scalar-based filehandles, the underlying string being zero-filled as needed. (Rafael, Jarkko Hietaniemi)

study() never worked for UTF-8 strings, but could lead to false results. It's now a no-op on UTF-8 data. (Yves Orton)

The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in an "unsafe" manner (contrary to other signals, that are deferred until the perl interpreter reaches a reasonably stable state; see "Deferred Signals (Safe Signals)" in perlipc). (Rafael)

When a module or a file is loaded through an @INC-hook, and when this hook has set a filename entry in %INC, __FILE__ is now set for this module accordingly to the contents of that %INC entry. (Rafael)

The -w and -t switches can now be used together without messing up what categories of warnings are activated or not. (Rafael)

Duping a filehandle which has the :utf8 PerlIO layer set will now properly carry that layer on the duped filehandle. (Rafael)

Localizing an hash element whose key was given as a variable didn't work correctly if the variable was changed while the local() was in effect (as in local $h{$x}; ++$x). (Bo Lindbergh)

p595-New or Changed Diagnostics

p595-Deprecations

Two deprecation warnings have been added: (Rafael)

    Opening dirhandle %s also as a file
    Opening filehandle %s also as a directory

p595-Changed Internals

The anonymous hash and array constructors now take 1 op in the optree instead of 3, now that pp_anonhash and pp_anonlist return a reference to an hash/array when the op is flagged with OPf_SPECIAL (Nicholas Clark).

p595-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://rt.perl.org/rt3/ . There may also be information at http://www.perl.org/ , 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.

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

p594-NAME

perl594delta - what is new for perl v5.9.4

p594-DESCRIPTION

This document describes differences between the 5.9.3 and the 5.9.4 development releases. See "p590-NAME", "p591-NAME", "p592-NAME" and "p593-NAME" for the differences between 5.8.0 and 5.9.3.

p594-Incompatible Changes

p594-chdir FOO

A bareword argument to chdir() is now recognized as a file handle. Earlier releases interpreted the bareword as a directory name. (Gisle Aas)

p594-Handling of pmc files

An old feature of perl was that before require or use look for a file with a .pm extension, they will first look for a similar filename with a .pmc extension. If this file is found, it will be loaded in place of any potentially existing file ending in a .pm extension.

Previously, .pmc files were loaded only if more recent than the matching .pm file. Starting with 5.9.4, they'll be always loaded if they exist. (This trick is used by Pugs.)

p594-@- and @+ in patterns

The special arrays @- and @+ are no longer interpolated in regular expressions. (Sadahiro Tomoyuki)

p594-$AUTOLOAD can now be tainted

If you call a subroutine by a tainted name, and if it defers to an AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted. (Rick Delaney)

p594-Core Enhancements

p594-state() variables

A new class of variables has been introduced. State variables are similar to my variables, but are declared with the state keyword in place of my. They're visible only in their lexical scope, but their value is persistent: unlike my variables, they're not undefined at scope entry, but retain their previous value. (Rafael Garcia-Suarez)

To use state variables, one needs to enable them by using

    use feature "state";

or by using the -E command-line switch in one-liners.

See "Persistent variables via state()" in perlsub.

p594-UNIVERSAL::DOES()

The UNIVERSAL class has a new method, DOES(). It has been added to solve semantic problems with the isa() method. isa() checks for inheritance, while DOES() has been designed to be overridden when module authors use other types of relations between classes (in addition to inheritance). (chromatic)

See "$obj->DOES( ROLE )" in UNIVERSAL.

p594-Exceptions in constant folding

The constant folding routine is now wrapped in an exception handler, and if folding throws an exception (such as attempting to evaluate 0/0), perl now retains the current optree, rather than aborting the whole program. (Nicholas Clark, Dave Mitchell)

p594-Source filters in @INC

It's possible to enhance the mechanism of subroutine hooks in @INC by adding a source filter on top of the filehandle opened and returned by the hook. This feature was planned a long time ago, but wasn't quite working until now. See "require" in perlfunc for details. (Nicholas Clark)

p594-MAD

MAD, which stands for Misc Attribute Decoration, is a still-in-development work leading to a Perl 5 to Perl 6 converter. To enable it, it's necessary to pass the argument -Dmad to Configure. The obtained perl isn't binary compatible with a regular perl 5.9.4, and has space and speed penalties; moreover not all regression tests still pass with it. (Larry Wall, Nicholas Clark)

p594-Modules and Pragmas

p594-New Core Modules

p594-Utility Changes

p594-config_data

config_data is a new utility that comes with Module::Build. It provides a command-line interface to the configuration of Perl modules that use Module::Build's framework of configurability (that is, *::ConfigData modules that contain local configuration information for their parent modules.)

p594-Documentation

p594-New manpage, perlpragma

The perlpragma manpage documents how to write one's own lexical pragmas in pure Perl (something that is possible starting with 5.9.4).

p594-New manpage, perlreguts

The perlreguts manpage, courtesy of Yves Orton, describes internals of the Perl regular expression engine.

p594-New manpage, perlunitut

The perlunitut manpage is an tutorial for programming with Unicode and string encodings in Perl, courtesy of Juerd Waalboer.

p594-Performance Enhancements

p594-Memory optimisations

Several internal data structures (typeglobs, GVs, CVs, formats) have been restructured to use less memory. (Nicholas Clark)

p594-UTF-8 cache optimisation

The UTF-8 caching code is now more efficient, and used more often. (Nicholas Clark)

p594-Regular expressions

p594-Engine de-recursivised

The regular expression engine is no longer recursive, meaning that patterns that used to overflow the stack will either die with useful explanations, or run to completion, which, since they were able to blow the stack before, will likely take a very long time to happen. If you were experiencing the occasional stack overflow (or segfault) and upgrade to discover that now perl apparently hangs instead, look for a degenerate regex. (Dave Mitchell)

p594-Single char char-classes treated as literals

Classes of a single character are now treated the same as if the character had been used as a literal, meaning that code that uses char-classes as an escaping mechanism will see a speedup. (Yves Orton)

p594-Trie optimisation of literal string alternations

Alternations, where possible, are optimised into more efficient matching structures. String literal alternations are merged into a trie and are matched simultaneously. This means that instead of O(N) time for matching N alternations at a given point the new code performs in O(1) time. (Yves Orton)

Note: Much code exists that works around perl's historic poor performance on alternations. Often the tricks used to do so will disable the new optimisations. Hopefully the utility modules used for this purpose will be educated about these new optimisations by the time 5.10 is released.

p594-Aho-Corasick start-point optimisation

When a pattern starts with a trie-able alternation and there aren't better optimisations available the regex engine will use Aho-Corasick matching to find the start point. (Yves Orton)

p594-Sloppy stat on Windows

On Windows, perl's stat() function normally opens the file to determine the link count and update attributes that may have been changed through hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up stat() by not performing this operation. (Jan Dubois)

p594-Installation and Configuration Improvements

p594-Relocatable installations

There is now Configure support for creating a relocatable perl tree. If you Configure with -Duserelocatableinc, then the paths in @INC (and everything else in %Config) can be optionally located via the path of the perl executable.

That means that, if the string ".../" is found at the start of any path, it's substituted with the directory of $^X. So, the relocation can be configured on a per-directory basis, although the default with -Duserelocatableinc is that everything is relocated. The initial install is done to the original configured prefix.

p594-Ports

Many improvements have been made towards making Perl work correctly on z/OS.

Perl has been reported to work on DragonFlyBSD.

p594-Compilation improvements

All ppport.h files in the XS modules bundled with perl are now autogenerated at build time. (Marcus Holland-Moritz)

p594-New probes

The configuration process now detects whether strlcat() and strlcpy() are available. When they are not available, perl's own version is used (from Russ Allbery's public domain implementation). Various places in the perl interpreter now use them. (Steve Peters)

p594-Windows build improvements

p594-Building XS extensions

Support for building XS extension modules with the free MinGW compiler has been improved in the case where perl itself was built with the Microsoft VC++ compiler. (ActiveState)

p594-Support for 64-bit compiler

Support for building perl with Microsoft's 64-bit compiler has been improved. (ActiveState)

p594-Selected Bug Fixes

p594-PERL5SHELL and tainting

On Windows, the PERL5SHELL environment variable is now checked for taintedness. (Rafael Garcia-Suarez)

p594-Using *FILE{IO}

stat() and -X filetests now treat *FILE{IO} filehandles like *FILE filehandles. (Steve Peters)

p594-Overloading and reblessing

Overloading now works when references are reblessed into another class. Internally, this has been implemented by moving the flag for "overloading" from the reference to the referent, which logically is where it should always have been. (Nicholas Clark)

p594-Overloading and UTF-8

A few bugs related to UTF-8 handling with objects that have stringification overloaded have been fixed. (Nicholas Clark)

p594-eval memory leaks fixed

Traditionally, eval 'syntax error' has leaked badly. Many (but not all) of these leaks have now been eliminated or reduced. (Dave Mitchell)

p594-Random device on Windows

In previous versions, perl would read the file /dev/urandom if it existed when seeding its random number generator. That file is unlikely to exist on Windows, and if it did would probably not contain appropriate data, so perl no longer tries to read it on Windows. (Alex Davies)

p594-New or Changed Diagnostics

p594-State variable %s will be reinitialized

One can assign initial values to state variables, but not when they're declared as a sub-part of a list assignment. See perldiag.

p594-Changed Internals

A new file, mathoms.c, contains functions that aren't used anymore in the perl core, but remain around because modules out there might still use them. They come from a factorization effort: for example, many PP functions are now shared for several ops.

The implementation of the special variables $^H and %^H has changed, to allow implementing lexical pragmas in pure perl.

p594-Known Problems

One warning test (number 263 in lib/warnings.t) fails under UTF-8 locales.

Bytecode tests fail under several platforms. We are considering removing support for byteloader and compiler before the 5.10.0 release.

p594-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://rt.perl.org/rt3/ . There may also be information at http://www.perl.org/ , 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.

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

p593-NAME

perl593delta - what is new for perl v5.9.3

p593-DESCRIPTION

This document describes differences between the 5.9.2 and the 5.9.3 development releases. See "p590-NAME", "p591-NAME" and "p592-NAME" for the differences between 5.8.0 and 5.9.2.

p593-Incompatible Changes

p593-Parsing of -f _

The identifier _ is now forced to be a bareword after a filetest operator. This solves a number of misparsing issues when a global _ subroutine is defined.

p593-mkdir()

mkdir() without arguments now defaults to $_.

p593-Magic goto and eval

The construct eval { goto &foo } is now disallowed. (Note that the similar construct, but with eval("") instead, was already forbidden.)

p593-$# has been removed

The deprecated $# variable (output format for numbers) has been removed. A new warning, $# is no longer supported, has been added.

p593-:unique

The :unique attribute has been made a no-op, since its current implementation was fundamentally flawed and not threadsafe.

p593-Scoping of the sort pragma

The sort pragma is now lexically scoped. Its effect used to be global.

p593-Core Enhancements

p593-The feature pragma

The feature pragma is used to enable new syntax that would break Perl's backwards-compatibility with older releases of the language. It's a lexical pragma, like strict or warnings.

Currently the following new features are available: switch (adds a switch statement), ~~ (adds a Perl 6-like smart match operator), say (adds a say built-in function), and err (adds an err keyword). Those features are described below.

Note that err low-precedence defined-or operator used to be enabled by default (although as a weak keyword, meaning that any function would override it). It's now only recognized when explicitly turned on (and is then a regular keyword).

Those features, and the feature pragma itself, have been contributed by Robin Houston.

p593-Switch and Smart Match operator

Perl 5 now has a switch statement. It's available when use feature 'switch' is in effect. This feature introduces three new keywords, given, when, and default:

    given ($foo) {
        when (/^abc/) { $abc = 1; }
        when (/^def/) { $def = 1; }
        when (/^xyz/) { $xyz = 1; }
        default { $nothing = 1; }
    }

A more complete description of how Perl matches the switch variable against the when conditions is given in "Switch statements" in perlsyn.

This kind of match is called smart match, and it's also possible to use it outside of switch statements, via the new ~~ operator (enabled via the use feature '~~' directive). See "Smart matching in detail" in perlsyn.

p593-say()

say() is a new built-in, only available when use feature 'say' is in effect, that is similar to print(), but that implicitly appends a newline to the printed string. See "say" in perlfunc.

p593-CLONE_SKIP()

Perl has now support for the CLONE_SKIP special subroutine. Like CLONE, CLONE_SKIP is called once per package; however, it is called just before cloning starts, and in the context of the parent thread. If it returns a true value, then no objects of that class will be cloned. See perlmod for details. (Contributed by Dave Mitchell.)

p593-${^CHILD_ERROR_NATIVE}

A new internal variable, ${^CHILD_ERROR_NATIVE}, gives the native status returned by the last pipe close, backtick command, successful call to wait() or waitpid(), or from the system() operator. See perlrun for details. (Contributed by Gisle Aas.)

p593-Assertions

The support for assertions, introduced in perl 5.9.0, has been improved. The syntax for the -A command-line switch has changed; it now accepts an optional module name, defaulting to assertions::activate. See assertions and perlrun. (Contributed by Salvador Fandiño García.)

p593-Unicode Character Database 4.1.0

The copy of the Unicode Character Database included in Perl 5.9 has been updated to 4.1.0.

p593-no VERSION

You can now use no followed by a version number to specify that you want to use a version of perl older than the specified one.

p593-Recursive sort subs

You can now use recursive subroutines with sort(), thanks to Robin Houston.

p593-Effect of pragmas in eval

The compile-time value of the %^H hint variable can now propagate into eval("")uated code. This makes it more useful to implement lexical pragmas.

As a side-effect of this, the overloaded-ness of constants now propagates into eval("").

p593-New -E command-line switch

-E is equivalent to -e, but it implicitly enables all optional features (like use feature ":5.10").

p593-chdir, chmod and chown on filehandles

chdir, chmod and chown can now work on filehandles as well as filenames, if the system supports respectively fchdir, fchmod and fchown, thanks to a patch provided by Gisle Aas.

p593-OS groups

$( and $) now return groups in the order where the OS returns them, thanks to Gisle Aas. This wasn't previously the case.

p593-Modules and Pragmata

p593-New Core Modules

p593-Utility Changes

p593-ptar

ptar is a pure perl implementation of tar, that comes with Archive::Tar.

p593-ptardiff

ptardiff is a small script used to generate a diff between the contents of a tar archive and a directory tree. Like ptar, it comes with Archive::Tar.

p593-shasum

This command-line utility, used to print or to check SHA digests, comes with the new Digest::SHA module.

p593-h2xs enhancements

h2xs implements a new option --use-xsloader to force use of XSLoader even in backwards compatible modules.

The handling of authors' names that had apostrophes has been fixed.

Any enums with negative values are now skipped.

p593-perlivp enhancements

perlivp no longer checks for *.ph files by default. Use the new -a option to run all tests.

p593-Documentation

p593-Perl Glossary

The perlglossary manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O'Reilly Media, Inc.

perltodo now lists a rough roadmap to Perl 5.10.

p593-Performance Enhancements

p593-XS-assisted SWASHGET

Some pure-perl code that perl was using to retrieve Unicode properties and transliteration mappings has been reimplemented in XS.

p593-Constant subroutines

The interpreter internals now support a far more memory efficient form of inlineable constants. Storing a reference to a constant value in a symbol table is equivalent to a full typeglob referencing a constant subroutine, but using about 400 bytes less memory. This proxy constant subroutine is automatically upgraded to a real typeglob with subroutine if necessary. The approach taken is analogous to the existing space optimisation for subroutine stub declarations, which are stored as plain scalars in place of the full typeglob.

Several of the core modules have been converted to use this feature for their system dependent constants - as a result use POSIX; now takes about 200K less memory.

p593-PERL_DONT_CREATE_GVSV

The new compilation flag PERL_DONT_CREATE_GVSV, introduced as an option in perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perl from creating an empty scalar with every new typeglob. See "p589-NAME" for details.

p593-Weak references are cheaper

Weak reference creation is now O(1) rather than O(n), courtesy of Nicholas Clark. Weak reference deletion remains O(n), but if deletion only happens at program exit, it may be skipped completely.

p593-sort() enhancements

Salvador Fandiño provided improvements to reduce the memory usage of sort and to speed up some cases.

p593-Installation and Configuration Improvements

p593-Compilation improvements

Parallel makes should work properly now, although there may still be problems if make test is instructed to run in parallel.

Building with Borland's compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.

Perl extensions on Windows now can be statically built into the Perl DLL, thanks to a work by Vadim Konovalov.

p593-New Or Improved Platforms

Perl is being ported to Symbian OS. See perlsymbian for more information.

The VMS port has been improved. See perlvms.

DynaLoader::dl_unload_file() now works on Windows.

Portability of Perl on various recent compilers on Windows has been improved (Borland C++, Visual C++ 7.0).

p593-New probes

Configure will now detect clearenv and unsetenv, thanks to a patch from Alan Burlison. It will also probe for futimes (and use it internally if available), and whether sprintf correctly returns the length of the formatted string.

p593-Module auxiliary files

README files and changelogs for CPAN modules bundled with perl are no longer installed.

p593-Selected Bug Fixes

p593-defined $$x

use strict "refs" was ignoring taking a hard reference in an argument to defined(), as in :

    use strict "refs";
    my $x = "foo";
    if (defined $$x) {...}

This now correctly produces the run-time error Can't use string as a SCALAR ref while "strict refs" in use. (However, defined @$foo and defined %$foo are still allowed. Those constructs are discouraged anyway.)

p593-Calling CORE::require()

CORE::require() and CORE::do() were always parsed as require() and do() when they were overridden. This is now fixed.

p593-Subscripts of slices

You can now use a non-arrowed form for chained subscripts after a list slice, like in:

    ({foo => "bar"})[0]{foo}

This used to be a syntax error; a -> was required.

p593-Remove over-optimisation

Perl 5.9.2 introduced a change so that assignments of undef to a scalar, or of an empty list to an array or a hash, were optimised out. As this could cause problems when goto jumps were involved, this change was backed out.

p593-sprintf() fixes

Using the sprintf() function with some formats could lead to a buffer overflow in some specific cases. This has been fixed, along with several other bugs, notably in bounds checking.

In related fixes, it was possible for badly written code that did not follow the documentation of Sys::Syslog to have formatting vulnerabilities. Sys::Syslog has been changed to protect people from poor quality third party code.

p593-no warnings 'category' works correctly with -w

Previously when running with warnings enabled globally via -w, selective disabling of specific warning categories would actually turn off all warnings. This is now fixed; now no warnings 'io'; will only turn off warnings in the io class. Previously it would erroneously turn off all warnings.

p593-Smaller fixes

p593-More Unicode Fixes

p593-New or Changed Diagnostics

p593-Attempt to set length of freed array

This is a new warning, produced in situations like the following one:

    $r = do {my @a; \$#a};
    $$r = 503;

p593-Non-string passed as bitmask

This is a new warning, produced when number has been passed as a argument to select(), instead of a bitmask.

    # Wrong, will now warn
    $rin = fileno(STDIN);
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
    
    # Should be
    $rin = '';
    vec($rin,fileno(STDIN),1) = 1;
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);

p593-Search pattern not terminated or ternary operator parsed as search pattern

This syntax error indicates that the lexer couldn't find the final delimiter of a ?PATTERN? construct. Mentioning the ternary operator in this error message makes syntax diagnostic easier.

p593-"%s" variable %s masks earlier declaration

This warning is now emitted in more consistent cases; in short, when one of the declarations involved is a my variable:

    my $x;   my $x;     # warns
    my $x;  our $x;     # warns
    our $x;  my $x;     # warns

On the other hand, the following:

    our $x; our $x;

now gives a "our" variable %s redeclared warning.

p593-readdir()/closedir()/etc. attempted on invalid dirhandle

These new warnings are now emitted when a dirhandle is used but is either closed or not really a dirhandle.

p593-Changed Internals

In general, the source code of perl has been refactored, tied up, and optimized in many places. Also, memory management and allocation has been improved in a couple of points.

Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared const to the C compiler. Steve Peters provided new *_set macros and reworked the core to use these rather than assigning to macros in LVALUE context.

Dave Mitchell improved the lexer debugging output under -DT.

A new file, mathoms.c, has been added. It contains functions that are no longer used in the perl core, but that remain available for binary or source compatibility reasons. However, those functions will not be compiled in if you add -DNO_MATHOMS in the compiler flags.

The AvFLAGS macro has been removed.

The av_*() functions, used to manipulate arrays, no longer accept null AV* parameters.

p593-B:: modules inheritance changed

The inheritance hierarchy of B:: modules has changed; B::NV now inherits from B::SV (it used to inherit from B::IV).

p593-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.org/ , 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.

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

p592-NAME

perl592delta - what is new for perl v5.9.2

p592-DESCRIPTION

This document describes differences between the 5.9.1 and the 5.9.2 development releases. See "p590-NAME" and "p591-NAME" for the differences between 5.8.0 and 5.9.1.

p592-Incompatible Changes

p592-Packing and UTF-8 strings

The semantics of pack() and unpack() regarding UTF-8-encoded data has been changed. Processing is now by default character per character instead of byte per byte on the underlying encoding. Notably, code that used things like pack("a*", $string) to see through the encoding of string will now simply get back the original $string. Packed strings can also get upgraded during processing when you store upgraded characters. You can get the old behaviour by using use bytes.

To be consistent with pack(), the C0 in unpack() templates indicates that the data is to be processed in character mode, i.e. character by character; on the contrary, U0 in unpack() indicates UTF-8 mode, where the packed string is processed in its UTF-8-encoded Unicode form on a byte by byte basis. This is reversed with regard to perl 5.8.X.

Moreover, C0 and U0 can also be used in pack() templates to specify respectively character and byte modes.

C0 and U0 in the middle of a pack or unpack format now switch to the specified encoding mode, honoring parens grouping. Previously, parens were ignored.

Also, there is a new pack() character format, W, which is intended to replace the old C. C is kept for unsigned chars coded as bytes in the strings internal representation. W represents unsigned (logical) character values, which can be greater than 255. It is therefore more robust when dealing with potentially UTF-8-encoded data (as C will wrap values outside the range 0..255, and not respect the string encoding).

In practice, that means that pack formats are now encoding-neutral, except C.

For consistency, A in unpack() format now trims all Unicode whitespace from the end of the string. Before perl 5.9.2, it used to strip only the classical ASCII space characters.

p592-Miscellaneous

The internal dump output has been improved, so that non-printable characters such as newline and backspace are output in \x notation, rather than octal.

The -C option can no longer be used on the #! line. It wasn't working there anyway.

p592-Core Enhancements

p592-Malloc wrapping

Perl can now be built to detect attempts to assign pathologically large chunks of memory. Previously such assignments would suffer from integer wrap-around during size calculations causing a misallocation, which would crash perl, and could theoretically be used for "stack smashing" attacks. The wrapping defaults to enabled on platforms where we know it works (most AIX configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP-UX, GNU Linux, OpenBSD, Solaris, VMS and most Win32 compilers) and defaults to disabled on other platforms.

p592-Unicode Character Database 4.0.1

The copy of the Unicode Character Database included in Perl 5.9 has been updated to 4.0.1 from 4.0.0.

p592-suidperl less insecure

Paul Szabo has analysed and patched suidperl to remove existing known insecurities. Currently there are no known holes in suidperl, but previous experience shows that we cannot be confident that these were the last. You may no longer invoke the set uid perl directly, so to preserve backwards compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid binary is now sperl5.9.n (sperl5.9.2 for this release). suidperl is installed as a hard link to perl; both suidperl and perl will invoke sperl5.9.2 automatically the set uid binary, so this change should be completely transparent.

For new projects the core perl team would strongly recommend that you use dedicated, single purpose security tools such as sudo in preference to suidperl.

p592-PERLIO_DEBUG

The PERLIO_DEBUG environment variable has no longer any effect for setuid scripts and for scripts run with -T.

Moreover, with a thread-enabled perl, using PERLIO_DEBUG could lead to an internal buffer overflow. This has been fixed.

p592-Formats

In addition to bug fixes, format's features have been enhanced. See perlform.

p592-Unicode Character Classes

Perl's regular expression engine now contains support for matching on the intersection of two Unicode character classes. You can also now refer to user-defined character classes from within other user defined character classes.

p592-Byte-order modifiers for pack() and unpack()

There are two new byte-order modifiers, > (big-endian) and < (little-endian), that can be appended to most pack() and unpack() template characters and groups to force a certain byte-order for that type or group. See "pack" in perlfunc and perlpacktut for details.

p592-Byte count feature in pack()

A new pack() template character, ".", returns the number of characters read so far.

p592-New variables

A new variable, ${^RE_DEBUG_FLAGS}, controls what debug flags are in effect for the regular expression engine when running under use re "debug". See re for details.

A new variable ${^UTF8LOCALE} indicates where a UTF-8 locale was detected by perl at startup.

p592-Modules and Pragmata

p592-New modules

p592-Updated And Improved Modules and Pragmata

Dual-lived modules have been updated to be kept up-to-date with respect to CPAN.

The dual-lived modules which contain an _ in their version number are actually ahead of the corresponding CPAN release.

p592-B::Concise

B::Concise was significantly improved.

p592-Socket

There is experimental support for Linux abstract Unix domain sockets.

p592-Sys::Syslog

syslog() can now use numeric constants for facility names and priorities, in addition to strings.

p592-threads

Detached threads are now also supported on Windows.

p592-Utility Changes

p592-Performance Enhancements

p592-Installation and Configuration Improvements

Run-time customization of @INC can be enabled by passing the -Dusesitecustomize flag to configure. When enabled, this will make perl run $sitelibexp/sitecustomize.pl before anything else. This script can then be set up to add additional entries to @INC.

There is alpha support for relocatable @INC entries.

Perl should build on Interix and on GNU/kFreeBSD.

p592-Selected Bug Fixes

Most of those bugs were reported in the perl 5.8.x maintenance track. Notably, quite a few utf8 bugs were fixed, and several memory leaks were suppressed. The perl58Xdelta manpages have more details on them.

Development-only bug fixes include :

$Foo::_ was wrongly forced as $main::_.

p592-New or Changed Diagnostics

A new warning, !=~ should be !~, is emitted to prevent this misspelling of the non-matching operator.

The warning Newline in left-justified string has been removed.

The error Too late for "-T" option has been reformulated to be more descriptive.

There is a new compilation error, Illegal declaration of subroutine, for an obscure case of syntax errors.

The diagnostic output of Carp has been changed slightly, to add a space after the comma between arguments. This makes it much easier for tools such as web browsers to wrap it, but might confuse any automatic tools which perform detailed parsing of Carp output.

perl -V has several improvements, making it more useable from shell scripts to get the value of configuration variables. See perlrun for details.

p592-Changed Internals

The perl core has been refactored and reorganised in several places. In short, this release will not be binary compatible with any previous perl release.

p592-Known Problems

For threaded builds, ext/threads/shared/t/wait.t has been reported to fail some tests on HP-UX 10.20.

Net::Ping might fail some tests on HP-UX 11.00 with the latest OS upgrades.

t/io/dup.t, t/io/open.t and lib/ExtUtils/t/Constant.t fail some tests on some BSD flavours.

p592-Plans for the next release

The current plan for perl 5.9.3 is to add CPANPLUS as a core module. More regular expression optimizations are also in the works.

It is planned to release a development version of perl more frequently, i.e. each time something major changes.

p592-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.org/ , 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.

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

p591-NAME

perl591delta - what is new for perl v5.9.1

p591-DESCRIPTION

This document describes differences between the 5.9.0 and the 5.9.1 development releases. See "p590-NAME" for the differences between 5.8.0 and 5.9.0.

p591-Incompatible Changes

p591-substr() lvalues are no longer fixed-length

The lvalues returned by the three argument form of substr() used to be a "fixed length window" on the original string. In some cases this could cause surprising action at distance or other undefined behaviour. Now the length of the window adjusts itself to the length of the string assigned to it.

p591-The :unique attribute is only meaningful for globals

Now applying :unique to lexical variables and to subroutines will result in a compilation error.

p591-Core Enhancements

p591-Lexical $_

The default variable $_ can now be lexicalized, by declaring it like any other lexical variable, with a simple

    my $_;

The operations that default on $_ will use the lexically-scoped version of $_ when it exists, instead of the global $_.

In a map or a grep block, if $_ was previously my'ed, then the $_ inside the block is lexical as well (and scoped to the block).

In a scope where $_ has been lexicalized, you can still have access to the global version of $_ by using $::_, or, more simply, by overriding the lexical declaration with our $_.

p591-Tied hashes in scalar context

As of perl 5.8.2/5.9.0, tied hashes did not return anything useful in scalar context, for example when used as boolean tests:

        if (%tied_hash) { ... }

The old nonsensical behaviour was always to return false, regardless of whether the hash is empty or has elements.

There is now an interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context, via the SCALAR method (see perltie). Without a SCALAR method, perl will try to guess whether the hash is empty, by testing if it's inside an iteration (in this case it can't be empty) or by calling FIRSTKEY.

p591-Formats

Formats were improved in several ways. A new field, ^*, can be used for variable-width, one-line-at-a-time text. Null characters are now handled correctly in picture lines. Using @# and ~~ together will now produce a compile-time error, as those format fields are incompatible. perlform has been improved, and miscellaneous bugs fixed.

p591-Stacked filetest operators

As a new form of syntactic sugar, it's now possible to stack up filetest operators. You can now write -f -w -x $file in a row to mean -x $file && -w _ && -f _. See "-X" in perlfunc.

p591-Modules and Pragmata

p591-Benchmark

In Benchmark, cmpthese() and timestr() now use the time statistics of children instead of parent when the selected style is 'nop'.

p591-Carp

The error messages produced by Carp now include spaces between the arguments in function argument lists: this makes long error messages appear more nicely in browsers and other tools.

p591-Exporter

Exporter will now recognize grouping tags (such as :name) anywhere in the import list, not only at the beginning.

p591-FindBin

A function again is provided to resolve problems where modules in different directories wish to use FindBin.

p591-List::Util

You can now weaken references to read only values.

p591-threads::shared

cond_wait has a new two argument form. cond_timedwait has been added.

p591-Utility Changes

find2perl now assumes -print as a default action. Previously, it needed to be specified explicitly.

A new utility, prove, makes it easy to run an individual regression test at the command line. prove is part of Test::Harness, which users of earlier Perl versions can install from CPAN.

The perl debugger now supports a save command, to save the current history to a file, and an i command, which prints the inheritance tree of its argument (if the Class::ISA module is installed.)

p591-Documentation

The documentation has been revised in places to produce more standard manpages.

The long-existing feature of /(?{...})/ regexps setting $_ and pos() is now documented.

p591-Performance Enhancements

Sorting arrays in place (@a = sort @a) is now optimized to avoid making a temporary copy of the array.

The operations involving case mapping on UTF-8 strings (uc(), lc(), //i, etc.) have been greatly speeded up.

Access to elements of lexical arrays via a numeric constant between 0 and 255 is now faster. (This used to be only the case for global arrays.)

p591-Selected Bug Fixes

p591-UTF-8 bugs

Using substr() on a UTF-8 string could cause subsequent accesses on that string to return garbage. This was due to incorrect UTF-8 offsets being cached, and is now fixed.

join() could return garbage when the same join() statement was used to process 8 bit data having earlier processed UTF-8 data, due to the flags on that statement's temporary workspace not being reset correctly. This is now fixed.

Using Unicode keys with tied hashes should now work correctly.

chop() and chomp() used to mangle UTF-8 strings. This has been fixed.

sprintf() used to misbehave when the format string was in UTF-8. This is now fixed.

p591-Threading bugs

Hashes with the :unique attribute weren't made read-only in new threads. They are now.

p591-More bugs

$a .. $b will now work as expected when either $a or $b is undef.

Reading $^E now preserves $!. Previously, the C code implementing $^E did not preserve errno, so reading $^E could cause errno and therefore $! to change unexpectedly.

strict wasn't in effect in regexp-eval blocks (/(?{...})/).

p591-New or Changed Diagnostics

A new deprecation warning, Deprecated use of my() in false conditional, has been added, to warn against the use of the dubious and deprecated construct

    my $x if 0;

See perldiag.

The fatal error DESTROY created new reference to dead object is now documented in perldiag.

A new error, %ENV is aliased to %s, is produced when taint checks are enabled and when *ENV has been aliased (and thus doesn't reflect the program's environment anymore.)

p591-Changed Internals

These news matter to you only if you either write XS code or like to know about or hack Perl internals (using Devel::Peek or any of the B:: modules counts), or like to run Perl with the -D option.

p591-Reordering of SVt_* constants

The relative ordering of constants that define the various types of SV have changed; in particular, SVt_PVGV has been moved before SVt_PVLV, SVt_PVAV, SVt_PVHV and SVt_PVCV. This is unlikely to make any difference unless you have code that explicitly makes assumptions about that ordering. (The inheritance hierarchy of B::* objects has been changed to reflect this.)

p591-Removal of CPP symbols

The C preprocessor symbols PERL_PM_APIVERSION and PERL_XS_APIVERSION, which were supposed to give the version number of the oldest perl binary-compatible (resp. source-compatible) with the present one, were not used, and sometimes had misleading values. They have been removed.

p591-Less space is used by ops

The BASEOP structure now uses less space. The op_seq field has been removed and replaced by two one-bit fields, op_opt and op_static. opt_type is now 9 bits long. (Consequently, the B::OP class doesn't provide an seq method anymore.)

p591-New parser

perl's parser is now generated by bison (it used to be generated by byacc.) As a result, it seems to be a bit more robust.

p591-Configuration and Building

Configure now invokes callbacks regardless of the value of the variable they are called for. Previously callbacks were only invoked in the case $variable $define) branch. This change should only affect platform maintainers writing configuration hints files.

The portability and cleanliness of the Win32 makefiles has been improved.

p591-Known Problems

There are still a couple of problems in the implementation of the lexical $_: it doesn't work inside /(?{...})/ blocks and with regard to the reverse() built-in used without arguments. (See the TODO tests in t/op/mydef.t.)

p591-Platform Specific Problems

The test ext/IPC/SysV/t/ipcsysv.t may fail on OpenBSD. This hasn't been diagnosed yet.

On some configurations on AIX 5, one test in lib/Time/Local.t fails. When configured with long doubles, perl may fail tests 224-236 in t/op/pow.t on the same platform.

For threaded builds, ext/threads/shared/t/wait.t has been reported to fail some tests on HP-UX 10.20.

p591-To-do for perl 5.10.0

This is a non-exhaustive, non-ordered, non-contractual and non-definitive list of things to do (or nice to have) for perl 5.10.0 :

Clean up and finish support for assertions. See assertions.

Reimplement the mechanism of lexical pragmas to be more extensible. Fix current pragmas that don't work well (or at all) with lexical scopes or in run-time eval(STRING) (sort, re, encoding for example). MJD has a preliminary patch that implements this.

Fix (or rewrite) the implementation of the /(?{...})/ closures.

Conversions from byte strings to UTF-8 currently map high bit characters to Unicode without translation (or, depending on how you look at it, by implicitly assuming that the byte strings are in Latin-1). As perl assumes the C locale by default, upgrading a string to UTF-8 may change the meaning of its contents regarding character classes, case mapping, etc. This should probably emit a warning (at least).

Introduce a new special block, UNITCHECK, which is run at the end of a compilation unit (module, file, eval(STRING) block). This will correspond to the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the O.pm/B.pm backend framework depends on it.

Study the possibility of adding a new prototype character, _, meaning "this argument defaults to $_".

Make the peephole optimizer optional.

Allow lexical aliases (maybe via the syntax my \$alias = \$foo.

Fix the bugs revealed by running the test suite with the -t switch (via make test.taintwarn).

Make threads more robust.

Make no 6 and no v6 work (opposite of use 5.005, etc.).

A test suite for the B module would be nice.

A ponie.

p591-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.org/ , 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.

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

p590-NAME

perl590delta - what is new for perl v5.9.0

p590-DESCRIPTION

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

p590-Incompatible Changes

p590-Hash Randomisation

Mainly due to security reasons, the "random ordering" of hashes has been made even more random. Previously while the order of hash elements from keys(), values(), and each() was essentially random, it was still repeatable. Now, however, the order varies between different runs of Perl.

Perl has never guaranteed any ordering of the hash keys, and the ordering has already changed several times during the lifetime of Perl 5. Also, the ordering of hash keys has always been, and continues to be, affected by the insertion order.

The added randomness may affect applications.

One possible scenario is when output of an application has included hash data. For example, if you have used the Data::Dumper module to dump data into different files, and then compared the files to see whether the data has changed, now you will have false positives since the order in which hashes are dumped will vary. In general the cure is to sort the keys (or the values); in particular for Data::Dumper to use the Sortkeys option. If some particular order is really important, use tied hashes: for example the Tie::IxHash module which by default preserves the order in which the hash elements were added.

More subtle problem is reliance on the order of "global destruction". That is what happens at the end of execution: Perl destroys all data structures, including user data. If your destructors (the DESTROY subroutines) have assumed any particular ordering to the global destruction, there might be problems ahead. For example, in a destructor of one object you cannot assume that objects of any other class are still available, unless you hold a reference to them. If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero value, or if Perl is exiting a spawned thread, it will also destruct the ordinary references and the symbol tables that are no longer in use. You can't call a class method or an ordinary function on a class that has been collected that way.

The hash randomisation is certain to reveal hidden assumptions about some particular ordering of hash elements, and outright bugs: it revealed a few bugs in the Perl core and core modules.

To disable the hash randomisation in runtime, set the environment variable PERL_HASH_SEED to 0 (zero) before running Perl (for more information see "PERL_HASH_SEED" in perlrun), or to disable the feature completely in compile time, compile with -DNO_HASH_SEED (see INSTALL).

See "Algorithmic Complexity Attacks" in perlsec for the original rationale behind this change.

p590-UTF-8 On Filehandles No Longer Activated By Locale

In Perl 5.8.0 all filehandles, including the standard filehandles, were implicitly set to be in Unicode UTF-8 if the locale settings indicated the use of UTF-8. This feature caused too many problems, so the feature was turned off and redesigned: see "p590-Core Enhancements".

"" >p590-Single-number v-strings are no longer v-strings before "=>"

The version strings or v-strings (see "Version Strings" in perldata) feature introduced in Perl 5.6.0 has been a source of some confusion-- especially when the user did not want to use it, but Perl thought it knew better. Especially troublesome has been the feature that before a "=>" a version string (a "v" followed by digits) has been interpreted as a v-string instead of a string literal. In other words:

        %h = ( v65 => 42 );

has meant since Perl 5.6.0

        %h = ( 'A' => 42 );

(at least in platforms of ASCII progeny) Perl 5.8.1 restored the more natural interpretation

        %h = ( 'v65' => 42 );

The multi-number v-strings like v65.66 and 65.66.67 still continue to be v-strings in Perl 5.8.

p590-(Win32) The -C Switch Has Been Repurposed

The -C switch has changed in an incompatible way. The old semantics of this switch only made sense in Win32 and only in the "use utf8" universe in 5.6.x releases, and do not make sense for the Unicode implementation in 5.8.0. Since this switch could not have been used by anyone, it has been repurposed. The behavior that this switch enabled in 5.6.x releases may be supported in a transparent, data-dependent fashion in a future release.

For the new life of this switch, see "p590-UTF-8 no longer default under UTF-8 locales", and "-C" in perlrun.

p590-(Win32) The /d Switch Of cmd.exe

Since version 5.8.1, perl uses the /d switch when running the cmd.exe shell internally for system(), backticks, and when opening pipes to external programs. The extra switch disables the execution of AutoRun commands from the registry, which is generally considered undesirable when running external programs. If you wish to retain compatibility with the older behavior, set PERL5SHELL in your environment to cmd /x/c.

p590-The $* variable has been removed

$*, which was deprecated in favor of the /s and /m regexp modifiers, has been removed.

p590-Core Enhancements

p590-Assertions

Perl 5.9.0 has experimental support for assertions. Note that the user interface is not fully stabilized yet, and it may change until the 5.10.0 release. A new command-line switch, -A, is used to activate assertions, which are declared with the assertions pragma. See assertions.

p590-Defined-or operators

A new operator // (defined-or) has been implemented. The following statement:

    $a // $b

is merely equivalent to

   defined $a ? $a : $b

and

   $c //= $d;

can be used instead of

   $c = $d unless defined $c;

This operator has the same precedence and associativity as ||. It has a low-precedence counterpart, err, which has the same precedence and associativity as or. Special care has been taken to ensure that those operators Do What You Mean while not breaking old code, but some edge cases involving the empty regular expression may now parse differently. See perlop for details.

p590-UTF-8 no longer default under UTF-8 locales

In Perl 5.8.0 many Unicode features were introduced. One of them was found to be of more nuisance than benefit: the automagic (and silent) "UTF-8-ification" of filehandles, including the standard filehandles, if the user's locale settings indicated use of UTF-8.

For example, if you had en_US.UTF-8 as your locale, your STDIN and STDOUT were automatically "UTF-8", in other words an implicit binmode(..., ":utf8") was made. This meant that trying to print, say, chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what you had in mind unless you were aware of this feature of Perl 5.8.0. The problem is that the vast majority of people weren't: for example in RedHat releases 8 and 9 the default locale setting is UTF-8, so all RedHat users got UTF-8 filehandles, whether they wanted it or not. The pain was intensified by the Unicode implementation of Perl 5.8.0 (still) having nasty bugs, especially related to the use of s/// and tr///. (Bugs that have been fixed in 5.8.1)

Therefore a decision was made to backtrack the feature and change it from implicit silent default to explicit conscious option. The new Perl command line option -C and its counterpart environment variable PERL_UNICODE can now be used to control how Perl and Unicode interact at interfaces like I/O and for example the command line arguments. See "-C" in perlrun and "PERL_UNICODE" in perlrun for more information.

p590-Unsafe signals again available

In Perl 5.8.0 the so-called "safe signals" were introduced. This means that Perl no longer handles signals immediately but instead "between opcodes", when it is safe to do so. The earlier immediate handling easily could corrupt the internal state of Perl, resulting in mysterious crashes.

However, the new safer model has its problems too. Because now an opcode, a basic unit of Perl execution, is never interrupted but instead let to run to completion, certain operations that can take a long time now really do take a long time. For example, certain network operations have their own blocking and timeout mechanisms, and being able to interrupt them immediately would be nice.

Therefore perl 5.8.1 introduced a "backdoor" to restore the pre-5.8.0 (pre-5.7.3, really) signal behaviour. Just set the environment variable PERL_SIGNALS to unsafe, and the old immediate (and unsafe) signal handling behaviour returns. See "PERL_SIGNALS" in perlrun and "Deferred Signals (Safe Signals)" in perlipc.

In completely unrelated news, you can now use safe signals with POSIX::SigAction. See "POSIX::SigAction" in POSIX.

p590-Tied Arrays with Negative Array Indices

Formerly, the indices passed to FETCH, STORE, EXISTS, and DELETE methods in tied array class were always non-negative. If the actual argument was negative, Perl would call FETCHSIZE implicitly and add the result to the index before passing the result to the tied array method. This behaviour is now optional. If the tied array class contains a package variable named $NEGATIVE_INDICES which is set to a true value, negative values will be passed to FETCH, STORE, EXISTS, and DELETE unchanged.

p590-local ${$x}

The syntaxes

        local ${$x}
        local @{$x}
        local %{$x}

now do localise variables, given that the $x is a valid variable name.

p590-Unicode Character Database 4.0.0

The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.0.0 from 3.2.0. This means for example that the Unicode character properties are as in Unicode 4.0.0.

p590-Miscellaneous Enhancements

unpack() now defaults to unpacking the $_.

map in void context is no longer expensive. map is now context aware, and will not construct a list if called in void context.

If a socket gets closed by the server while printing to it, the client now gets a SIGPIPE. While this new feature was not planned, it fell naturally out of PerlIO changes, and is to be considered an accidental feature.

PerlIO::get_layers(FH) returns the names of the PerlIO layers active on a filehandle.

PerlIO::via layers can now have an optional UTF8 method to indicate whether the layer wants to "auto-:utf8" the stream.

utf8::is_utf8() has been added as a quick way to test whether a scalar is encoded internally in UTF-8 (Unicode).

p590-Modules and Pragmata

p590-Updated Modules And Pragmata

The following modules and pragmata have been updated since Perl 5.8.0:

p590-base
p590-B::Bytecode

In much better shape than it used to be. Still far from perfect, but maybe worth a try.

p590-B::Concise
p590-B::Deparse
p590-Benchmark

An optional feature, :hireswallclock, now allows for high resolution wall clock times (uses Time::HiRes).

p590-ByteLoader

See B::Bytecode.

p590-bytes

Now has bytes::substr.

p590-CGI
p590-charnames

One can now have custom character name aliases.

p590-CPAN

There is now a simple command line frontend to the CPAN.pm module called cpan.

p590-Data::Dumper

A new option, Pair, allows choosing the separator between hash keys and values.

p590-DB_File
p590-Devel::PPPort
p590-Digest::MD5
p590-Encode

Significant updates on the encoding pragma functionality (tr/// and the DATA filehandle, formats).

If a filehandle has been marked as to have an encoding, unmappable characters are detected already during input, not later (when the corrupted data is being used).

The ISO 8859-6 conversion table has been corrected (the 0x30..0x39 erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The GSM 03.38 conversion did not handle escape sequences correctly. The UTF-7 encoding has been added (making Encode feature-complete with Unicode::String).

p590-fields
p590-libnet
p590-Math::BigInt

A lot of bugs have been fixed since v1.60, the version included in Perl v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to fail for some large values, and the fixes to the handling of bad inputs.

Some new features were added, e.g. the broot() method, you can now pass parameters to config() to change some settings at runtime, and it is now possible to trap the creation of NaN and infinity.

As usual, some optimizations took place and made the math overall a tad faster. In some cases, quite a lot faster, actually. Especially alternative libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the quite clunky routines like fsqrt() and flog() are now much much faster.

p590-MIME::Base64
p590-NEXT

Diamond inheritance now works.

p590-Net::Ping
p590-PerlIO::scalar

Reading from non-string scalars (like the special variables, see perlvar) now works.

p590-podlators
p590-Pod::LaTeX
p590-PodParsers
p590-Pod::Perldoc

Complete rewrite. As a side-effect, no longer refuses to startup when run by root.

p590-Scalar::Util

New utilities: refaddr, isvstring, looks_like_number, set_prototype.

p590-Storable

Can now store code references (via B::Deparse, so not foolproof).

p590-strict

Earlier versions of the strict pragma did not check the parameters implicitly passed to its "import" (use) and "unimport" (no) routine. This caused the false idiom such as:

        use strict qw(@ISA);
        @ISA = qw(Foo);

This however (probably) raised the false expectation that the strict refs, vars and subs were being enforced (and that @ISA was somehow "declared"). But the strict refs, vars, and subs are not enforced when using this false idiom.

Starting from Perl 5.8.1, the above will cause an error to be raised. This may cause programs which used to execute seemingly correctly without warnings and errors to fail when run under 5.8.1. This happens because

        use strict qw(@ISA);

will now fail with the error:

        Unknown 'strict' tag(s) '@ISA'

The remedy to this problem is to replace this code with the correct idiom:

        use strict;
        use vars qw(@ISA);
        @ISA = qw(Foo);
p590-Term::ANSIcolor
p590-Test::Harness

Now much more picky about extra or missing output from test scripts.

p590-Test::More
p590-Test::Simple
p590-Text::Balanced
p590-Time::HiRes

Use of nanosleep(), if available, allows mixing subsecond sleeps with alarms.

p590-threads

Several fixes, for example for join() problems and memory leaks. In some platforms (like Linux) that use glibc the minimum memory footprint of one ithread has been reduced by several hundred kilobytes.

p590-threads::shared

Many memory leaks have been fixed.

p590-Unicode::Collate
p590-Unicode::Normalize
p590-Win32::GetFolderPath
p590-Win32::GetOSVersion

Now returns extra information.

p590-Utility Changes

The h2xs utility now produces a more modern layout: Foo-Bar/lib/Foo/Bar.pm instead of Foo/Bar/Bar.pm. Also, the boilerplate test is now called t/Foo-Bar.t instead of t/1.t.

The Perl debugger (lib/perl5db.pl) has now been extensively documented and bugs found while documenting have been fixed.

perldoc has been rewritten from scratch to be more robust and feature rich.

perlcc -B works now at least somewhat better, while perlcc -c is rather more broken. (The Perl compiler suite as a whole continues to be experimental.)

p590-New Documentation

perl573delta has been added to list the differences between the (now quite obsolete) development releases 5.7.2 and 5.7.3.

perl58delta and perl581delta have been added: these are the perldeltas of 5.8.0 and 5.8.1, detailing the differences respectively between 5.6.0 and 5.8.0, and between 5.8.0 and 5.8.1.

perlartistic has been added: it is the Artistic License in pod format, making it easier for modules to refer to it.

perlcheat has been added: it is a Perl cheat sheet.

perlgpl has been added: it is the GNU General Public License in pod format, making it easier for modules to refer to it.

perlmacosx has been added to tell about the installation and use of Perl in Mac OS X.

perlos400 has been added to tell about the installation and use of Perl in OS/400 PASE.

perlreref has been added: it is a regular expressions quick reference.

p590-Installation and Configuration Improvements

The Unix standard Perl location, /usr/bin/perl, is no longer overwritten by default if it exists. This change was very prudent because so many Unix vendors already provide a /usr/bin/perl, but simultaneously many system utilities may depend on that exact version of Perl, so better not to overwrite it.

One can now specify installation directories for site and vendor man and HTML pages, and site and vendor scripts. See INSTALL.

One can now specify a destination directory for Perl installation by specifying the DESTDIR variable for make install. (This feature is slightly different from the previous Configure -Dinstallprefix=....) See INSTALL.

gcc versions 3.x introduced a new warning that caused a lot of noise during Perl compilation: gcc -Ialreadyknowndirectory (warning: changing search order). This warning has now been avoided by Configure weeding out such directories before the compilation.

One can now build subsets of Perl core modules by using the Configure flags -Dnoextensions=... and -Donlyextensions=..., see INSTALL.

p590-Platform-specific enhancements

In Cygwin Perl can now be built with threads (Configure -Duseithreads). This works with both Cygwin 1.3.22 and Cygwin 1.5.3.

In newer FreeBSD releases Perl 5.8.0 compilation failed because of trying to use malloc.h, which in FreeBSD is just a dummy file, and a fatal error to even try to use. Now malloc.h is not used.

Perl is now known to build also in Hitachi HI-UXMPP.

Perl is now known to build again in LynxOS.

Mac OS X now installs with Perl version number embedded in installation directory names for easier upgrading of user-compiled Perl, and the installation directories in general are more standard. In other words, the default installation no longer breaks the Apple-provided Perl. On the other hand, with Configure -Dprefix=/usr you can now really replace the Apple-supplied Perl (please be careful).

Mac OS X now builds Perl statically by default. This change was done mainly for faster startup times. The Apple-provided Perl is still dynamically linked and shared, and you can enable the sharedness for your own Perl builds by Configure -Duseshrplib.

Perl has been ported to IBM's OS/400 PASE environment. The best way to build a Perl for PASE is to use an AIX host as a cross-compilation environment. See README.os400.

Yet another cross-compilation option has been added: now Perl builds on OpenZaurus, an Linux distribution based on Mandrake + Embedix for the Sharp Zaurus PDA. See the Cross/README file.

Tru64 when using gcc 3 drops the optimisation for toke.c to -O2 because of gigantic memory use with the default -O3.

Tru64 can now build Perl with the newer Berkeley DBs.

Building Perl on WinCE has been much enhanced, see README.ce and README.perlce.

p590-Selected Bug Fixes

p590-Closures, eval and lexicals

There have been many fixes in the area of anonymous subs, lexicals and closures. Although this means that Perl is now more "correct", it is possible that some existing code will break that happens to rely on the faulty behaviour. In practice this is unlikely unless your code contains a very complex nesting of anonymous subs, evals and lexicals.

p590-Generic fixes

If an input filehandle is marked :utf8 and Perl sees illegal UTF-8 coming in when doing , if warnings are enabled a warning is immediately given - instead of being silent about it and Perl being unhappy about the broken data later. (The :encoding(utf8) layer also works the same way.)

binmode(SOCKET, ":utf8") only worked on the input side, not on the output side of the socket. Now it works both ways.

For threaded Perls certain system database functions like getpwent() and getgrent() now grow their result buffer dynamically, instead of failing. This means that at sites with lots of users and groups the functions no longer fail by returning only partial results.

Perl 5.8.0 had accidentally broken the capability for users to define their own uppercase<->lowercase Unicode mappings (as advertised by the Camel). This feature has been fixed and is also documented better.

In 5.8.0 this

        $some_unicode .= ;

didn't work correctly but instead corrupted the data. This has now been fixed.

Tied methods like FETCH etc. may now safely access tied values, i.e. resulting in a recursive call to FETCH etc. Remember to break the recursion, though.

At startup Perl blocks the SIGFPE signal away since there isn't much Perl can do about it. Previously this blocking was in effect also for programs executed from within Perl. Now Perl restores the original SIGFPE handling routine, whatever it was, before running external programs.

Linenumbers in Perl scripts may now be greater than 65536, or 2**16. (Perl scripts have always been able to be larger than that, it's just that the linenumber for reported errors and warnings have "wrapped around".) While scripts that large usually indicate a need to rethink your code a bit, such Perl scripts do exist, for example as results from generated code. Now linenumbers can go all the way to 4294967296, or 2**32.

p590-Platform-specific fixes

Linux

HP-UX

VMS

Win32

p590-New or Changed Diagnostics

All the warnings related to pack() and unpack() were made more informative and consistent.

p590-Changed "A thread exited while %d threads were running"

The old version

    A thread exited while %d other threads were still running

was misleading because the "other" included also the thread giving the warning.

p590-Removed "Attempt to clear a restricted hash"

It is not illegal to clear a restricted hash, so the warning was removed.

p590-New "Illegal declaration of anonymous subroutine"

You must specify the block of code for sub.

p590-Changed "Invalid range "%s" in transliteration operator"

The old version

    Invalid [] range "%s" in transliteration operator

was simply wrong because there are no "[] ranges" in tr///.

p590-New "Missing control char name in \c"

Self-explanatory.

p590-New "Newline in left-justified string for %s"

The padding spaces would appear after the newline, which is probably not what you had in mind.

p590-New "Possible precedence problem on bitwise %c operator"

If you think this

    $x & $y == 0

tests whether the bitwise AND of $x and $y is zero, you will like this warning.

p590-New "read() on %s filehandle %s"

You cannot read() (or sysread()) from a closed or unopened filehandle.

p590-New "Tied variable freed while still in use"

Something pulled the plug on a live tied variable, Perl plays safe by bailing out.

p590-New "To%s: illegal mapping '%s'"

An illegal user-defined Unicode casemapping was specified.

p590-New "Use of freed value in iteration"

Something modified the values being iterated over. This is not good.

p590-Changed Internals

These news matter to you only if you either write XS code or like to know about or hack Perl internals (using Devel::Peek or any of the B:: modules counts), or like to run Perl with the -D option.

The embedding examples of perlembed have been reviewed to be up to date and consistent: for example, the correct use of PERL_SYS_INIT3() and PERL_SYS_TERM().

Extensive reworking of the pad code (the code responsible for lexical variables) has been conducted by Dave Mitchell.

Extensive work on the v-strings by John Peacock.

UTF-8 length and position cache: to speed up the handling of Unicode (UTF-8) scalars, a cache was introduced. Potential problems exist if an extension bypasses the official APIs and directly modifies the PV of an SV: the UTF-8 cache does not get cleared as it should.

APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, sv_setsv, are again available.

Certain Perl core C APIs like cxinc and regatom are no longer available at all to code outside the Perl core of the Perl core extensions. This is intentional. They never should have been available with the shorter names, and if you application depends on them, you should (be ashamed and) contact perl5-porters to discuss what are the proper APIs.

Certain Perl core C APIs like Perl_list are no longer available without their Perl_ prefix. If your XS module stops working because some functions cannot be found, in many cases a simple fix is to add the Perl_ prefix to the function and the thread context aTHX_ as the first argument of the function call. This is also how it should always have been done: letting the Perl_-less forms to leak from the core was an accident. For cleaner embedding you can also force this for all APIs by defining at compile time the cpp define PERL_NO_SHORT_NAMES.

Perl_save_bool() has been added.

Regexp objects (those created with qr) now have S-magic rather than R-magic. This fixed regexps of the form /...(??{...;$x})/ to no longer ignore changes made to $x. The S-magic avoids dropping the caching optimization and making (??{...}) constructs obscenely slow (and consequently useless). See also "Magic Variables" in perlguts. Regexp::Copy was affected by this change.

The Perl internal debugging macros DEBUG() and DEB() have been renamed to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.

-DL removed (the leaktest had been broken and unsupported for years, use alternative debugging mallocs or tools like valgrind and Purify).

Verbose modifier v added for -DXv and -Dsv, see perlrun.

p590-New Tests

In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, in Perl 5.9.0 there are about 77000 separate tests in about 780 test files. The exact numbers depend on the Perl configuration and on the operating system platform.

p590-Known Problems

The hash randomisation mentioned in "p590-Incompatible Changes" is definitely problematic: it will wake dormant bugs and shake out bad assumptions.

Many of the rarer platforms that worked 100% or pretty close to it with perl 5.8.0 have been left a little bit untended since their maintainers have been otherwise busy lately, and therefore there will be more failures on those platforms. Such platforms include Mac OS Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most common Perl platforms (Unix and Unix-like, Microsoft platforms, and VMS) have large enough testing and expert population that they are doing well.

p590-Tied hashes in scalar context

Tied hashes do not currently return anything useful in scalar context, for example when used as boolean tests:

        if (%tied_hash) { ... }

The current nonsensical behaviour is always to return false, regardless of whether the hash is empty or has elements.

The root cause is that there is no interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context.

p590-Net::Ping 450_service and 510_ping_udp failures

The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have an unusual networking setup. For example in the latter case the test is trying to send a UDP ping to the IP address 127.0.0.1.

p590-B::C

The C-generating compiler backend B::C (the frontend being perlcc -c) is even more broken than it used to be because of the extensive lexical variable changes. (The good news is that B::Bytecode and ByteLoader are better than they used to be.)

p590-Platform Specific Problems

p590-EBCDIC Platforms

IBM z/OS and other EBCDIC platforms continue to be problematic regarding Unicode support. Many Unicode tests are skipped when they really should be fixed.

p590-Cygwin 1.5 problems

In Cygwin 1.5 the io/tell and op/sysio tests have failures for some yet unknown reason. In 1.5.5 the threads tests stress_cv, stress_re, and stress_string are failing unless the environment variable PERLIO is set to "perlio" (which makes also the io/tell failure go away).

Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a) CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ... a 100% "make test" was achieved with Configure -des -Duseithreads.

p590-HP-UX: HP cc warnings about sendfile and sendpath

With certain HP C compiler releases (e.g. B.11.11.02) you will get many warnings like this (lines wrapped for easier reading):

  cc: "/usr/include/sys/socket.h", line 504: warning 562:
    Redeclaration of "sendfile" with a different storage class specifier:
      "sendfile" will have internal linkage.
  cc: "/usr/include/sys/socket.h", line 505: warning 562:
    Redeclaration of "sendpath" with a different storage class specifier:
      "sendpath" will have internal linkage.

The warnings show up both during the build of Perl and during certain lib/ExtUtils tests that invoke the C compiler. The warning, however, is not serious and can be ignored.

p590-IRIX: t/uni/tr_7jis.t falsely failing

The test t/uni/tr_7jis.t is known to report failure under 'make test' or the test harness with certain releases of IRIX (at least IRIX 6.5 and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test fully passes.

p590-Mac OS X: no usemymalloc

The Perl malloc (-Dusemymalloc) does not work at all in Mac OS X. This is not that serious, though, since the native malloc works just fine.

p590-Tru64: No threaded builds with GNU cc (gcc)

In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used to compile a threaded Perl (-Duseithreads) because the system file doesn't know about gcc.

p590-Win32: sysopen, sysread, syswrite

As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave like they used to in 5.6.1 and earlier with respect to "text" mode. These built-ins now always operate in "binary" mode (even if sysopen() was passed the O_TEXT flag, or if binmode() was used on the file handle). Note that this issue should only make a difference for disk files, as sockets and pipes have always been in "binary" mode in the Windows port. As this behavior is currently considered a bug, compatible behavior may be re-introduced in a future release. Until then, the use of sysopen(), sysread() and syswrite() is not supported for "text" mode operations.

p590-TODO

Here are some things that are planned for perl 5.10.0 :

p590-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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/.

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

p589-NAME

perl589delta - what is new for perl v5.8.9

p589-DESCRIPTION

This document describes differences between the 5.8.8 release and the 5.8.9 release.

p589-Notice

The 5.8.9 release will be the last significant release of the 5.8.x series. Any future releases of 5.8.x will likely only be to deal with security issues, and platform build failures. Hence you should look to migrating to 5.10.x, if you have not started already. See "p589-Known Problems" for more information.

p589-Incompatible Changes

A particular construction in the source code of extensions written in C++ may need changing. See "p589-Changed Internals" for more details. All extensions written in C, most written in C++, and all existing compiled extensions are unaffected. This was necessary to improve C++ support.

Other than this, there are no changes intentionally incompatible with 5.8.8. If any exist, they are bugs and reports are welcome.

p589-Core Enhancements

p589-Unicode Character Database 5.1.0.

The copy of the Unicode Character Database included in Perl 5.8 has been updated to 5.1.0 from 4.1.0. See http://www.unicode.org/versions/Unicode5.1.0/#NotableChanges for the notable changes.

p589-stat and -X on directory handles

It is now possible to call stat and the -X filestat operators on directory handles. As both directory and file handles are barewords, there can be ambiguities over which was intended. In these situations the file handle semantics are preferred. Both also treat *FILE{IO} filehandles like *FILE filehandles.

p589-Source filters in @INC

It's possible to enhance the mechanism of subroutine hooks in @INC by adding a source filter on top of the filehandle opened and returned by the hook. This feature was planned a long time ago, but wasn't quite working until now. See "require" in perlfunc for details. (Nicholas Clark)

p589-Exceptions in constant folding

The constant folding routine is now wrapped in an exception handler, and if folding throws an exception (such as attempting to evaluate 0/0), perl now retains the current optree, rather than aborting the whole program. Without this change, programs would not compile if they had expressions that happened to generate exceptions, even though those expressions were in code that could never be reached at runtime. (Nicholas Clark, Dave Mitchell)

p589-no VERSION

You can now use no followed by a version number to specify that you want to use a version of perl older than the specified one.

p589-Improved internal UTF-8 caching code

The code that caches calculated UTF-8 byte offsets for character offsets for a string has been re-written. Several bugs have been located and eliminated, and the code now makes better use of the information it has, so should be faster. In particular, it doesn't scan to the end of a string before calculating an offset within the string, which should speed up some operations on long strings. It is now possible to disable the caching code at run time, to verify that it is not the cause of suspected problems.

p589-Runtime relocatable installations

There is now Configure support for creating a perl tree that is relocatable at run time. see "p589-Relocatable installations".

p589-New internal variables

p589-${^CHILD_ERROR_NATIVE}

This variable gives the native status returned by the last pipe close, backtick command, successful call to wait or waitpid, or from the system operator. See perlvar for details. (Contributed by Gisle Aas.)

p589-${^UTF8CACHE}

This variable controls the state of the internal UTF-8 offset caching code. 1 for on (the default), 0 for off, -1 to debug the caching code by checking all its results against linear scans, and panicking on any discrepancy.

p589-readpipe is now overridable

The built-in function readpipe is now overridable. Overriding it permits also to override its operator counterpart, qx// (also known as ``).

p589-simple exception handling macros

Perl 5.8.9 (and 5.10.0 onwards) now provides a couple of macros to do very basic exception handling in XS modules. You can use these macros if you call code that may croak, but you need to do some cleanup before giving control back to Perl. See "Exception Handling" in perlguts for more details.

p589--D option enhancements

p589-XS-assisted SWASHGET

Some pure-perl code that the regexp engine was using to retrieve Unicode properties and transliteration mappings has been reimplemented in XS for faster execution. (SADAHIRO Tomoyuki)

p589-Constant subroutines

The interpreter internals now support a far more memory efficient form of inlineable constants. Storing a reference to a constant value in a symbol table is equivalent to a full typeglob referencing a constant subroutine, but using about 400 bytes less memory. This proxy constant subroutine is automatically upgraded to a real typeglob with subroutine if necessary. The approach taken is analogous to the existing space optimisation for subroutine stub declarations, which are stored as plain scalars in place of the full typeglob.

However, to aid backwards compatibility of existing code, which (wrongly) does not expect anything other than typeglobs in symbol tables, nothing in core uses this feature, other than the regression tests.

Stubs for prototyped subroutines have been stored in symbol tables as plain strings, and stubs for unprototyped subroutines as the number -1, since 5.005, so code which assumes that the core only places typeglobs in symbol tables has been making incorrect assumptions for over 10 years.

p589-New Platforms

Compile support added for:

p589-Modules and Pragmata

p589-New Modules

p589-Updated Modules

p589-Utility Changes

p589-debugger upgraded to version 1.31

p589-perlthanks

Perl 5.8.9 adds a new utility perlthanks, which is a variant of perlbug, but for sending non-bug-reports to the authors and maintainers of Perl. Getting nothing but bug reports can become a bit demoralising - we'll see if this changes things.

p589-perlbug

perlbug now checks if you're reporting about a non-core module and suggests you report it to the CPAN author instead.

p589-h2xs

p589-h2ph

p589-New Documentation

As usual, the documentation received its share of corrections, clarifications and other nitfixes. More tags were added for indexing.

perlunitut is a tutorial written by Juerd Waalboer on Unicode-related terminology and how to correctly handle Unicode in Perl scripts.

perlunicode is updated in section user defined properties.

perluniintro has been updated in the example of detecting data that is not valid in particular encoding.

perlcommunity provides an overview of the Perl Community along with further resources.

CORE documents the pseudo-namespace for Perl's core routines.

p589-Changes to Existing Documentation

perlglossary adds deprecated modules and features and to be dropped modules.

perlhack has been updated and added resources on smoke testing.

The Perl FAQs (perlfaq1..perlfaq9) have been updated.

perlcheat is updated with better details on \w, \d, and \s.

perldebug is updated with information on how to call the debugger.

perldiag documentation updated with subroutine with an ampersand on the argument to exists and delete and also several terminology updates on warnings.

perlfork documents the limitation of exec inside pseudo-processes.

perlfunc:

perllocale documentation is adjusted for number localization and POSIX::setlocale to fix Debian bug #379463.

perlmodlib is updated with CPAN::API::HOWTO and Sys::Syslog::win32::Win32

perlre documentation updated to reflect the differences between [[:xxxxx:]] and \p{IsXxxxx} matches. Also added section on /g and /c modifiers.

perlreguts describe the internals of the regular expressions engine. It has been contributed by Yves Orton.

perlrebackslash describes all perl regular expression backslash and escape sequences.

perlrecharclass describes the syntax and use of character classes in Perl Regular Expressions.

perlrun is updated to clarify on the hash seed PERL_HASH_SEED. Also more information in options -x and -u.

perlsub example is updated to use a lexical variable for opendir syntax.

perlvar fixes confusion about real GID $( and effective GID $).

Perl thread tutorial example is fixed in section "Queues: Passing Data Around" in perlthrtut and perlothrtut.

perlhack documentation extensively improved by Jarkko Hietaniemi and others.

perltoot provides information on modifying @UNIVERSAL::ISA.

perlport documentation extended to include different kill(-9, ...) semantics on Windows. It also clearly states dump is not supported on Win32 and cygwin.

INSTALL has been updated and modernised.

p589-Performance Enhancements

p589-Installation and Configuration Improvements

p589-Relocatable installations

There is now Configure support for creating a relocatable perl tree. If you Configure with -Duserelocatableinc, then the paths in @INC (and everything else in %Config) can be optionally located via the path of the perl executable.

At start time, if any paths in @INC or Config that Configure marked as relocatable (by starting them with ".../"), then they are prefixed the directory of $^X. This allows the relocation can be configured on a per-directory basis, although the default with -Duserelocatableinc is that everything is relocated. The initial install is done to the original configured prefix.

p589-Configuration improvements

Configure is now better at removing temporary files. Tom Callaway (from RedHat) also contributed patches that complete the set of flags passed to the compiler and the linker, in particular that -fPIC is now enabled on Linux. It will also croak when your /dev/null isn't a device.

A new configuration variable d_pseudofork has been to Configure, and is available as $Config{d_pseudofork} in the Config module. This distinguishes real fork support from the pseudofork emulation used on Windows platforms.

Config.pod and config.sh are now placed correctly for cross-compilation.

$Config{useshrplib} is now 'true' rather than 'yes' when using a shared perl library.

p589-Compilation improvements

Parallel makes should work properly now, although there may still be problems if make test is instructed to run in parallel.

Many compilation warnings have been cleaned up. A very stubborn compiler warning in S_emulate_eaccess() was killed after six attempts. g++ support has been tuned, especially for FreeBSD.

mkppport has been integrated, and all ppport.h files in the core will now be autogenerated at build time (and removed during cleanup).

p589-Installation improvements.

installman now works with -Duserelocatableinc and DESTDIR.

installperl no longer installs:

p589-Platform Specific Changes

There are improved hints for AIX, Cygwin, DEC/OSF, FreeBSD, HP/UX, Irix 6 Linux, MachTen, NetBSD, OS/390, QNX, SCO, Solaris, SunOS, System V Release 5.x (UnixWare 7, OpenUNIX 8), Ultrix, UMIPS, uts and VOS.

p589-FreeBSD

p589-Solaris

p589-VMS

p589-Windows

p589-Selected Bug Fixes

p589-Unicode

Many many bugs related to the internal Unicode implementation (UTF-8) have been fixed. In particular, long standing bugs related to returning Unicode via tie, overloading or $@ are now gone, some of which were never reported.

unpack will internally convert the string back from UTF-8 on numeric types. This is a compromise between the full consistency now in 5.10, and the current behaviour, which is often used as a "feature" on string types.

Using :crlf and UTF-16 IO layers together will now work.

Fixed problems with split, Unicode /\s+/ and / \0/.

Fixed bug RT #40641 - encoding of Unicode characters in regular expressions.

Fixed a bug where using certain patterns in a regexp led to a panic. [RT #45337]

Perl no longer segfaults (due to infinite internal recursion) if the locale's character is not UTF-8 [RT #41442]:

    use open ':locale';
    print STDERR "\x{201e}"; # „

p589-PerlIO

Inconsistencies have been fixed in the reference counting PerlIO uses to keep track of Unix file descriptors, and the API used by XS code to manage getting and releasing FILE *s

p589-Magic

Several bugs have been fixed in Magic, the internal system used to implement features such as tie, tainting and threads sharing.

undef @array on a tied array now correctly calls the CLEAR method.

Some of the bitwise ops were not checking whether their arguments were magical before using them. [RT #24816]

Magic is no longer invoked twice by the expression \&$x

A bug with assigning large numbers and tainting has been resolved. [RT #40708]

A new entry has been added to the MAGIC vtable - svt_local. This is used when copying magic to the new value during local, allowing certain problems with localising shared variables to be resolved.

For the implementation details, see "Magic Virtual Tables" in perlguts.

p589-Reblessing overloaded objects now works

Internally, perl object-ness is on the referent, not the reference, even though methods can only be called via a reference. However, the original implementation of overloading stored flags related to overloading on the reference, relying on the flags being copied when the reference was copied, or set at the creation of a new reference. This manifests in a bug - if you rebless an object from a class that has overloading, into one that does not, then any other existing references think that they (still) point to an overloaded object, choose these C code paths, and then throw errors. Analogously, blessing into an overloaded class when other references exist will result in them not using overloading.

The implementation has been fixed for 5.10, but this fix changes the semantics of flag bits, so is not binary compatible, so can't be applied to 5.8.9. However, 5.8.9 has a work-around that implements the same bug fix. If the referent has multiple references, then all the other references are located and corrected. A full search is avoided whenever possible by scanning lexicals outwards from the current subroutine, and the argument stack.

A certain well known Linux vendor applied incomplete versions of this bug fix to their /usr/bin/perl and then prematurely closed bug reports about performance issues without consulting back upstream. This not being enough, they then proceeded to ignore the necessary fixes to these unreleased changes for 11 months, until massive pressure was applied by their long-suffering paying customers, catalysed by the failings being featured on a prominent blog and Slashdot.

p589-strict now propagates correctly into string evals

Under 5.8.8 and earlier:

    $ perl5.8.8 -e 'use strict; eval "use foo bar" or die $@'
    Can't locate foo.pm in @INC (@INC contains: ... .) at (eval 1) line 2.
    BEGIN failed--compilation aborted at (eval 1) line 2.

Under 5.8.9 and later:

    $ perl5.8.9 -e 'use strict; eval "use foo bar" or die $@'
    Bareword "bar" not allowed while "strict subs" in use at (eval 1) line 1.

This may cause problems with programs that parse the error message and rely on the buggy behaviour.

p589-Other fixes

p589-Platform Specific Fixes

p589-Darwin / MacOS X

p589-OS/2

p589-Tru64

p589-RedHat Linux

p589-Solaris/i386

p589-VMS

p589-Windows

p589-Smaller fixes

p589-New or Changed Diagnostics

p589-panic: sv_chop %s

This new fatal error occurs when the C routine Perl_sv_chop() was passed a position that is not within the scalar's string buffer. This is caused by buggy XS code, and at this point recovery is not possible.

p589-Maximal count of pending signals (%s) exceeded

This new fatal error occurs when the perl process has to abort due to too many pending signals, which is bound to prevent perl from being able to handle further incoming signals safely.

p589-panic: attempt to call %s in %s

This new fatal error occurs when the ACL version file test operator is used where it is not available on the current platform. Earlier checks mean that it should never be possible to get this.

p589-FETCHSIZE returned a negative value

New error indicating that a tied array has claimed to have a negative number of elements.

p589-Can't upgrade %s (%d) to %d

Previously the internal error from the SV upgrade code was the less informative Can't upgrade that kind of scalar. It now reports the current internal type, and the new type requested.

p589-%s argument is not a HASH or ARRAY element or a subroutine

This error, thrown if an invalid argument is provided to exists now correctly includes "or a subroutine". [RT #38955]

p589-Cannot make the non-overridable builtin %s fatal

This error in Fatal previously did not show the name of the builtin in question (now represented by %s above).

p589-Unrecognized character '%s' in column %d

This error previously did not state the column.

p589-Offset outside string

This can now also be generated by a seek on a file handle using PerlIO::scalar.

p589-Invalid escape in the specified encoding in regexp; marked by <-- HERE in m/%s/

New error, introduced as part of the fix to RT #40641 to handle encoding of Unicode characters in regular expression comments.

p589-Your machine doesn't support dump/undump.

A more informative fatal error issued when calling dump on Win32 and Cygwin. (Given that the purpose of dump is to abort with a core dump, and core dumps can't be produced on these platforms, this is more useful than silently exiting.)

p589-Changed Internals

The perl sources can now be compiled with a C++ compiler instead of a C compiler. A necessary implementation details is that under C++, the macro XS used to define XSUBs now includes an extern "C" definition. A side effect of this is that C++ code that used the construction

    typedef XS(SwigPerlWrapper);

now needs to be written

    typedef XSPROTO(SwigPerlWrapper);

using the new XSPROTO macro, in order to compile. C extensions are unaffected, although C extensions are encouraged to use XSPROTO too. This change was present in the 5.10.0 release of perl, so any actively maintained code that happened to use this construction should already have been adapted. Code that needs changing will fail with a compilation error.

set magic on localizing/assigning to a magic variable will now only trigger for container magics, i.e. it will for %ENV or %SIG but not for $#array.

The new API macro newSVpvs() can be used in place of constructions such as newSVpvn("ISA", 3). It takes a single string constant, and at C compile time determines its length.

The new API function Perl_newSV_type() can be used as a more efficient replacement of the common idiom

    sv = newSV(0);
    sv_upgrade(sv, type);

Similarly Perl_newSVpvn_flags() can be used to combine Perl_newSVpv() with Perl_sv_2mortal() or the equivalent Perl_sv_newmortal() with Perl_sv_setpvn()

Two new macros mPUSHs() and mXPUSHs() are added, to make it easier to push mortal SVs onto the stack. They were then used to fix several bugs where values on the stack had not been mortalised.

A Perl_signbit() function was added to test the sign of an NV. It maps to the system one when available.

Perl_av_reify(), Perl_lex_end(), Perl_mod(), Perl_op_clear(), Perl_pop_return(), Perl_qerror(), Perl_setdefout(), Perl_vivify_defelem() and Perl_yylex() are now visible to extensions. This was required to allow Data::Alias to work on Windows.

Perl_find_runcv() is now visible to perl core extensions. This was required to allow Sub::Current to work on Windows.

ptr_table* functions are now available in unthreaded perl. Storable takes advantage of this.

There have been many small cleanups made to the internals. In particular, Perl_sv_upgrade() has been simplified considerably, with a straight-through code path that uses memset() and memcpy() to initialise the new body, rather than assignment via multiple temporary variables. It has also benefited from simplification and de-duplication of the arena management code.

A lot of small improvements in the code base were made due to reports from the Coverity static code analyzer.

Corrected use and documentation of Perl_gv_stashpv(), Perl_gv_stashpvn(), Perl_gv_stashsv() functions (last parameter is a bitmask, not boolean).

PERL_SYS_INIT, PERL_SYS_INIT3 and PERL_SYS_TERM macros have been changed into functions.

PERLSYS_TERM no longer requires a context. PerlIO_teardown() is now called without a context, and debugging output in this function has been disabled because that required that an interpreter was present, an invalid assumption at termination time.

All compile time options which affect binary compatibility have been grouped together into a global variable (PL_bincompat_options).

The values of PERL_REVISION, PERL_VERSION and PERL_SUBVERSION are now baked into global variables (and hence into any shared perl library). Additionally under MULTIPLICITY, the perl executable now records the size of the interpreter structure (total, and for this version). Coupled with PL_bincompat_options this will allow 5.8.10 (and later), when compiled with a shared perl library, to perform sanity checks in main() to verify that the shared library is indeed binary compatible.

Symbolic references can now have embedded NULs. The new public function Perl_get_cvn_flags() can be used in extensions if you have to handle them.

p589-Macro cleanups

The core code, and XS code in ext that is not dual-lived on CPAN, no longer uses the macros PL_na, NEWSV(), Null(), Nullav, Nullcv, Nullhv, Nullhv etc. Their use is discouraged in new code, particularly PL_na, which is a small performance hit.

p589-New Tests

Many modules updated from CPAN incorporate new tests. Some core specific tests have been added:

p589-ext/DynaLoader/t/DynaLoader.t

Tests for the DynaLoader module.

p589-t/comp/fold.t

Tests for compile-time constant folding.

p589-t/io/pvbm.t

Tests incorporated from 5.10.0 which check that there is no unexpected interaction between the internal types PVBM and PVGV.

p589-t/lib/proxy_constant_subs.t

Tests for the new form of constant subroutines.

p589-t/op/attrhand.t

Tests for Attribute::Handlers.

p589-t/op/dbm.t

Tests for dbmopen.

p589-t/op/inccode-tie.t

Calls all tests in t/op/inccode.t after first tying @INC.

p589-t/op/incfilter.t

Tests for source filters returned from code references in @INC.

p589-t/op/kill0.t

Tests for RT #30970.

p589-t/op/qrstack.t

Tests for RT #41484.

p589-t/op/qr.t

Tests for the qr// construct.

p589-t/op/regexp_qr_embed.t

Tests for the qr// construct within another regexp.

p589-t/op/regexp_qr.t

Tests for the qr// construct.

p589-t/op/rxcode.t

Tests for RT #32840.

p589-t/op/studytied.t

Tests for study on tied scalars.

p589-t/op/substT.t

Tests for subst run under -T mode.

p589-t/op/symbolcache.t

Tests for undef and delete on stash entries that are bound to subroutines or methods.

p589-t/op/upgrade.t

Tests for Perl_sv_upgrade().

p589-t/mro/package_aliases.t

MRO tests for isa and package aliases.

p589-t/pod/twice.t

Tests for calling Pod::Parser twice.

p589-t/run/cloexec.t

Tests for inheriting file descriptors across exec (close-on-exec).

p589-t/uni/cache.t

Tests for the UTF-8 caching code.

p589-t/uni/chr.t

Test that strange encodings do not upset Perl_pp_chr().

p589-t/uni/greek.t

Tests for RT #40641.

p589-t/uni/latin2.t

Tests for RT #40641.

p589-t/uni/overload.t

Tests for returning Unicode from overloaded values.

p589-t/uni/tie.t

Tests for returning Unicode from tied variables.

p589-Known Problems

There are no known new bugs.

However, programs that rely on bugs that have been fixed will have problems. Also, many bug fixes present in 5.10.0 can't be back-ported to the 5.8.x branch, because they require changes that are binary incompatible, or because the code changes are too large and hence too risky to incorporate.

We have only limited volunteer labour, and the maintenance burden is getting increasingly complex. Hence this will be the last significant release of the 5.8.x series. Any future releases of 5.8.x will likely only be to deal with security issues, and platform build failures. Hence you should look to migrating to 5.10.x, if you have not started already. Alternatively, if business requirements constrain you to continue to use 5.8.x, you may wish to consider commercial support from firms such as ActiveState.

p589-Platform Specific Notes

p589-Win32

readdir(), cwd(), $^X and @INC now use the alternate (short) filename if the long name is outside the current codepage (Jan Dubois).

p589-Updated Modules

p589-OS/2

p589-Updated Modules

p589-VMS

p589-Updated Modules

p589-Obituary

Nick Ing-Simmons, long time Perl hacker, author of the Tk and Encode modules, perlio.c in the core, and 5.003_02 pumpking, died of a heart attack on 25th September 2006. He will be missed.

p589-Acknowledgements

Some of the work in this release was funded by a TPF grant.

Steve Hay worked behind the scenes working out the causes of the differences between core modules, their CPAN releases, and previous core releases, and the best way to rectify them. He doesn't want to do it again. I know this feeling, and I'm very glad he did it this time, instead of me.

Paul Fenwick assembled a team of 18 volunteers, who broke the back of writing this document. In particular, Bradley Dean, Eddy Tan, and Vincent Pit provided half the team's contribution.

Schwern verified the list of updated module versions, correcting quite a few errors that I (and everyone else) had missed, both wrongly stated module versions, and changed modules that had not been listed.

The crack Berlin-based QA team of Andreas König and Slaven Rezic tirelessly re-built snapshots, tested most everything CPAN against them, and then identified the changes responsible for any module regressions, ensuring that several show-stopper bugs were stomped before the first release candidate was cut.

The other core committers contributed most of the changes, and applied most of the patches sent in by the hundreds of contributors listed in AUTHORS.

And obviously, Larry Wall, without whom we wouldn't have Perl.

p589-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

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

p588-NAME

perl588delta - what is new for perl v5.8.8

p588-DESCRIPTION

This document describes differences between the 5.8.7 release and the 5.8.8 release.

p588-Incompatible Changes

There are no changes intentionally incompatible with 5.8.7. If any exist, they are bugs and reports are welcome.

p588-Core Enhancements

p588-Modules and Pragmata

p588-Utility Changes

p588-h2xs enhancements

h2xs implements new option --use-xsloader to force use of XSLoader even in backwards compatible modules.

The handling of authors' names that had apostrophes has been fixed.

Any enums with negative values are now skipped.

p588-perlivp enhancements

perlivp implements new option -a and will not check for *.ph files by default any more. Use the -a option to run all tests.

p588-New Documentation

The perlglossary manpage is a glossary of terms used in the Perl documentation, technical and otherwise, kindly provided by O'Reilly Media, inc.

p588-Performance Enhancements

p588-Installation and Configuration Improvements

Parallel makes should work properly now, although there may still be problems if make test is instructed to run in parallel.

Building with Borland's compilers on Win32 should work more smoothly. In particular Steve Hay has worked to side step many warnings emitted by their compilers and at least one C compiler internal error.

Configure will now detect clearenv and unsetenv, thanks to a patch from Alan Burlison. It will also probe for futimes and whether sprintf correctly returns the length of the formatted string, which will both be used in perl 5.8.9.

There are improved hints for next-3.0, vmesa, IX, Darwin, Solaris, Linux, DEC/OSF, HP-UX and MPE/iX

Perl extensions on Windows now can be statically built into the Perl DLL, thanks to a work by Vadim Konovalov. (This improvement was actually in 5.8.7, but was accidentally omitted from "p587-NAME").

p588-Selected Bug Fixes

p588-no warnings 'category' works correctly with -w

Previously when running with warnings enabled globally via -w, selective disabling of specific warning categories would actually turn off all warnings. This is now fixed; now no warnings 'io'; will only turn off warnings in the io class. Previously it would erroneously turn off all warnings.

This bug fix may cause some programs to start correctly issuing warnings.

p588-Remove over-optimisation

Perl 5.8.4 introduced a change so that assignments of undef to a scalar, or of an empty list to an array or a hash, were optimised away. As this could cause problems when goto jumps were involved, this change has been backed out.

p588-sprintf() fixes

Using the sprintf() function with some formats could lead to a buffer overflow in some specific cases. This has been fixed, along with several other bugs, notably in bounds checking.

In related fixes, it was possible for badly written code that did not follow the documentation of Sys::Syslog to have formatting vulnerabilities. Sys::Syslog has been changed to protect people from poor quality third party code.

p588-Debugger and Unicode slowdown

It had been reported that running under perl's debugger when processing Unicode data could cause unexpectedly large slowdowns. The most likely cause of this was identified and fixed by Nicholas Clark.

p588-Smaller fixes

p588-New or Changed Diagnostics

p588-Attempt to set length of freed array

This is a new warning, produced in situations such as this:

    $r = do {my @a; \$#a};
    $$r = 503;

p588-Non-string passed as bitmask

This is a new warning, produced when number has been passed as a argument to select(), instead of a bitmask.

    # Wrong, will now warn
    $rin = fileno(STDIN);
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
    
    # Should be
    $rin = '';
    vec($rin,fileno(STDIN),1) = 1;
    ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);

p588-Search pattern not terminated or ternary operator parsed as search pattern

This syntax error indicates that the lexer couldn't find the final delimiter of a ?PATTERN? construct. Mentioning the ternary operator in this error message makes it easier to diagnose syntax errors.

p588-Changed Internals

There has been a fair amount of refactoring of the C source code, partly to make it tidier and more maintainable. The resulting object code and the perl binary may well be smaller than 5.8.7, in particular due to a change contributed by Dave Mitchell which reworked the warnings code to be significantly smaller. Apart from being smaller and possibly faster, there should be no user-detectable changes.

Andy Lester supplied many improvements to determine which function parameters and local variables could actually be declared const to the C compiler. Steve Peters provided new *_set macros and reworked the core to use these rather than assigning to macros in LVALUE context.

Dave Mitchell improved the lexer debugging output under -DT

Nicholas Clark changed the string buffer allocation so that it is now rounded up to the next multiple of 4 (or 8 on platforms with 64 bit pointers). This should reduce the number of calls to realloc without actually using any extra memory.

The HV's array of HE*s is now allocated at the correct (minimal) size, thanks to another change by Nicholas Clark. Compile with -DPERL_USE_LARGE_HV_ALLOC to use the old, sloppier, default.

For XS or embedding debugging purposes, if perl is compiled with -DDEBUG_LEAKING_SCALARS_FORK_DUMP in addition to -DDEBUG_LEAKING_SCALARS then a child process is forked just before global destruction, which is used to display the values of any scalars found to have leaked at the end of global destruction. Without this, the scalars have already been freed sufficiently at the point of detection that it is impossible to produce any meaningful dump of their contents. This feature was implemented by the indefatigable Nicholas Clark, based on an idea by Mike Giroux.

p588-Platform Specific Problems

The optimiser on HP-UX 11.23 (Itanium 2) is currently partly disabled (scaled down to +O1) when using HP C-ANSI-C; the cause of problems at higher optimisation levels is still unclear.

There are a handful of remaining test failures on VMS, mostly due to test fixes and minor module tweaks with too many dependencies to integrate into this release from the development stream, where they have all been corrected. The following is a list of expected failures with the patch number of the fix where that is known:

    ext/Devel/PPPort/t/ppphtest.t  #26913
    ext/List/Util/t/p_tainted.t    #26912
    lib/ExtUtils/t/PL_FILES.t      #26813
    lib/ExtUtils/t/basic.t         #26813
    t/io/fs.t
    t/op/cmp.t

p588-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p587-NAME

perl587delta - what is new for perl v5.8.7

p587-DESCRIPTION

This document describes differences between the 5.8.6 release and the 5.8.7 release.

p587-Incompatible Changes

There are no changes incompatible with 5.8.6.

p587-Core Enhancements

p587-Unicode Character Database 4.1.0

The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.1.0 from 4.0.1. See http://www.unicode.org/versions/Unicode4.1.0/#NotableChanges for the notable changes.

p587-suidperl less insecure

A pair of exploits in suidperl involving debugging code have been closed.

For new projects the core perl team strongly recommends that you use dedicated, single purpose security tools such as sudo in preference to suidperl.

p587-Optional site customization script

The perl interpreter can be built to allow the use of a site customization script. By default this is not enabled, to be consistent with previous perl releases. To use this, add -Dusesitecustomize to the command line flags when running the Configure script. See also "-f" in perlrun.

p587-Config.pm is now much smaller.

Config.pm is now about 3K rather than 32K, with the infrequently used code and %Config values loaded on demand. This is transparent to the programmer, but means that most code will save parsing and loading 29K of script (for example, code that uses File::Find).

p587-Modules and Pragmata

p587-Utility Changes

p587-find2perl enhancements

find2perl has new options -iname, -path and -ipath.

p587-Performance Enhancements

The internal pointer mapping hash used during ithreads cloning now uses an arena for memory allocation. In tests this reduced ithreads cloning time by about 10%.

p587-Installation and Configuration Improvements

p587-Selected Bug Fixes

p587-New or Changed Diagnostics

There is a new taint error, "%ENV is aliased to %s". This error is thrown when taint checks are enabled and when *ENV has been aliased, so that %ENV has no env-magic anymore and hence the environment cannot be verified as taint-free.

The internals of pack and unpack have been updated. All legitimate templates should work as before, but there may be some changes in the error reported for complex failure cases. Any behaviour changes for non-error cases are bugs, and should be reported.

p587-Changed Internals

There has been a fair amount of refactoring of the C source code, partly to make it tidier and more maintainable. The resulting object code and the perl binary may well be smaller than 5.8.6, and hopefully faster in some cases, but apart from this there should be no user-detectable changes.

${^UTF8LOCALE} has been added to give perl space access to PL_utf8locale.

The size of the arenas used to allocate SV heads and most SV bodies can now be changed at compile time. The old size was 1008 bytes, the new default size is 4080 bytes.

p587-Known Problems

Unicode strings returned from overloaded operators can be buggy. This is a long standing bug reported since 5.8.6 was released, but we do not yet have a suitable fix for it.

p587-Platform Specific Problems

On UNICOS, lib/Math/BigInt/t/bigintc.t hangs burning CPU. ext/B/t/bytecode.t and ext/Socket/t/socketpair.t both fail tests. These are unlikely to be resolved, as our valiant UNICOS porter's last Cray is being decommissioned.

p587-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p586-NAME

perl586delta - what is new for perl v5.8.6

p586-DESCRIPTION

This document describes differences between the 5.8.5 release and the 5.8.6 release.

p586-Incompatible Changes

There are no changes incompatible with 5.8.5.

p586-Core Enhancements

The perl interpreter is now more tolerant of UTF-16-encoded scripts.

On Win32, Perl can now use non-IFS compatible LSPs, which allows Perl to work in conjunction with firewalls such as McAfee Guardian. For full details see the file README.win32, particularly if you're running Win95.

p586-Modules and Pragmata

p586-Utility Changes

Perl has a new -dt command-line flag, which enables threads support in the debugger.

p586-Performance Enhancements

reverse sort ... is now optimized to sort in reverse, avoiding the generation of a temporary intermediate list.

for (reverse @foo) now iterates in reverse, avoiding the generation of a temporary reversed list.

p586-Selected Bug Fixes

The regexp engine is now more robust when given invalid utf8 input, as is sometimes generated by buggy XS modules.

foreach on threads::shared array used to be able to crash Perl. This bug has now been fixed.

A regexp in STDOUT's destructor used to coredump, because the regexp pad was already freed. This has been fixed.

goto & is now more robust - bugs in deep recursion and chained goto & have been fixed.

Using delete on an array no longer leaks memory. A pop of an item from a shared array reference no longer causes a leak.

eval_sv() failing a taint test could corrupt the stack - this has been fixed.

On platforms with 64 bit pointers numeric comparison operators used to erroneously compare the addresses of references that are overloaded, rather than using the overloaded values. This has been fixed.

read into a UTF8-encoded buffer with an offset off the end of the buffer no longer mis-calculates buffer lengths.

Although Perl has promised since version 5.8 that sort() would be stable, the two cases sort {$b cmp $a} and sort {$b <=> $a} could produce non-stable sorts. This is corrected in perl5.8.6.

Localising $^D no longer generates a diagnostic message about valid -D flags.

p586-New or Changed Diagnostics

For -t and -T, Too late for "-T" option has been changed to the more informative "-T" is on the #! line, it must also be used on the command line

p586-Changed Internals

From now on all applications embedding perl will behave as if perl were compiled with -DPERL_USE_SAFE_PUTENV. See "Environment access" in the INSTALL file for details.

Most C source files now have comments at the top explaining their purpose, which should help anyone wishing to get an overview of the implementation.

p586-New Tests

There are significantly more tests for the B suite of modules.

p586-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p585-NAME

perl585delta - what is new for perl v5.8.5

p585-DESCRIPTION

This document describes differences between the 5.8.4 release and the 5.8.5 release.

p585-Incompatible Changes

There are no changes incompatible with 5.8.4.

p585-Core Enhancements

Perl's regular expression engine now contains support for matching on the intersection of two Unicode character classes. You can also now refer to user-defined character classes from within other user defined character classes.

p585-Modules and Pragmata

p585-Utility Changes

p585-Perl's debugger

The debugger can now emulate stepping backwards, by restarting and rerunning all bar the last command from a saved command history.

p585-h2ph

h2ph is now able to understand a very limited set of C inline functions -- basically, the inline functions that look like CPP macros. This has been introduced to deal with some of the headers of the newest versions of the glibc. The standard warning still applies; to quote h2ph's documentation, you may need to dicker with the files produced.

p585-Installation and Configuration Improvements

Perl 5.8.5 should build cleanly from source on LynxOS.

p585-Selected Bug Fixes

p585-New or Changed Diagnostics

p585-Changed Internals

The Unicode character class files used by the regular expression engine are now built at build time from the supplied Unicode consortium data files, instead of being shipped prebuilt. This makes the compressed Perl source tarball about 200K smaller. A side effect is that the layout of files inside lib/unicore has changed.

p585-Known Problems

The regression test t/uni/class.t is now performing considerably more tests, and can take several minutes to run even on a fast machine.

p585-Platform Specific Problems

This release is known not to build on Windows 95.

p585-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p584-NAME

perl584delta - what is new for perl v5.8.4

p584-DESCRIPTION

This document describes differences between the 5.8.3 release and the 5.8.4 release.

p584-Incompatible Changes

Many minor bugs have been fixed. Scripts which happen to rely on previously erroneous behaviour will consider these fixes as incompatible changes :-) You are advised to perform sufficient acceptance testing on this release to satisfy yourself that this does not affect you, before putting this release into production.

The diagnostic output of Carp has been changed slightly, to add a space after the comma between arguments. This makes it much easier for tools such as web browsers to wrap it, but might confuse any automatic tools which perform detailed parsing of Carp output.

The internal dump output has been improved, so that non-printable characters such as newline and backspace are output in \x notation, rather than octal. This might just confuse non-robust tools which parse the output of modules such as Devel::Peek.

p584-Core Enhancements

p584-Malloc wrapping

Perl can now be built to detect attempts to assign pathologically large chunks of memory. Previously such assignments would suffer from integer wrap-around during size calculations causing a misallocation, which would crash perl, and could theoretically be used for "stack smashing" attacks. The wrapping defaults to enabled on platforms where we know it works (most AIX configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP/UX, GNU Linux, OpenBSD, Solaris, VMS and most Win32 compilers) and defaults to disabled on other platforms.

p584-Unicode Character Database 4.0.1

The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.0.1 from 4.0.0.

p584-suidperl less insecure

Paul Szabo has analysed and patched suidperl to remove existing known insecurities. Currently there are no known holes in suidperl, but previous experience shows that we cannot be confident that these were the last. You may no longer invoke the set uid perl directly, so to preserve backwards compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid binary is now sperl5.8.n (sperl5.8.4 for this release). suidperl is installed as a hard link to perl; both suidperl and perl will invoke sperl5.8.4 automatically the set uid binary, so this change should be completely transparent.

For new projects the core perl team would strongly recommend that you use dedicated, single purpose security tools such as sudo in preference to suidperl.

p584-format

In addition to bug fixes, format's features have been enhanced. See perlform

p584-Modules and Pragmata

The (mis)use of /tmp in core modules and documentation has been tidied up. Some modules available both within the perl core and independently from CPAN ("dual-life modules") have not yet had these changes applied; the changes will be integrated into future stable perl releases as the modules are updated on CPAN.

p584-Updated modules

p584-Attribute::Handlers
p584-B
p584-Benchmark
p584-CGI
p584-Carp
p584-Cwd
p584-Exporter
p584-File::Find
p584-IO
p584-IPC::Open3
p584-Local::Maketext
p584-Math::BigFloat
p584-Math::BigInt
p584-Math::BigRat
p584-MIME::Base64
p584-ODBM_File
p584-POSIX
p584-Shell
p584-Socket

There is experimental support for Linux abstract Unix domain sockets.

p584-Storable
p584-Switch

Synced with its CPAN version 2.10

p584-Sys::Syslog

syslog() can now use numeric constants for facility names and priorities, in addition to strings.

p584-Term::ANSIColor
p584-Time::HiRes
p584-Unicode::UCD
p584-Win32

Win32.pm/Win32.xs has moved from the libwin32 module to core Perl

p584-base
p584-open
p584-threads

Detached threads are now also supported on Windows.

p584-utf8

p584-Performance Enhancements

p584-Utility Changes

The Perl debugger (lib/perl5db.pl) can now save all debugger commands for sourcing later, and can display the parent inheritance tree of a given class.

p584-Installation and Configuration Improvements

The build process on both VMS and Windows has had several minor improvements made. On Windows Borland's C compiler can now compile perl with PerlIO and/or USE_LARGE_FILES enabled.

perl.exe on Windows now has a "Camel" logo icon. The use of a camel with the topic of Perl is a trademark of O'Reilly and Associates Inc., and is used with their permission (ie distribution of the source, compiling a Windows executable from it, and using that executable locally). Use of the supplied camel for anything other than a perl executable's icon is specifically not covered, and anyone wishing to redistribute perl binaries with the icon should check directly with O'Reilly beforehand.

Perl should build cleanly on Stratus VOS once more.

p584-Selected Bug Fixes

More utf8 bugs fixed, notably in how chomp, chop, send, and syswrite and interact with utf8 data. Concatenation now works correctly when use bytes; is in scope.

Pragmata are now correctly propagated into (?{...}) constructions in regexps. Code such as

   my $x = qr{ ... (??{ $x }) ... };

will now (correctly) fail under use strict. (As the inner $x is and has always referred to $::x)

The "const in void context" warning has been suppressed for a constant in an optimised-away boolean expression such as 5 || print;

perl -i could fchmod(stdin) by mistake. This is serious if stdin is attached to a terminal, and perl is running as root. Now fixed.

p584-New or Changed Diagnostics

Carp and the internal diagnostic routines used by Devel::Peek have been made clearer, as described in "p584-Incompatible Changes"

p584-Changed Internals

Some bugs have been fixed in the hash internals. Restricted hashes and their place holders are now allocated and deleted at slightly different times, but this should not be visible to user code.

p584-Future Directions

Code freeze for the next maintenance release (5.8.5) will be on 30th June 2004, with release by mid July.

p584-Platform Specific Problems

This release is known not to build on Windows 95.

p584-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p583-NAME

perl583delta - what is new for perl v5.8.3

p583-DESCRIPTION

This document describes differences between the 5.8.2 release and the 5.8.3 release.

If you are upgrading from an earlier release such as 5.6.1, first read the "p58-NAME", which describes differences between 5.6.0 and 5.8.0, and the "p581-NAME" and "p582-NAME", which describe differences between 5.8.0, 5.8.1 and 5.8.2

p583-Incompatible Changes

There are no changes incompatible with 5.8.2.

p583-Core Enhancements

A SCALAR method is now available for tied hashes. This is called when a tied hash is used in scalar context, such as

    if (%tied_hash) {
        ...
    }

The old behaviour was that %tied_hash would return whatever would have been returned for that hash before the hash was tied (so usually 0). The new behaviour in the absence of a SCALAR method is to return TRUE if in the middle of an each iteration, and otherwise call FIRSTKEY to check if the hash is empty (making sure that a subsequent each will also begin by calling FIRSTKEY). Please see "SCALAR" in perltie for the full details and caveats.

p583-Modules and Pragmata

p583-CGI
p583-Cwd
p583-Digest
p583-Digest::MD5
p583-Encode
p583-File::Spec
p583-FindBin

A function again is provided to resolve problems where modules in different directories wish to use FindBin.

p583-List::Util

You can now weaken references to read only values.

p583-Math::BigInt
p583-PodParser
p583-Pod::Perldoc
p583-POSIX
p583-Unicode::Collate
p583-Unicode::Normalize
p583-Test::Harness
p583-threads::shared

cond_wait has a new two argument form. cond_timedwait has been added.

p583-Utility Changes

find2perl now assumes -print as a default action. Previously, it needed to be specified explicitly.

A new utility, prove, makes it easy to run an individual regression test at the command line. prove is part of Test::Harness, which users of earlier Perl versions can install from CPAN.

p583-New Documentation

The documentation has been revised in places to produce more standard manpages.

The documentation for the special code blocks (BEGIN, CHECK, INIT, END) has been improved.

p583-Installation and Configuration Improvements

Perl now builds on OpenVMS I64

p583-Selected Bug Fixes

Using substr() on a UTF8 string could cause subsequent accesses on that string to return garbage. This was due to incorrect UTF8 offsets being cached, and is now fixed.

join() could return garbage when the same join() statement was used to process 8 bit data having earlier processed UTF8 data, due to the flags on that statement's temporary workspace not being reset correctly. This is now fixed.

$a .. $b will now work as expected when either $a or $b is undef

Using Unicode keys with tied hashes should now work correctly.

Reading $^E now preserves $!. Previously, the C code implementing $^E did not preserve errno, so reading $^E could cause errno and therefore $! to change unexpectedly.

Reentrant functions will (once more) work with C++. 5.8.2 introduced a bugfix which accidentally broke the compilation of Perl extensions written in C++

p583-New or Changed Diagnostics

The fatal error "DESTROY created new reference to dead object" is now documented in perldiag.

p583-Changed Internals

The hash code has been refactored to reduce source duplication. The external interface is unchanged, and aside from the bug fixes described above, there should be no change in behaviour.

hv_clear_placeholders is now part of the perl API

Some C macros have been tidied. In particular macros which create temporary local variables now name these variables more defensively, which should avoid bugs where names clash.

is now always included.

p583-Configuration and Building

Configure now invokes callbacks regardless of the value of the variable they are called for. Previously callbacks were only invoked in the case $variable $define) branch. This change should only affect platform maintainers writing configuration hints files.

p583-Platform Specific Problems

The regression test ext/threads/shared/t/wait.t fails on early RedHat 9 and HP-UX 10.20 due to bugs in their threading implementations. RedHat users should see https://rhn.redhat.com/errata/RHBA-2003-136.html and consider upgrading their glibc.

p583-Known Problems

Detached threads aren't supported on Windows yet, as they may lead to memory access violation problems.

There is a known race condition opening scripts in suidperl. suidperl is neither built nor installed by default, and has been deprecated since perl 5.8.0. You are advised to replace use of suidperl with tools such as sudo ( http://www.courtesan.com/sudo/ )

We have a backlog of unresolved bugs. Dealing with bugs and bug reports is unglamorous work; not something ideally suited to volunteer labour, but that is all that we have.

The perl5 development team are implementing changes to help address this problem, which should go live in early 2004.

p583-Future Directions

Code freeze for the next maintenance release (5.8.4) is on March 31st 2004, with release expected by mid April. Similarly 5.8.5's freeze will be at the end of June, with release by mid July.

p583-Obituary

Iain 'Spoon' Truskett, Perl hacker, author of perlreref and contributor to CPAN, died suddenly on 29th December 2003, aged 24. He will be missed.

p583-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.org, 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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p582-NAME

perl582delta - what is new for perl v5.8.2

p582-DESCRIPTION

This document describes differences between the 5.8.1 release and the 5.8.2 release.

If you are upgrading from an earlier release such as 5.6.1, first read the "p58-NAME", which describes differences between 5.6.0 and 5.8.0, and the "p581-NAME", which describes differences between 5.8.0 and 5.8.1.

p582-Incompatible Changes

For threaded builds for modules calling certain re-entrant system calls, binary compatibility was accidentally lost between 5.8.0 and 5.8.1. Binary compatibility with 5.8.0 has been restored in 5.8.2, which necessitates breaking compatibility with 5.8.1. We see this as the lesser of two evils.

This will only affect people who have a threaded perl 5.8.1, and compiled modules which use these calls, and now attempt to run the compiled modules with 5.8.2. The fix is to re-compile and re-install the modules using 5.8.2.

p582-Core Enhancements

p582-Hash Randomisation

The hash randomisation introduced with 5.8.1 has been amended. It transpired that although the implementation introduced in 5.8.1 was source compatible with 5.8.0, it was not binary compatible in certain cases. 5.8.2 contains an improved implementation which is both source and binary compatible with both 5.8.0 and 5.8.1, and remains robust against the form of attack which prompted the change for 5.8.1.

We are grateful to the Debian project for their input in this area. See "Algorithmic Complexity Attacks" in perlsec for the original rationale behind this change.

p582-Threading

Several memory leaks associated with variables shared between threads have been fixed.

p582-Modules and Pragmata

p582-Updated Modules And Pragmata

The following modules and pragmata have been updated since Perl 5.8.1:

p582-Devel::PPPort
p582-Digest::MD5
p582-I18N::LangTags
p582-libnet
p582-MIME::Base64
p582-Pod::Perldoc
p582-strict

Documentation improved

p582-Tie::Hash

Documentation improved

p582-Time::HiRes
p582-Unicode::Collate
p582-Unicode::Normalize
p582-UNIVERSAL

Documentation improved

p582-Selected Bug Fixes

Some syntax errors involving unrecognized filetest operators are now handled correctly by the parser.

p582-Changed Internals

Interpreter initialization is more complete when -DMULTIPLICITY is off. This should resolve problems with initializing and destroying the Perl interpreter more than once in a single process.

p582-Platform Specific Problems

Dynamic linker flags have been tweaked for Solaris and OS X, which should solve problems seen while building some XS modules.

Bugs in OS/2 sockets and tmpfile have been fixed.

In OS X setreuid and friends are troublesome - perl will now work around their problems as best possible.

p582-Future Directions

Starting with 5.8.3 we intend to make more frequent maintenance releases, with a smaller number of changes in each. The intent is to propagate bug fixes out to stable releases more rapidly and make upgrading stable releases less of an upheaval. This should give end users more flexibility in their choice of upgrade timing, and allow them easier assessment of the impact of upgrades. The current plan is for code freezes as follows

with the release following soon after, when testing is complete.

See "p581-Future Directions" for more soothsaying.

p582-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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p581-NAME

perl581delta - what is new for perl v5.8.1

p581-DESCRIPTION

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

If you are upgrading from an earlier release such as 5.6.1, first read the "p58-NAME", which describes differences between 5.6.0 and 5.8.0.

In case you are wondering about 5.6.1, it was bug-fix-wise rather identical to the development release 5.7.1. Confused? This timeline hopefully helps a bit: it lists the new major releases, their maintenance releases, and the development releases.

          New     Maintenance  Development

          5.6.0                             2000-Mar-22
                               5.7.0        2000-Sep-02
                  5.6.1                     2001-Apr-08
                               5.7.1        2001-Apr-09
                               5.7.2        2001-Jul-13
                               5.7.3        2002-Mar-05
          5.8.0                             2002-Jul-18
                  5.8.1                     2003-Sep-25

p581-Incompatible Changes

p581-Hash Randomisation

Mainly due to security reasons, the "random ordering" of hashes has been made even more random. Previously while the order of hash elements from keys(), values(), and each() was essentially random, it was still repeatable. Now, however, the order varies between different runs of Perl.

Perl has never guaranteed any ordering of the hash keys, and the ordering has already changed several times during the lifetime of Perl 5. Also, the ordering of hash keys has always been, and continues to be, affected by the insertion order.

The added randomness may affect applications.

One possible scenario is when output of an application has included hash data. For example, if you have used the Data::Dumper module to dump data into different files, and then compared the files to see whether the data has changed, now you will have false positives since the order in which hashes are dumped will vary. In general the cure is to sort the keys (or the values); in particular for Data::Dumper to use the Sortkeys option. If some particular order is really important, use tied hashes: for example the Tie::IxHash module which by default preserves the order in which the hash elements were added.

More subtle problem is reliance on the order of "global destruction". That is what happens at the end of execution: Perl destroys all data structures, including user data. If your destructors (the DESTROY subroutines) have assumed any particular ordering to the global destruction, there might be problems ahead. For example, in a destructor of one object you cannot assume that objects of any other class are still available, unless you hold a reference to them. If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero value, or if Perl is exiting a spawned thread, it will also destruct the ordinary references and the symbol tables that are no longer in use. You can't call a class method or an ordinary function on a class that has been collected that way.

The hash randomisation is certain to reveal hidden assumptions about some particular ordering of hash elements, and outright bugs: it revealed a few bugs in the Perl core and core modules.

To disable the hash randomisation in runtime, set the environment variable PERL_HASH_SEED to 0 (zero) before running Perl (for more information see "PERL_HASH_SEED" in perlrun), or to disable the feature completely in compile time, compile with -DNO_HASH_SEED (see INSTALL).

See "Algorithmic Complexity Attacks" in perlsec for the original rationale behind this change.

p581-UTF-8 On Filehandles No Longer Activated By Locale

In Perl 5.8.0 all filehandles, including the standard filehandles, were implicitly set to be in Unicode UTF-8 if the locale settings indicated the use of UTF-8. This feature caused too many problems, so the feature was turned off and redesigned: see "p581-Core Enhancements".

"" >p581-Single-number v-strings are no longer v-strings before "=>"

The version strings or v-strings (see "Version Strings" in perldata) feature introduced in Perl 5.6.0 has been a source of some confusion-- especially when the user did not want to use it, but Perl thought it knew better. Especially troublesome has been the feature that before a "=>" a version string (a "v" followed by digits) has been interpreted as a v-string instead of a string literal. In other words:

        %h = ( v65 => 42 );

has meant since Perl 5.6.0

        %h = ( 'A' => 42 );

(at least in platforms of ASCII progeny) Perl 5.8.1 restores the more natural interpretation

        %h = ( 'v65' => 42 );

The multi-number v-strings like v65.66 and 65.66.67 still continue to be v-strings in Perl 5.8.

p581-(Win32) The -C Switch Has Been Repurposed

The -C switch has changed in an incompatible way. The old semantics of this switch only made sense in Win32 and only in the "use utf8" universe in 5.6.x releases, and do not make sense for the Unicode implementation in 5.8.0. Since this switch could not have been used by anyone, it has been repurposed. The behavior that this switch enabled in 5.6.x releases may be supported in a transparent, data-dependent fashion in a future release.

For the new life of this switch, see "p581-UTF-8 no longer default under UTF-8 locales", and "-C" in perlrun.

p581-(Win32) The /d Switch Of cmd.exe

Perl 5.8.1 uses the /d switch when running the cmd.exe shell internally for system(), backticks, and when opening pipes to external programs. The extra switch disables the execution of AutoRun commands from the registry, which is generally considered undesirable when running external programs. If you wish to retain compatibility with the older behavior, set PERL5SHELL in your environment to cmd /x/c.

p581-Core Enhancements

p581-UTF-8 no longer default under UTF-8 locales

In Perl 5.8.0 many Unicode features were introduced. One of them was found to be of more nuisance than benefit: the automagic (and silent) "UTF-8-ification" of filehandles, including the standard filehandles, if the user's locale settings indicated use of UTF-8.

For example, if you had en_US.UTF-8 as your locale, your STDIN and STDOUT were automatically "UTF-8", in other words an implicit binmode(..., ":utf8") was made. This meant that trying to print, say, chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what you had in mind unless you were aware of this feature of Perl 5.8.0. The problem is that the vast majority of people weren't: for example in RedHat releases 8 and 9 the default locale setting is UTF-8, so all RedHat users got UTF-8 filehandles, whether they wanted it or not. The pain was intensified by the Unicode implementation of Perl 5.8.0 (still) having nasty bugs, especially related to the use of s/// and tr///. (Bugs that have been fixed in 5.8.1)

Therefore a decision was made to backtrack the feature and change it from implicit silent default to explicit conscious option. The new Perl command line option -C and its counterpart environment variable PERL_UNICODE can now be used to control how Perl and Unicode interact at interfaces like I/O and for example the command line arguments. See "-C" in perlrun and "PERL_UNICODE" in perlrun for more information.

p581-Unsafe signals again available

In Perl 5.8.0 the so-called "safe signals" were introduced. This means that Perl no longer handles signals immediately but instead "between opcodes", when it is safe to do so. The earlier immediate handling easily could corrupt the internal state of Perl, resulting in mysterious crashes.

However, the new safer model has its problems too. Because now an opcode, a basic unit of Perl execution, is never interrupted but instead let to run to completion, certain operations that can take a long time now really do take a long time. For example, certain network operations have their own blocking and timeout mechanisms, and being able to interrupt them immediately would be nice.

Therefore perl 5.8.1 introduces a "backdoor" to restore the pre-5.8.0 (pre-5.7.3, really) signal behaviour. Just set the environment variable PERL_SIGNALS to unsafe, and the old immediate (and unsafe) signal handling behaviour returns. See "PERL_SIGNALS" in perlrun and "Deferred Signals (Safe Signals)" in perlipc.

In completely unrelated news, you can now use safe signals with POSIX::SigAction. See "POSIX::SigAction" in POSIX.

p581-Tied Arrays with Negative Array Indices

Formerly, the indices passed to FETCH, STORE, EXISTS, and DELETE methods in tied array class were always non-negative. If the actual argument was negative, Perl would call FETCHSIZE implicitly and add the result to the index before passing the result to the tied array method. This behaviour is now optional. If the tied array class contains a package variable named $NEGATIVE_INDICES which is set to a true value, negative values will be passed to FETCH, STORE, EXISTS, and DELETE unchanged.

p581-local ${$x}

The syntaxes

        local ${$x}
        local @{$x}
        local %{$x}

now do localise variables, given that the $x is a valid variable name.

p581-Unicode Character Database 4.0.0

The copy of the Unicode Character Database included in Perl 5.8 has been updated to 4.0.0 from 3.2.0. This means for example that the Unicode character properties are as in Unicode 4.0.0.

p581-Deprecation Warnings

There is one new feature deprecation. Perl 5.8.0 forgot to add some deprecation warnings, these warnings have now been added. Finally, a reminder of an impending feature removal.

p581-(Reminder) Pseudo-hashes are deprecated (really)

Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in Perl 5.10.0, see "p58-NAME" for details. Each attempt to access pseudo-hashes will trigger the warning Pseudo-hashes are deprecated. If you really want to continue using pseudo-hashes but not to see the deprecation warnings, use:

    no warnings 'deprecated';

Or you can continue to use the fields pragma, but please don't expect the data structures to be pseudohashes any more.

p581-(Reminder) 5.005-style threads are deprecated (really)

5.005-style threads (activated by use Thread;) were deprecated in Perl 5.8.0 and will be removed after Perl 5.8, see "p58-NAME" for details. Each 5.005-style thread creation will trigger the warning 5.005 threads are deprecated. If you really want to continue using the 5.005 threads but not to see the deprecation warnings, use:

    no warnings 'deprecated';

p581-(Reminder) The $* variable is deprecated (really)

The $* variable controlling multi-line matching has been deprecated and will be removed after 5.8. The variable has been deprecated for a long time, and a deprecation warning Use of $* is deprecated is given, now the variable will just finally be removed. The functionality has been supplanted by the /s and /m modifiers on pattern matching. If you really want to continue using the $*-variable but not to see the deprecation warnings, use:

    no warnings 'deprecated';

p581-Miscellaneous Enhancements

map in void context is no longer expensive. map is now context aware, and will not construct a list if called in void context.

If a socket gets closed by the server while printing to it, the client now gets a SIGPIPE. While this new feature was not planned, it fell naturally out of PerlIO changes, and is to be considered an accidental feature.

PerlIO::get_layers(FH) returns the names of the PerlIO layers active on a filehandle.

PerlIO::via layers can now have an optional UTF8 method to indicate whether the layer wants to "auto-:utf8" the stream.

utf8::is_utf8() has been added as a quick way to test whether a scalar is encoded internally in UTF-8 (Unicode).

p581-Modules and Pragmata

p581-Updated Modules And Pragmata

The following modules and pragmata have been updated since Perl 5.8.0:

p581-base
p581-B::Bytecode

In much better shape than it used to be. Still far from perfect, but maybe worth a try.

p581-B::Concise
p581-B::Deparse
p581-Benchmark

An optional feature, :hireswallclock, now allows for high resolution wall clock times (uses Time::HiRes).

p581-ByteLoader

See B::Bytecode.

p581-bytes

Now has bytes::substr.

p581-CGI
p581-charnames

One can now have custom character name aliases.

p581-CPAN

There is now a simple command line frontend to the CPAN.pm module called cpan.

p581-Data::Dumper

A new option, Pair, allows choosing the separator between hash keys and values.

p581-DB_File
p581-Devel::PPPort
p581-Digest::MD5
p581-Encode

Significant updates on the encoding pragma functionality (tr/// and the DATA filehandle, formats).

If a filehandle has been marked as to have an encoding, unmappable characters are detected already during input, not later (when the corrupted data is being used).

The ISO 8859-6 conversion table has been corrected (the 0x30..0x39 erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The GSM 03.38 conversion did not handle escape sequences correctly. The UTF-7 encoding has been added (making Encode feature-complete with Unicode::String).

p581-fields
p581-libnet
p581-Math::BigInt

A lot of bugs have been fixed since v1.60, the version included in Perl v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to fail for some large values, and the fixes to the handling of bad inputs.

Some new features were added, e.g. the broot() method, you can now pass parameters to config() to change some settings at runtime, and it is now possible to trap the creation of NaN and infinity.

As usual, some optimizations took place and made the math overall a tad faster. In some cases, quite a lot faster, actually. Especially alternative libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the quite clunky routines like fsqrt() and flog() are now much much faster.

p581-MIME::Base64
p581-NEXT

Diamond inheritance now works.

p581-Net::Ping
p581-PerlIO::scalar

Reading from non-string scalars (like the special variables, see perlvar) now works.

p581-podlators
p581-Pod::LaTeX
p581-PodParsers
p581-Pod::Perldoc

Complete rewrite. As a side-effect, no longer refuses to startup when run by root.

p581-Scalar::Util

New utilities: refaddr, isvstring, looks_like_number, set_prototype.

p581-Storable

Can now store code references (via B::Deparse, so not foolproof).

p581-strict

Earlier versions of the strict pragma did not check the parameters implicitly passed to its "import" (use) and "unimport" (no) routine. This caused the false idiom such as:

        use strict qw(@ISA);
        @ISA = qw(Foo);

This however (probably) raised the false expectation that the strict refs, vars and subs were being enforced (and that @ISA was somehow "declared"). But the strict refs, vars, and subs are not enforced when using this false idiom.

Starting from Perl 5.8.1, the above will cause an error to be raised. This may cause programs which used to execute seemingly correctly without warnings and errors to fail when run under 5.8.1. This happens because

        use strict qw(@ISA);

will now fail with the error:

        Unknown 'strict' tag(s) '@ISA'

The remedy to this problem is to replace this code with the correct idiom:

        use strict;
        use vars qw(@ISA);
        @ISA = qw(Foo);
p581-Term::ANSIcolor
p581-Test::Harness

Now much more picky about extra or missing output from test scripts.

p581-Test::More
p581-Test::Simple
p581-Text::Balanced
p581-Time::HiRes

Use of nanosleep(), if available, allows mixing subsecond sleeps with alarms.

p581-threads

Several fixes, for example for join() problems and memory leaks. In some platforms (like Linux) that use glibc the minimum memory footprint of one ithread has been reduced by several hundred kilobytes.

p581-threads::shared

Many memory leaks have been fixed.

p581-Unicode::Collate
p581-Unicode::Normalize
p581-Win32::GetFolderPath
p581-Win32::GetOSVersion

Now returns extra information.

p581-Utility Changes

The h2xs utility now produces a more modern layout: Foo-Bar/lib/Foo/Bar.pm instead of Foo/Bar/Bar.pm. Also, the boilerplate test is now called t/Foo-Bar.t instead of t/1.t.

The Perl debugger (lib/perl5db.pl) has now been extensively documented and bugs found while documenting have been fixed.

perldoc has been rewritten from scratch to be more robust and feature rich.

perlcc -B works now at least somewhat better, while perlcc -c is rather more broken. (The Perl compiler suite as a whole continues to be experimental.)

p581-New Documentation

perl573delta has been added to list the differences between the (now quite obsolete) development releases 5.7.2 and 5.7.3.

perl58delta has been added: it is the perldelta of 5.8.0, detailing the differences between 5.6.0 and 5.8.0.

perlartistic has been added: it is the Artistic License in pod format, making it easier for modules to refer to it.

perlcheat has been added: it is a Perl cheat sheet.

perlgpl has been added: it is the GNU General Public License in pod format, making it easier for modules to refer to it.

perlmacosx has been added to tell about the installation and use of Perl in Mac OS X.

perlos400 has been added to tell about the installation and use of Perl in OS/400 PASE.

perlreref has been added: it is a regular expressions quick reference.

p581-Installation and Configuration Improvements

The Unix standard Perl location, /usr/bin/perl, is no longer overwritten by default if it exists. This change was very prudent because so many Unix vendors already provide a /usr/bin/perl, but simultaneously many system utilities may depend on that exact version of Perl, so better not to overwrite it.

One can now specify installation directories for site and vendor man and HTML pages, and site and vendor scripts. See INSTALL.

One can now specify a destination directory for Perl installation by specifying the DESTDIR variable for make install. (This feature is slightly different from the previous Configure -Dinstallprefix=....) See INSTALL.

gcc versions 3.x introduced a new warning that caused a lot of noise during Perl compilation: gcc -Ialreadyknowndirectory (warning: changing search order). This warning has now been avoided by Configure weeding out such directories before the compilation.

One can now build subsets of Perl core modules by using the Configure flags -Dnoextensions=... and -Donlyextensions=..., see INSTALL.

p581-Platform-specific enhancements

In Cygwin Perl can now be built with threads (Configure -Duseithreads). This works with both Cygwin 1.3.22 and Cygwin 1.5.3.

In newer FreeBSD releases Perl 5.8.0 compilation failed because of trying to use malloc.h, which in FreeBSD is just a dummy file, and a fatal error to even try to use. Now malloc.h is not used.

Perl is now known to build also in Hitachi HI-UXMPP.

Perl is now known to build again in LynxOS.

Mac OS X now installs with Perl version number embedded in installation directory names for easier upgrading of user-compiled Perl, and the installation directories in general are more standard. In other words, the default installation no longer breaks the Apple-provided Perl. On the other hand, with Configure -Dprefix=/usr you can now really replace the Apple-supplied Perl (please be careful).

Mac OS X now builds Perl statically by default. This change was done mainly for faster startup times. The Apple-provided Perl is still dynamically linked and shared, and you can enable the sharedness for your own Perl builds by Configure -Duseshrplib.

Perl has been ported to IBM's OS/400 PASE environment. The best way to build a Perl for PASE is to use an AIX host as a cross-compilation environment. See README.os400.

Yet another cross-compilation option has been added: now Perl builds on OpenZaurus, an Linux distribution based on Mandrake + Embedix for the Sharp Zaurus PDA. See the Cross/README file.

Tru64 when using gcc 3 drops the optimisation for toke.c to -O2 because of gigantic memory use with the default -O3.

Tru64 can now build Perl with the newer Berkeley DBs.

Building Perl on WinCE has been much enhanced, see README.ce and README.perlce.

p581-Selected Bug Fixes

p581-Closures, eval and lexicals

There have been many fixes in the area of anonymous subs, lexicals and closures. Although this means that Perl is now more "correct", it is possible that some existing code will break that happens to rely on the faulty behaviour. In practice this is unlikely unless your code contains a very complex nesting of anonymous subs, evals and lexicals.

p581-Generic fixes

If an input filehandle is marked :utf8 and Perl sees illegal UTF-8 coming in when doing , if warnings are enabled a warning is immediately given - instead of being silent about it and Perl being unhappy about the broken data later. (The :encoding(utf8) layer also works the same way.)

binmode(SOCKET, ":utf8") only worked on the input side, not on the output side of the socket. Now it works both ways.

For threaded Perls certain system database functions like getpwent() and getgrent() now grow their result buffer dynamically, instead of failing. This means that at sites with lots of users and groups the functions no longer fail by returning only partial results.

Perl 5.8.0 had accidentally broken the capability for users to define their own uppercase<->lowercase Unicode mappings (as advertised by the Camel). This feature has been fixed and is also documented better.

In 5.8.0 this

        $some_unicode .= ;

didn't work correctly but instead corrupted the data. This has now been fixed.

Tied methods like FETCH etc. may now safely access tied values, i.e. resulting in a recursive call to FETCH etc. Remember to break the recursion, though.

At startup Perl blocks the SIGFPE signal away since there isn't much Perl can do about it. Previously this blocking was in effect also for programs executed from within Perl. Now Perl restores the original SIGFPE handling routine, whatever it was, before running external programs.

Linenumbers in Perl scripts may now be greater than 65536, or 2**16. (Perl scripts have always been able to be larger than that, it's just that the linenumber for reported errors and warnings have "wrapped around".) While scripts that large usually indicate a need to rethink your code a bit, such Perl scripts do exist, for example as results from generated code. Now linenumbers can go all the way to 4294967296, or 2**32.

p581-Platform-specific fixes

Linux

HP-UX

VMS

Win32

p581-New or Changed Diagnostics

All the warnings related to pack() and unpack() were made more informative and consistent.

p581-Changed "A thread exited while %d threads were running"

The old version

    A thread exited while %d other threads were still running

was misleading because the "other" included also the thread giving the warning.

p581-Removed "Attempt to clear a restricted hash"

It is not illegal to clear a restricted hash, so the warning was removed.

p581-New "Illegal declaration of anonymous subroutine"

You must specify the block of code for sub.

p581-Changed "Invalid range "%s" in transliteration operator"

The old version

    Invalid [] range "%s" in transliteration operator

was simply wrong because there are no "[] ranges" in tr///.

p581-New "Missing control char name in \c"

Self-explanatory.

p581-New "Newline in left-justified string for %s"

The padding spaces would appear after the newline, which is probably not what you had in mind.

p581-New "Possible precedence problem on bitwise %c operator"

If you think this

    $x & $y == 0

tests whether the bitwise AND of $x and $y is zero, you will like this warning.

p581-New "Pseudo-hashes are deprecated"

This warning should have been already in 5.8.0, since they are.

p581-New "read() on %s filehandle %s"

You cannot read() (or sysread()) from a closed or unopened filehandle.

p581-New "5.005 threads are deprecated"

This warning should have been already in 5.8.0, since they are.

p581-New "Tied variable freed while still in use"

Something pulled the plug on a live tied variable, Perl plays safe by bailing out.

p581-New "To%s: illegal mapping '%s'"

An illegal user-defined Unicode casemapping was specified.

p581-New "Use of freed value in iteration"

Something modified the values being iterated over. This is not good.

p581-Changed Internals

These news matter to you only if you either write XS code or like to know about or hack Perl internals (using Devel::Peek or any of the B:: modules counts), or like to run Perl with the -D option.

The embedding examples of perlembed have been reviewed to be up to date and consistent: for example, the correct use of PERL_SYS_INIT3() and PERL_SYS_TERM().

Extensive reworking of the pad code (the code responsible for lexical variables) has been conducted by Dave Mitchell.

Extensive work on the v-strings by John Peacock.

UTF-8 length and position cache: to speed up the handling of Unicode (UTF-8) scalars, a cache was introduced. Potential problems exist if an extension bypasses the official APIs and directly modifies the PV of an SV: the UTF-8 cache does not get cleared as it should.

APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, sv_setsv, are again available.

Certain Perl core C APIs like cxinc and regatom are no longer available at all to code outside the Perl core of the Perl core extensions. This is intentional. They never should have been available with the shorter names, and if you application depends on them, you should (be ashamed and) contact perl5-porters to discuss what are the proper APIs.

Certain Perl core C APIs like Perl_list are no longer available without their Perl_ prefix. If your XS module stops working because some functions cannot be found, in many cases a simple fix is to add the Perl_ prefix to the function and the thread context aTHX_ as the first argument of the function call. This is also how it should always have been done: letting the Perl_-less forms to leak from the core was an accident. For cleaner embedding you can also force this for all APIs by defining at compile time the cpp define PERL_NO_SHORT_NAMES.

Perl_save_bool() has been added.

Regexp objects (those created with qr) now have S-magic rather than R-magic. This fixed regexps of the form /...(??{...;$x})/ to no longer ignore changes made to $x. The S-magic avoids dropping the caching optimization and making (??{...}) constructs obscenely slow (and consequently useless). See also "Magic Variables" in perlguts. Regexp::Copy was affected by this change.

The Perl internal debugging macros DEBUG() and DEB() have been renamed to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.

-DL removed (the leaktest had been broken and unsupported for years, use alternative debugging mallocs or tools like valgrind and Purify).

Verbose modifier v added for -DXv and -Dsv, see perlrun.

p581-New Tests

In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, in Perl 5.8.1 there are about 77000 separate tests in about 780 test files. The exact numbers depend on the Perl configuration and on the operating system platform.

p581-Known Problems

The hash randomisation mentioned in "p581-Incompatible Changes" is definitely problematic: it will wake dormant bugs and shake out bad assumptions.

If you want to use mod_perl 2.x with Perl 5.8.1, you will need mod_perl-1.99_10 or higher. Earlier versions of mod_perl 2.x do not work with the randomised hashes. (mod_perl 1.x works fine.) You will also need Apache::Test 1.04 or higher.

Many of the rarer platforms that worked 100% or pretty close to it with perl 5.8.0 have been left a little bit untended since their maintainers have been otherwise busy lately, and therefore there will be more failures on those platforms. Such platforms include Mac OS Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most common Perl platforms (Unix and Unix-like, Microsoft platforms, and VMS) have large enough testing and expert population that they are doing well.

p581-Tied hashes in scalar context

Tied hashes do not currently return anything useful in scalar context, for example when used as boolean tests:

        if (%tied_hash) { ... }

The current nonsensical behaviour is always to return false, regardless of whether the hash is empty or has elements.

The root cause is that there is no interface for the implementors of tied hashes to implement the behaviour of a hash in scalar context.

p581-Net::Ping 450_service and 510_ping_udp failures

The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have an unusual networking setup. For example in the latter case the test is trying to send a UDP ping to the IP address 127.0.0.1.

p581-B::C

The C-generating compiler backend B::C (the frontend being perlcc -c) is even more broken than it used to be because of the extensive lexical variable changes. (The good news is that B::Bytecode and ByteLoader are better than they used to be.)

p581-Platform Specific Problems

p581-EBCDIC Platforms

IBM z/OS and other EBCDIC platforms continue to be problematic regarding Unicode support. Many Unicode tests are skipped when they really should be fixed.

p581-Cygwin 1.5 problems

In Cygwin 1.5 the io/tell and op/sysio tests have failures for some yet unknown reason. In 1.5.5 the threads tests stress_cv, stress_re, and stress_string are failing unless the environment variable PERLIO is set to "perlio" (which makes also the io/tell failure go away).

Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a) CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ... a 100% "make test" was achieved with Configure -des -Duseithreads.

p581-HP-UX: HP cc warnings about sendfile and sendpath

With certain HP C compiler releases (e.g. B.11.11.02) you will get many warnings like this (lines wrapped for easier reading):

  cc: "/usr/include/sys/socket.h", line 504: warning 562:
    Redeclaration of "sendfile" with a different storage class specifier:
      "sendfile" will have internal linkage.
  cc: "/usr/include/sys/socket.h", line 505: warning 562:
    Redeclaration of "sendpath" with a different storage class specifier:
      "sendpath" will have internal linkage.

The warnings show up both during the build of Perl and during certain lib/ExtUtils tests that invoke the C compiler. The warning, however, is not serious and can be ignored.

p581-IRIX: t/uni/tr_7jis.t falsely failing

The test t/uni/tr_7jis.t is known to report failure under 'make test' or the test harness with certain releases of IRIX (at least IRIX 6.5 and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test fully passes.

p581-Mac OS X: no usemymalloc

The Perl malloc (-Dusemymalloc) does not work at all in Mac OS X. This is not that serious, though, since the native malloc works just fine.

p581-Tru64: No threaded builds with GNU cc (gcc)

In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used to compile a threaded Perl (-Duseithreads) because the system file doesn't know about gcc.

p581-Win32: sysopen, sysread, syswrite

As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave like they used to in 5.6.1 and earlier with respect to "text" mode. These built-ins now always operate in "binary" mode (even if sysopen() was passed the O_TEXT flag, or if binmode() was used on the file handle). Note that this issue should only make a difference for disk files, as sockets and pipes have always been in "binary" mode in the Windows port. As this behavior is currently considered a bug, compatible behavior may be re-introduced in a future release. Until then, the use of sysopen(), sysread() and syswrite() is not supported for "text" mode operations.

p581-Future Directions

The following things might happen in future. The first publicly available releases having these characteristics will be the developer releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These are our best guesses at the moment: we reserve the right to rethink.

p581-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. You can browse and search the Perl 5 bugs at http://bugs.perl.org/

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

p58-NAME

perl58delta - what is new for perl v5.8.0

p58-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 (while 5.8.0 was still called 5.7.something).

Changes that were integrated into the 5.6.1 release are marked [561]. Many of these changes have been further developed since 5.6.1 was released, those are marked [561+].

You can see the list of changes in the 5.6.1 release (both from the 5.005_03 release and the 5.6.0 release) by reading "p561-NAME".

p58-Highlights In 5.8.0

p58-Incompatible Changes

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

The major reason for the discontinuity is the new IO architecture called PerlIO. PerlIO is the default configuration because without it many new features of Perl 5.8 cannot be used. In other words: you just have to recompile your modules containing XS code, sorry about that.

In future releases of Perl, non-PerlIO aware XS modules may become completely unsupported. This shouldn't be too difficult for module authors, however: PerlIO has been designed as a drop-in replacement (at the source code level) for the stdio interface.

Depending on your platform, there are also other reasons why we decided to break binary compatibility, please read on.

p58-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 (such as mod_perl) tend to prefer the system malloc. Such platforms include Alpha and 64-bit HPPA, MIPS, PPC, and Sparc.

p58-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 mod_perl which are using the AIX native interface.

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

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

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

p58-New Unicode Semantics (no more use utf8, almost)

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.

p58-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} [561] and \p{SpacePerl} [561] (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).

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

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

p58-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() does still sort platform natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) [561]

p58-Deprecations

p58-Core Enhancements

p58-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. See perluniintro for introduction and perlunicode for details.

p58-PerlIO is Now The Default

p58-ithreads

The new interpreter threads ("ithreads" for short) implementation of multithreading, by Arthur Bergman, replaces the old "5.005 threads" implementation. In the ithreads model any data sharing between threads must be explicit, as opposed to the model where data sharing was implicit. See threads and threads::shared, and perlthrtut.

As a part of the ithreads implementation Perl will also use any necessary and detectable reentrant libc interfaces.

p58-Restricted Hashes

A restricted hash is restricted to a certain set of keys, no keys outside the set can be added. Also individual keys can be restricted so that the key cannot be deleted and the value cannot be changed. No new syntax is involved: the Hash::Util module is the interface.

p58-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. Note that breaking out from potentially blocking operations should still work, though.

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

p58-Arrays now always interpolate into double-quoted strings [561]

In double-quoted strings, arrays now interpolate, no matter what. The behavior in earlier versions of perl 5 was that arrays would interpolate into strings if the array had been mentioned before the string was compiled, and otherwise Perl would raise a fatal compile-time error. In versions 5.000 through 5.003, the error was

        Literal @example now requires backslash

In versions 5.004_01 through 5.6.0, the error was

        In string, @example now must be written as \@example

The idea here was to get people into the habit of writing "fred\@example.com" when they wanted a literal @ sign, just as they have always written "Give me back my \$5" when they wanted a literal $ sign.

Starting with 5.6.1, when Perl now sees an @ sign in a double-quoted string, it always attempts to interpolate an array, regardless of whether or not the array has been used or declared already. The fatal error has been downgraded to an optional warning:

        Possible unintended interpolation of @example in string

This warns you that "fred@example.com" is going to turn into fred.com if you don't backslash the @. See http://perl.plover.com/at-error.html for more details about the history here.

p58-Miscellaneous Changes

p58-Modules and Pragmata

p58-New Modules and Pragmata

p58-Updated And Improved Modules and Pragmata

p58-Utility Changes

p58-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 perlfreebsd perlhpux
    perlhurd perlirix perlmachten perlmacos perlmint perlmpeix
    perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
    perltru64 perluts perlvmesa perlvms perlvos perlwin32

These documents usually detail one or more of the following subjects: configuring, building, testing, installing, and sometimes also using Perl on the said platform.

Eastern Asian Perl users are now welcomed in their own languages: README.jp (Japanese), README.ko (Korean), README.cn (simplified Chinese) and README.tw (traditional Chinese), which are written in normal pod but encoded in EUC-JP, EUC-KR, EUC-CN and Big5. These will get installed as

   perljp perlko perlcn perltw

p58-Performance Enhancements

p58-Installation and Configuration Improvements

p58-Generic Improvements

p58-New Or Improved Platforms

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

p58-Selected Bug Fixes

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

p58-Platform Specific Changes and Fixes

p58-New or Changed Diagnostics

Please see perldiag for more details.

p58-Changed Internals

p58-Security Vulnerability Closed [561]

(This change was already made in 5.7.0 but bears repeating here.) (5.7.0 came out before 5.6.1: the development branch 5.7 released earlier than the maintenance branch 5.6)

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

p58-New Tests

Several new tests have been added, especially for the lib and ext subsections. There are now about 69 000 individual tests (spread over about 700 test scripts), in the regression suite (5.6.1 has about 11 700 tests, in 258 test scripts) The exact numbers depend on the platform and Perl configuration used. Many of the new tests are of course 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. On a really fast machine you can hope to finish the suite in about 6-8 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.)

p58-Known Problems

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

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

p58-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 they may 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 to) link together at all binaries with different ideas about file offsets; all this is platform-dependent.

p58-Modifying $_ Inside for(..)

   for (1..5) { $_++ }

works without complaint. It shouldn't. (You should be able to modify only lvalue elements inside the loops.) You can see the correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.

p58-mod_perl 1.26 Doesn't Build With Threaded Perl

Use mod_perl 1.27 or higher.

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

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

p58-libwww-perl (LWP) fails base/date #51

Use libwww-perl 5.65 or later.

p58-PDL failing some tests

Use PDL 2.3.4 or later.

p58-Perl_get_sv

You may get errors like 'Undefined symbol "Perl_get_sv"' or "can't resolve symbol 'Perl_get_sv'", or the symbol may be "Perl_sv_2pv". This probably means that you are trying to use an older shared Perl library (or extensions linked with such) with Perl 5.8.0 executable. Perl used to have such a subroutine, but that is no more the case. Check your shared library path, and any shared Perl libraries in those directories.

Sometimes this problem may also indicate a partial Perl 5.8.0 installation, see "p58-Mac OS X dyld undefined symbols" for an example and how to deal with it.

p58-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: "Two-Phased Garbage Collection" in perlobj). 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 thingies works.

p58-ext/threads/t/libc

If this test fails, it indicates that your libc (C library) is not threadsafe. This particular test stress tests the localtime() call to find out whether it is threadsafe. See perlthrtut for more information.

p58-Failure of Thread (5.005-style) tests

Note that support for 5.005-style threading is deprecated, experimental and practically unsupported. In 5.10, it is expected to be removed. You should migrate your code to ithreads.

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/B/t/xref.t                    255 65280    14   12  85.71%  3-14
 ../ext/List/Util/t/first.t           255 65280     7    4  57.14%  2 5-7
 ../lib/English.t                       2   512    54    2   3.70%  2-3
 ../lib/FileCache.t                                 5    1  20.00%  5
 ../lib/Filter/Simple/t/data.t                      6    3  50.00%  1-3
 ../lib/Filter/Simple/t/filter_only.                9    3  33.33%  1-2 5
 ../lib/Math/BigInt/t/bare_mbf.t                 1627    4   0.25%  8 11 1626-1627
 ../lib/Math/BigInt/t/bigfltpm.t                 1629    4   0.25%  10 13 1628-
                                                                    1629
 ../lib/Math/BigInt/t/sub_mbf.t                  1633    4   0.24%  8 11 1632-1633
 ../lib/Math/BigInt/t/with_sub.t                 1628    4   0.25%  9 12 1627-1628
 ../lib/Tie/File/t/31_autodefer.t     255 65280    65   32  49.23%  34-65
 ../lib/autouse.t                                  10    1  10.00%  4
 op/flip.t                                         15    1   6.67%  15

These failures are unlikely to get fixed as 5.005-style threads are considered fundamentally broken. (Basically what happens is that competing threads can corrupt shared global state, one good example being regular expression engine's state.)

p58-Timing problems

The following tests may fail intermittently because of timing problems, for example if the system is heavily loaded.

    t/op/alarm.t
    ext/Time/HiRes/HiRes.t
    lib/Benchmark.t
    lib/Memoize/t/expmod_t.t
    lib/Memoize/t/speed.t

In case of failure please try running them manually, for example

    ./perl -Ilib ext/Time/HiRes/HiRes.t

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

p58-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 of this unfinishedness is its (currently) inherent unportability: 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.

p58-Platform Specific Problems

p58-AIX

p58-Alpha systems with old gccs fail several tests

If you see op/pack, op/pat, op/regexp, or ext/Storable tests failing in a Linux/alpha or *BSD/Alpha, it's probably time to upgrade your gcc. gccs prior to 2.95.3 are definitely not good enough, and gcc 3.1 may be even better. (RedHat Linux/alpha with gcc 3.1 reported no problems, as did Linux 2.4.18 with gcc 2.95.4.) (In Tru64, it is preferable to use the bundled C compiler.)

p58-AmigaOS

Perl 5.8.0 doesn't build in AmigaOS. It broke at some point during the ithreads work and we could not find Amiga experts to unbreak the problems. Perl 5.6.1 still works for AmigaOS (as does the 5.7.2 development release).

p58-BeOS

The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:

 t/op/lfs............................FAILED at test 17
 t/op/magic..........................FAILED at test 24
 ext/Fcntl/t/syslfs..................FAILED at test 17
 ext/File/Glob/t/basic...............FAILED at test 3
 ext/POSIX/t/sigaction...............FAILED at test 13
 ext/POSIX/t/waitpid.................FAILED at test 1

See perlbeos (README.beos) for more details.

p58-Cygwin "unable to remap"

For example when building the Tk extension for Cygwin, you may get an error message saying "unable to remap". This is known problem with Cygwin, and a workaround is detailed in here: http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html

p58-Cygwin ndbm tests fail on FAT

One can build but not install (or test the build of) the NDBM_File on FAT filesystems. Installation (or build) on NTFS works fine. If one attempts the test on a FAT install (or build) the following failures are expected:

 ../ext/NDBM_File/ndbm.t       13  3328    71   59  83.10%  1-2 4 16-71
 ../ext/ODBM_File/odbm.t      255 65280    ??   ??       %  ??
 ../lib/AnyDBM_File.t           2   512    12    2  16.67%  1 4
 ../lib/Memoize/t/errors.t      0   139    11    5  45.45%  7-11
 ../lib/Memoize/t/tie_ndbm.t   13  3328     4    4 100.00%  1-4
 run/fresh_perl.t                          97    1   1.03%  91

NDBM_File fails and ODBM_File just coredumps.

If you intend to run only on FAT (or if using AnyDBM_File on FAT), run Configure with the -Ui_ndbm and -Ui_dbm options to prevent NDBM_File and ODBM_File being built.

p58-DJGPP Failures

 t/op/stat............................FAILED at test 29
 lib/File/Find/t/find.................FAILED at test 1
 lib/File/Find/t/taint................FAILED at test 1
 lib/h2xs.............................FAILED at test 15
 lib/Pod/t/eol........................FAILED at test 1
 lib/Test/Harness/t/strap-analyze.....FAILED at test 8
 lib/Test/Harness/t/test-harness......FAILED at test 23
 lib/Test/Simple/t/exit...............FAILED at test 1

The above failures are known as of 5.8.0 with native builds with long filenames, but there are a few more if running under dosemu because of limitations (and maybe bugs) of dosemu:

 t/comp/cpp...........................FAILED at test 3
 t/op/inccode.........................(crash)

and a few lib/ExtUtils tests, and several hundred Encode/t/Aliases.t failures that work fine with long filenames. So you really might prefer native builds and long filenames.

p58-FreeBSD built with ithreads coredumps reading large directories

This is a known bug in FreeBSD 4.5's readdir_r(), it has been fixed in FreeBSD 4.6 (see perlfreebsd (README.freebsd)).

p58-FreeBSD Failing locale Test 117 For ISO 8859-15 Locales

The ISO 8859-15 locales may fail the locale test 117 in FreeBSD. This is caused by the characters \xFF (y with diaeresis) and \xBE (Y with diaeresis) not behaving correctly when being matched case-insensitively. Apparently this problem has been fixed in the latest FreeBSD releases. ( http://www.freebsd.org/cgi/query-pr.cgi?pr=34308 )

p58-IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5

IRIX with MIPSpro 7.3.1.2m or 7.3.1.3m compiler may fail the List::Util test ext/List/Util/t/shuffle.t by dumping core. This seems to be a compiler error since if compiled with gcc no core dump ensues, and no failures have been seen on the said test on any other platform.

Similarly, building the Digest::MD5 extension has been known to fail with "*** Termination code 139 (bu21)".

The cure is to drop optimization level (Configure -Doptimize=-O2).

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

p58-Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint

This is a known bug in the glibc 2.2.5 with long long integers. ( http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=65612 )

p58-Linux With Sfio Fails op/misc Test 48

No known fix.

p58-Mac OS X

Please remember to set your environment variable LC_ALL to "C" (setenv LC_ALL C) before running "make test" to avoid a lot of warnings about the broken locales of Mac OS X.

The following tests are known to fail in Mac OS X 10.1.5 because of buggy (old) implementations of Berkeley DB included in Mac OS X:

 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

If you are building on a UFS partition, you will also probably see t/op/stat.t subtest #9 fail. This is caused by Darwin's UFS not supporting inode change time.

Also the ext/POSIX/t/posix.t subtest #10 fails but it is skipped for now because the failure is Apple's fault, not Perl's (blocked signals are lost).

If you Configure with ithreads, ext/threads/t/libc.t will fail. Again, this is not Perl's fault-- the libc of Mac OS X is not threadsafe (in this particular test, the localtime() call is found to be threadunsafe.)

p58-Mac OS X dyld undefined symbols

If after installing Perl 5.8.0 you are getting warnings about missing symbols, for example

    dyld: perl Undefined symbols
    _perl_sv_2pv
    _perl_get_sv

you probably have an old pre-Perl-5.8.0 installation (or parts of one) in /Library/Perl (the undefined symbols used to exist in pre-5.8.0 Perls). It seems that for some reason "make install" doesn't always completely overwrite the files in /Library/Perl. You can move the old Perl shared library out of the way like this:

    cd /Library/Perl/darwin/CORE
    mv libperl.dylib libperlold.dylib

and then reissue "make install". Note that the above of course is extremely disruptive for anything using the /usr/local/bin/perl. If that doesn't help, you may have to try removing all the .bundle files from beneath /Library/Perl, and again "make install"-ing.

p58-OS/2 Test Failures

The following tests are known to fail on OS/2 (for clarity only the failures are shown, not the full error messages):

 ../lib/ExtUtils/t/Mkbootstrap.t    1   256    18    1   5.56%  8
 ../lib/ExtUtils/t/Packlist.t       1   256    34    1   2.94%  17
 ../lib/ExtUtils/t/basic.t          1   256    17    1   5.88%  14
 lib/os2_process.t                  2   512   227    2   0.88%  174 209
 lib/os2_process_kid.t                        227    2   0.88%  174 209
 lib/rx_cmprt.t                   255 65280    18    3  16.67%  16-18

p58-op/sprintf tests 91, 129, and 130

The op/sprintf tests 91, 129, and 130 are known to fail on some platforms. Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.

Test 91 is known to fail on QNX6 (nto), because sprintf '%e',0 incorrectly produces 0.000000e+0 instead of 0.000000e+00.

For tests 129 and 130, the failing platforms do not comply with the ANSI C Standard: lines 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".)

p58-SCO

The socketpair tests are known to be unhappy in SCO 3.2v5.0.4:

 ext/Socket/socketpair.t...............FAILED tests 15-45

p58-Solaris 2.5

In case you are still using Solaris 2.5 (aka SunOS 5.5), you may experience failures (the test core dumping) in lib/locale.t. The suggested cure is to upgrade your Solaris.

p58-Solaris x86 Fails Tests With -Duse64bitint

The following tests are known to fail in Solaris x86 with Perl configured to use 64 bit integers:

 ext/Data/Dumper/t/dumper.............FAILED at test 268
 ext/Devel/Peek/Peek..................FAILED at test 7

p58-SUPER-UX (NEC SX)

The following tests are known to fail on SUPER-UX:

 op/64bitint...........................FAILED tests 29-30, 32-33, 35-36
 op/arith..............................FAILED tests 128-130
 op/pack...............................FAILED tests 25-5625
 op/pow................................
 op/taint..............................# msgsnd failed
 ../ext/IO/lib/IO/t/io_poll............FAILED tests 3-4
 ../ext/IPC/SysV/ipcsysv...............FAILED tests 2, 5-6
 ../ext/IPC/SysV/t/msg.................FAILED tests 2, 4-6
 ../ext/Socket/socketpair..............FAILED tests 12
 ../lib/IPC/SysV.......................FAILED tests 2, 5-6
 ../lib/warnings.......................FAILED tests 115-116, 118-119

The op/pack failure ("Cannot compress negative numbers at op/pack.t line 126") is serious but as of yet unsolved. It points at some problems with the signedness handling of the C compiler, as do the 64bitint, arith, and pow failures. Most of the rest point at problems with SysV IPC.

p58-Term::ReadKey not working on Win32

Use Term::ReadKey 2.20 or later.

p58-UNICOS/mk

p58-UTS

There are a few known test failures, see perluts (README.uts).

p58-VOS (Stratus)

When Perl is built using the native build process on VOS Release 14.5.0 and GNU C++/GNU Tools 2.0.1, all attempted tests either pass or result in TODO (ignored) failures.

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

p58-Win32

In multi-CPU boxes, there are some problems with the I/O buffering: some output may appear twice.

p58-XML::Parser not working

Use XML::Parser 2.31 or later.

p58-z/OS (OS/390)

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

 Failed Test                   Stat Wstat Total Fail  Failed  List of Failed
 ---------------------------------------------------------------------------
 ../ext/Data/Dumper/t/dumper.t              357    8   2.24%  311 314 325 327
                                                              331 333 337 339
 ../ext/IO/lib/IO/t/io_unix.t                 5    4  80.00%  2-5
 ../ext/Storable/t/downgrade.t   12  3072   169   12   7.10%  14-15 46-47 78-79
                                                              110-111 150 161
 ../lib/ExtUtils/t/Constant.t   121 30976    48   48 100.00%  1-48
 ../lib/ExtUtils/t/Embed.t                    9    9 100.00%  1-9
 op/pat.t                                   922    7   0.76%  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                                 780    6   0.77%  61 169 196 661
                                                              710-711

The failures in dumper.t and downgrade.t are problems in the tests, those in io_unix and sprintf are problems in the USS (UDP sockets and printf formats). The pat, tr, and fold failures are genuine Perl problems caused by EBCDIC (and in the pat and fold cases, combining that with Unicode). The Constant and Embed are probably problems in the tests (since they test Perl's ability to build extensions, and that seems to be working reasonably well.)

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

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

Perl 5.8 unfortunately does not build anymore on AmigaOS; this broke accidentally at some point. Since there are not that many Amiga developers available, we could not get this fixed and tested in time for 5.8.0. Perl 5.6.1 still works for AmigaOS (as does the 5.7.2 development release).

The PerlIO::Scalar and PerlIO::Via (capitalised) were renamed as PerlIO::scalar and PerlIO::via (all lowercase) just before 5.8.0. The main rationale was to have all core PerlIO layers to have all lowercase names. The "plugins" are named as usual, for example PerlIO::via::QuotedPrint.

The threads::shared::queue and threads::shared::semaphore were renamed as Thread::Queue and Thread::Semaphore just before 5.8.0. The main rationale was to have thread modules to obey normal naming, Thread:: (the threads and threads::shared themselves are more pragma-like, they affect compile-time, so they stay lowercase).

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

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

p58-HISTORY

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

p573-NAME

perl573delta - what's new for perl v5.7.3

p573-DESCRIPTION

This document describes differences between the 5.7.2 release and the 5.7.3 release.

(To view the differences between the 5.6.0 release and the 5.7.0 release, see "p570-NAME". To view the differences between the 5.7.0 release and the 5.7.1 release, see "p571-NAME". To view the differences between the 5.7.1 release and the 5.7.2 release, see "p572-NAME".)

p573-Changes

This is just a selected list of some of the more notable changes. The numbers refer to the Perl repository change numbers; see Changes58 (or Changes in Perl 5.8.1). In addition to these changes, lots of work took place in integrating threads, PerlIO, and Unicode; general code cleanup; and last but not least porting to non-Unix lands such as Win32, VMS, Cygwin, DJGPP, VOS, MacOS Classic, and EBCDIC.

p573-11362

add LC_MESSAGES to POSIX :locale_h export tag

p573-11371

add DEL to [:cntrl:]

p573-11375

make h2ph understand constants like 1234L and 5678LL

p573-11405

Win32: fix bugs in handling of the virtualized environment

p573-11410

fix a bug in the security taint checking of open()

p573-11423

make perl fork() safe even on platforms that don't have pthread_atfork()

p573-11459

make switching optimization and debugging levels during Perl builds easier via the OPTIMIZE environment variable

p573-11475

make split()'s unused captures to be undef, not ''

p573-11485

Search::Dict: allow transforming lines before comparing

p573-11490

allow installing extra modules or bundles when building Perl

p573-11516

add -Wall in cflags when compiling with gcc to weed out dubious C practices

p573-11541

pluggable optimizer

p573-11549

WinCE: integrate the port

p573-11589

Win32: 4-arg select was broken

p573-11594

introduce the perlivp utility for verifying the Perl installation (IVP = Installation Verification Procedure)

p573-11623

rename lib/unicode to lib/unicore to avoid case-insensitivity problems with lib/Unicode

p573-111631

remove Time::Piece

p573-11643

document that use utf8 is not the right way most of the time

p573-11656

allow building perl with -DUSE_UTF8_SCRIPTS which makes UTF-8 the default script encoding (not the default since that would break all scripts having legacy eight-bit data in them)

p573-11725

division preserving 64-bit integers

p573-11743

document the coderef-in-@INC feature

p573-11794

modulo (%) preserving 64-bit integers

p573-11825

update to Unicode 3.1.1

p573-11865

add the \[$@%&*] prototype support

p573-11874

oct() and hex() in glorious 64 bit

p573-11877

Class::Struct: allow recursive classes

p573-11993

fix unpack U to be the reverse of pack U

p573-12056

VMS: waitpid enhancements

p573-12180

unpack("Z*Z*", pack("Z*Z*", ..)) was broken

p573-12243

Devel::Peek: display UTF-8 SVs also as \x{...}

p573-12288

Data::Dumper: option to sort hashes

p573-12542

add perlpodspec

p573-12652

threadsafe DynaLoader, re, Opcode, File::Glob, and B

p573-12756

support BeOS better

p573-12874

read-only hashes (user-level interface is Hash::Util)

p573-13162

add Devel::PPPort

p573-13179

add the sort pragma

p573-13326

VMS: fix perl -P

p573-13358

add perlpacktut

p573-13452

SUPER-UX: add hints file

p573-13575

Win32: non-blocking waitpid(-1,WNOHANG)

p573-13684

introduce the -t option for gentler taint checking

p573-14694

add the if pragma

p573-14832

implement IV/UV/NV/long double un/packing with j/J/F/D

p573-14854

document the new taint behaviour of exec LIST and system LIST

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

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

p573-HISTORY

Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from The Perl Porters and Perl Users submitting feedback and patches.

Send omissions or corrections to <perlbug@perl.org>.

p572-NAME

perl572delta - what's new for perl v5.7.2

p572-DESCRIPTION

This document describes differences between the 5.7.1 release and the 5.7.2 release.

(To view the differences between the 5.6.0 release and the 5.7.0 release, see "p570-NAME". To view the differences between the 5.7.0 release and the 5.7.1 release, see "p571-NAME".)

p572-Security Vulnerability Closed

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

A security vulnerability affecting all Perl versions prior to 5.6.1 was found in August 2000. The vulnerability does not affect default installations and as far as is known affects only the Linux platform.

You should upgrade your Perl to 5.6.1 as soon as possible. Patches for earlier releases exist but using the patches require full recompilation from the source code anyway, so 5.6.1 is your best choice.

See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt for more information.

p572-Incompatible Changes

p572-64-bit platforms and malloc

If your pointers are 64 bits wide, the Perl malloc is no more being used because it simply does not work with 8-byte pointers. Also, usually the system malloc on such platforms are much better optimized for such large memory models than the Perl malloc.

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

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

p572-Different Definition of the Unicode Character Classes \p{In...}

As suggested by the Unicode consortium, the Unicode character classes now prefer scripts as opposed to blocks (as defined by Unicode); in Perl, when the \p{In....} and the \p{In....} regular expression constructs are used. This has changed the definition of some of those character classes.

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 256 characters based on the Unicode numbering.

In general this change results in more inclusive Unicode character classes, but changes to the other direction also do take place: 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).

Changes in the character class semantics may have happened if a script and a block happen to have the same name, for example Hebrew. In such cases the script wins and \p{InHebrew} now means the script definition of Hebrew. The block definition in still available, though, by appending Block to the name: \p{InHebrewBlock} means what \p{InHebrew} meant in perl 5.6.0. For the full list of affected character classes, see "Blocks" in perlunicode.

p572-Deprecations

The current user-visible implementation of pseudo-hashes (the weird use of the first array element) is deprecated starting from Perl 5.8.0 and will be removed in Perl 5.10.0, and the feature will be implemented differently. Not only is the current interface rather ugly, but the current implementation slows down normal array and hash use quite noticeably. The fields pragma interface will remain available.

The syntaxes @a->[...] and @h->{...} have now been deprecated.

The suidperl is also considered to be too much a risk to continue maintaining and the suidperl code is likely to be removed in a future release.

The package; syntax (package without an argument has been deprecated. Its semantics were never that clear and its implementation even less so. If you have used that feature to disallow all but fully qualified variables, use strict; instead.

The chdir(undef) and chdir('') behaviors to match chdir() has been deprecated. In future versions, chdir(undef) and chdir('') will simply fail.

p572-Core Enhancements

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.

p572-Modules and Pragmata

p572-New Modules and Distributions

p572-Updated And Improved Modules and Pragmata

p572-Utility Changes

p572-New Documentation

p572-Installation and Configuration Improvements

p572-New Or Improved Platforms

p572-Generic Improvements

p572-Selected Bug Fixes

p572-Platform Specific Changes and Fixes

p572-New or Changed Diagnostics

p572-Source Code Enhancements

p572-MAGIC constants

The MAGIC constants (e.g. 'P') have been macrofied (e.g. PERL_MAGIC_TIED) for better source code readability and maintainability.

p572-Better commented code

perly.c, sv.c, and sv.h have now been extensively commented.

p572-Regex pre-/post-compilation items matched up

The regex compiler now maintains a structure that identifies nodes in the compiled bytecode with the corresponding syntactic features of the original regex expression. The information is attached to the new offsets member of the struct regexp. See perldebguts for more complete information.

p572-gcc -Wall

The C code has been made much more gcc -Wall clean. Some warning messages still remain, though, so if you are compiling with gcc you will see some warnings about dubious practices. The warnings are being worked on.

p572-New Tests

Several new tests have been added, especially for the lib subsection.

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

p572-Known Problems

Note that unlike other sections in this document (which describe changes since 5.7.0) this section is cumulative containing known problems for all the 5.7 releases.

p572-AIX

p572-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 is known but the current suspect is the ixemul library.

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

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

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

The subtests 11 and 12 sometimes fail and sometimes work.

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

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

p572-Linux With Sfio Fails op/misc Test 48

No known fix.

p572-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 Test                     Stat Wstat Total Fail  Failed  List of Failed
 -----------------------------------------------------------------------------
 ../ext/B/Deparse.t                            14    1   7.14%  14
 ../ext/B/Showlex.t                             1    1 100.00%  1
 ../ext/Encode/Encode/Tcl.t                   610   13   2.13%  592 594 596 598
                                                                600 602 604-610
 ../ext/IO/lib/IO/t/io_unix.t     113 28928     5    3  60.00%  3-5
 ../ext/POSIX/POSIX.t                          29    1   3.45%  14
 ../ext/Storable/t/lock.t         255 65280     5    3  60.00%  3-5
 ../lib/locale.t                  129 33024   117   19  16.24%  99-117
 ../lib/warnings.t                            434    1   0.23%  75
 ../lib/ExtUtils.t                             27    1   3.70%  25
 ../lib/Math/BigInt/t/bigintpm.t             1190    1   0.08%  1145
 ../lib/Unicode/UCD.t                          81   48  59.26%  1-16 49-64 66-81
 ../lib/User/pwent.t                            9    1  11.11%  4
 op/pat.t                                     660    6   0.91%  242-243 424-425
                                                                626-627
 op/split.t                         0     9    ??   ??       %  ??
 op/taint.t                                   174    3   1.72%  156 162 168
 op/tr.t                                       70    3   4.29%  50 58-59
 Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay.

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

p572-Failure of Thread tests

Note that support for 5.005-style threading remains experimental.

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.

  lib/autouse.t                 4
  t/lib/thr5005.t               19-20

p572-UNICOS

p572-UTS

There are a few known test failures, see perluts.

p572-VMS

Rather many tests are failing in VMS but that actually more tests succeed in VMS than they used to, it's just that there are many, many more tests than there used to be.

Here are the known failures from some compiler/platform combinations.

DEC C V5.3-006 on OpenVMS VAX V6.2

  [-.ext.list.util.t]tainted..............FAILED on test 3
  [-.ext.posix]sigaction..................FAILED on test 7
  [-.ext.time.hires]hires.................FAILED on test 14
  [-.lib.file.find]taint..................FAILED on test 17
  [-.lib.math.bigint.t]bigintpm...........FAILED on test 1183
  [-.lib.test.simple.t]exit...............FAILED on test 1
  [.lib]vmsish............................FAILED on test 13
  [.op]sprintf............................FAILED on test 12
  Failed 8/399 tests, 91.23% okay.

DEC C V6.0-001 on OpenVMS Alpha V7.2-1 and Compaq C V6.2-008 on OpenVMS Alpha V7.1

  [-.ext.list.util.t]tainted..............FAILED on test 3 
  [-.lib.file.find]taint..................FAILED on test 17
  [-.lib.test.simple.t]exit...............FAILED on test 1
  [.lib]vmsish............................FAILED on test 13
  Failed 4/399 tests, 92.48% okay.

Compaq C V6.4-005 on OpenVMS Alpha 7.2.1

  [-.ext.b]showlex........................FAILED on test 1
  [-.ext.list.util.t]tainted..............FAILED on test 3
  [-.lib.file.find]taint..................FAILED on test 17 
  [-.lib.test.simple.t]exit...............FAILED on test 1
  [.lib]vmsish............................FAILED on test 13
  [.op]misc...............................FAILED on test 49
  Failed 6/401 tests, 92.77% okay.

p572-Win32

In multi-CPU boxes there are some problems with the I/O buffering: some output may appear twice.

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

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

p572-Variable Attributes are not Currently Usable for Tying

This limitation will hopefully be fixed in future. (Subroutine attributes work fine for tying, see Attribute::Handlers).

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

p572-The Compiler Suite Is Still Experimental

The compiler suite is slowly getting better but is nowhere near working order yet.

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

p572-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/perl/ , 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.

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

p572-HISTORY

Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from The Perl Porters and Perl Users submitting feedback and patches.

Send omissions or corrections to <perlbug@perl.org>.

p571-NAME

perl571delta - what's new for perl v5.7.1

p571-DESCRIPTION

This document describes differences between the 5.7.0 release and the 5.7.1 release.

(To view the differences between the 5.6.0 release and the 5.7.0 release, see "p570-NAME".)

p571-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 April 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 all the Perl 5.7 releases (and will be gone also from the maintenance release 5.6.1), so that particular vulnerability isn't there anymore. However, further security vulnerabilities are, unfortunately, always possible. The suidperl code is being reviewed and if deemed too risky to continue to be supported, it may be completely removed from future releases. 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/ ).

p571-Incompatible Changes

p571-Core Enhancements

p571-AUTOLOAD Is Now Lvaluable

AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.

p571-PerlIO is Now The Default

p571-Signals Are Now Safe

Perl used to be fragile in that signals arriving at inopportune moments could corrupt Perl's internal state.

p571-Modules and Pragmata

p571-New Modules

p571-Updated And Improved Modules and Pragmata

The following modules have been upgraded from the versions at CPAN: CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text, Storable, Text-Tabs+Wrap.

p571-Performance Enhancements

p571-Utility Changes

p571-New Documentation

p571-perlclib

Internal replacements for standard C library functions. (Interesting only for extension writers and Perl core hackers.)

p571-perliol

Internals of PerlIO with layers.

p571-README.aix

Documentation on compiling Perl on AIX has been added. AIX has several different C compilers and getting the right patch level is essential. On install README.aix will be installed as perlaix.

p571-README.bs2000

Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC mainframe environment) has been added.

This was formerly known as README.posix-bc but the name was considered to be too confusing (it has nothing to do with the POSIX module or the POSIX standard). On install README.bs2000 will be installed as perlbs2000.

p571-README.macos

In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been synchronised with the standard Perl sources. To compile MacPerl some additional steps are required, and this file documents those steps. On install README.macos will be installed as perlmacos.

p571-README.mpeix

The README.mpeix has been podified, which means that this information about compiling and using Perl on the MPE/iX miniframe platform will be installed as perlmpeix.

p571-README.solaris

README.solaris has been created and Solaris wisdom from elsewhere in the Perl documentation has been collected there. On install README.solaris will be installed as perlsolaris.

p571-README.vos

The README.vos has been podified, which means that this information about compiling and using Perl on the Stratus VOS miniframe platform will be installed as perlvos.

p571-Porting/repository.pod

Documentation on how to use the Perl source repository has been added.

p571-Installation and Configuration Improvements

p571-New Or Improved Platforms

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

p571-Generic Improvements

p571-Selected Bug Fixes

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

p571-Platform Specific Changes and Fixes

p571-New or Changed Diagnostics

Two new debugging options have been added: if you have compiled your Perl with debugging, you can use the -DT and -DR options to trace tokenising and to add reference counts to displaying variables, respectively.

p571-Changed Internals

p571-New Tests

Many new tests have been added. The most notable is probably the lib/1_compile: it is very notable because running it takes quite a long time. It test compiles all the Perl modules in the distribution. Please be patient.

p571-Known Problems

Note that unlike other sections in this document (which describe changes since 5.7.0) this section is cumulative containing known problems for all the 5.7 releases.

p571-AIX vac 5.0.0.0 May Produce Buggy Code For Perl

The AIX C compiler vac version 5.0.0.0 may produce buggy code, resulting in few random tests failing, but when the failing tests are run by hand, they succeed. We suggest upgrading to at least vac version 5.0.1.0, that has been known to compile Perl correctly. "lslpp -L|grep vac.C" will tell you the vac version.

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

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

p571-lib/io_multihomed Fails In LP64-Configured HP-UX

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

p571-Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX

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.

p571-lib/b test 19

The test fails on various platforms (PA64 and IA64 are known), but the exact cause is still being investigated.

p571-Linux With Sfio Fails op/misc Test 48

No known fix.

p571-sigaction test 13 in VMS

The test is known to fail; whether it's because of VMS of because of faulty test is not known.

p571-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 else than "1" and "-1" when formatting 0.6 and -0.6 using the printf format "%.0f", most often they produce "0" and "-0".)

p571-Failure of Thread tests

The subtests 19 and 20 of lib/thr5005.t test 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. (Note that support for 5.005-style threading remains experimental.)

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

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

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

p571-The Compiler Suite Is Still Experimental

The compiler suite is slowly getting better but is nowhere near working order yet.

p571-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/perl/ , 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.

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

p571-HISTORY

Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from The Perl Porters and Perl Users submitting feedback and patches.

Send omissions or corrections to <perlbug@perl.org>.

p570-NAME

perl570delta - what's new for perl v5.7.0

p570-DESCRIPTION

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

p570-Security Vulnerability Closed

A potential security vulnerability in the optional suidperl component of Perl has been identified. suidperl is neither built nor installed by default. As of September the 2nd, 2000, the only known vulnerable platform is Linux, most likely all Linux distributions. CERT and various vendors have been alerted about the vulnerability.

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 the Perl 5.7.0 release, so that particular vulnerability isn't there anymore. However, further security vulnerabilities are, unfortunately, always possible. The suidperl code is being reviewed and if deemed too risky to continue to be supported, it may be completely removed from future releases. 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/ ).

p570-Incompatible Changes

p570-Core Enhancements

p570-Modules and Pragmata

p570-New Modules

p570-Updated And Improved Modules and Pragmata

p570-Utility Changes

p570-New Documentation

p570-Performance Enhancements

p570-Installation and Configuration Improvements

p570-Generic Improvements

p570-Selected Bug Fixes

p570-Platform Specific Changes and Fixes

p570-New or Changed Diagnostics

All regular expression compilation error messages are now hopefully easier to understand both because the error message now comes before the failed regex and because the point of failure is now clearly marked.

The various "opened only for", "on closed", "never opened" warnings drop the main:: prefix for filehandles in the main package, for example STDIN instead of .

The "Unrecognized escape" warning has been extended to include \8, \9, and \_. There is no need to escape any of the \w characters.

p570-Changed Internals

p570-Known Problems

p570-Unicode Support Still Far From Perfect

We're working on it. Stay tuned.

p570-EBCDIC Still A Lost Platform

The plan is to bring them back.

p570-Building Extensions Can Fail Because Of Largefiles

Certain extensions like mod_perl and BSD::Resource 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.

p570-ftmp-security tests warn 'system possibly insecure'

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

p570-Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX

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.

p570-Long Doubles Still Don't Work In Solaris

The experimental long double support is still very much so in Solaris. (Other platforms like Linux and Tru64 are beginning to solidify in this area.)

p570-Linux With Sfio Fails op/misc Test 48

No known fix.

p570-Storable tests fail in some platforms

If any Storable tests fail the use of Storable is not advisable.

p570-Threads Are Still Experimental

Multithreading is still an experimental feature. Some platforms emit the following message for lib/thr5005

    #
    # This is a KNOWN FAILURE, and one of the reasons why threading
    # is still an experimental feature.  It is here to stop people
    # from deploying threads in production. ;-)
    #

and another known thread-related warning is

   pragma/overload......Unbalanced saves: 3 more saves than restores
   panic: magic_mutexfree during global destruction.
   ok
   lib/selfloader.......Unbalanced saves: 3 more saves than restores
   panic: magic_mutexfree during global destruction.
   ok
   lib/st-dclone........Unbalanced saves: 3 more saves than restores
   panic: magic_mutexfree during global destruction.
   ok

p570-The Compiler Suite Is Still Experimental

The compiler suite is slowly getting better but is nowhere near working order yet. The backend part that has seen perhaps the most progress is the bytecode compiler.

p570-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/perl/ , 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.

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

p570-HISTORY

Written by Jarkko Hietaniemi <jhi@iki.fi>, with many contributions from The Perl Porters and Perl Users submitting feedback and patches.

Send omissions or corrections to <perlbug@perl.org>.

p561-NAME

perl561delta - what's new for perl v5.6.x

p561-DESCRIPTION

This document describes differences between the 5.005 release and the 5.6.1 release.

p561-Summary of changes between 5.6.0 and 5.6.1

This section contains a summary of the changes between the 5.6.0 release and the 5.6.1 release. More details about the changes mentioned here may be found in the Changes files that accompany the Perl source distribution. See perlhack for pointers to online resources where you can inspect the individual patches described by these changes.

p561-Security Issues

suidperl will not run /bin/mail anymore, because some platforms have a /bin/mail that is vulnerable to buffer overflow attacks.

Note that suidperl is neither built nor installed by default in any recent version of perl. Use of suidperl is highly discouraged. If you think you need it, try alternatives such as sudo first. See http://www.courtesan.com/sudo/ .

p561-Core bug fixes

This is not an exhaustive list. It is intended to cover only the significant user-visible changes.

p561-UNIVERSAL::isa()

A bug in the caching mechanism used by UNIVERSAL::isa() that affected base.pm has been fixed. The bug has existed since the 5.005 releases, but wasn't tickled by base.pm in those releases.

p561-Memory leaks

Various cases of memory leaks and attempts to access uninitialized memory have been cured. See "p561-Known Problems" below for further issues.

p561-Numeric conversions

Numeric conversions did not recognize changes in the string value properly in certain circumstances.

In other situations, large unsigned numbers (those above 2**31) could sometimes lose their unsignedness, causing bogus results in arithmetic operations.

Integer modulus on large unsigned integers sometimes returned incorrect values.

Perl 5.6.0 generated "not a number" warnings on certain conversions where previous versions didn't.

These problems have all been rectified.

Infinity is now recognized as a number.

p561-qw(a\\b)

In Perl 5.6.0, qw(a\\b) produced a string with two backslashes instead of one, in a departure from the behavior in previous versions. The older behavior has been reinstated.

p561-caller()

caller() could cause core dumps in certain situations. Carp was sometimes affected by this problem.

p561-Bugs in regular expressions

Pattern matches on overloaded values are now handled correctly.

Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings. This has been corrected.

The RE engine found in Perl 5.6.0 accidentally pessimised certain kinds of simple pattern matches. These are now handled better.

Regular expression debug output (whether through use re 'debug' or via -Dr) now looks better.

Multi-line matches like "a\nxb\n" =~ /(?!\A)x/m were flawed. The bug has been fixed.

Use of $& could trigger a core dump under some situations. This is now avoided.

Match variables $1 et al., weren't being unset when a pattern match was backtracking, and the anomaly showed up inside /...(?{ ... }).../ etc. These variables are now tracked correctly.

pos() did not return the correct value within s///ge in earlier versions. This is now handled correctly.

p561-"slurp" mode

readline() on files opened in "slurp" mode could return an extra "" at the end in certain situations. This has been corrected.

p561-Autovivification of symbolic references to special variables

Autovivification of symbolic references of special variables described in perlvar (as in ${$num}) was accidentally disabled. This works again now.

p561-Lexical warnings

Lexical warnings now propagate correctly into eval "...".

use warnings qw(FATAL all) did not work as intended. This has been corrected.

Lexical warnings could leak into other scopes in some situations. This is now fixed.

warnings::enabled() now reports the state of $^W correctly if the caller isn't using lexical warnings.

p561-Spurious warnings and errors

Perl 5.6.0 could emit spurious warnings about redefinition of dl_error() when statically building extensions into perl. This has been corrected.

"our" variables could result in bogus "Variable will not stay shared" warnings. This is now fixed.

"our" variables of the same name declared in two sibling blocks resulted in bogus warnings about "redeclaration" of the variables. The problem has been corrected.

p561-glob()

Compatibility of the builtin glob() with old csh-based glob has been improved with the addition of GLOB_ALPHASORT option. See File::Glob.

File::Glob::glob() has been renamed to File::Glob::bsd_glob() because the name clashes with the builtin glob(). The older name is still available for compatibility, but is deprecated.

Spurious syntax errors generated in certain situations, when glob() caused File::Glob to be loaded for the first time, have been fixed.

p561-Tainting

Some cases of inconsistent taint propagation (such as within hash values) have been fixed.

The tainting behavior of sprintf() has been rationalized. It does not taint the result of floating point formats anymore, making the behavior consistent with that of string interpolation.

p561-sort()

Arguments to sort() weren't being provided the right wantarray() context. The comparison block is now run in scalar context, and the arguments to be sorted are always provided list context.

sort() is also fully reentrant, in the sense that the sort function can itself call sort(). This did not work reliably in previous releases.

p561-#line directives

#line directives now work correctly when they appear at the very beginning of eval "...".

p561-Subroutine prototypes

The (\&) prototype now works properly.

p561-map()

map() could get pathologically slow when the result list it generates is larger than the source list. The performance has been improved for common scenarios.

p561-Debugger

Debugger exit code now reflects the script exit code.

Condition "0" in breakpoints is now treated correctly.

The d command now checks the line number.

$. is no longer corrupted by the debugger.

All debugger output now correctly goes to the socket if RemotePort is set.

p561-PERL5OPT

PERL5OPT can be set to more than one switch group. Previously, it used to be limited to one group of options only.

p561-chop()

chop(@list) in list context returned the characters chopped in reverse order. This has been reversed to be in the right order.

p561-Unicode support

Unicode support has seen a large number of incremental improvements, but continues to be highly experimental. It is not expected to be fully supported in the 5.6.x maintenance releases.

substr(), join(), repeat(), reverse(), quotemeta() and string concatenation were all handling Unicode strings incorrectly in Perl 5.6.0. This has been corrected.

Support for tr///CU and tr///UC etc., have been removed since we realized the interface is broken. For similar functionality, see "pack" in perlfunc.

The Unicode Character Database has been updated to version 3.0.1 with additions made available to the public as of August 30, 2000.

The Unicode character classes \p{Blank} and \p{SpacePerl} have been added. "Blank" is like C isblank(), that is, it contains only "horizontal whitespace" (the space character is, the newline isn't), and the "SpacePerl" is the Unicode equivalent of \s (\p{Space} isn't, since that includes the vertical tabulator character, whereas \s doesn't.)

If you are experimenting with Unicode support in perl, the development versions of Perl may have more to offer. In particular, I/O layers are now available in the development track, but not in the maintenance track, primarily to do backward compatibility issues. Unicode support is also evolving rapidly on a daily basis in the development track--the maintenance track only reflects the most conservative of these changes.

p561-64-bit support

Support for 64-bit platforms has been improved, but continues to be experimental. The level of support varies greatly among platforms.

p561-Compiler

The B Compiler and its various backends have had many incremental improvements, but they continue to remain highly experimental. Use in production environments is discouraged.

The perlcc tool has been rewritten so that the user interface is much more like that of a C compiler.

The perlbc tools has been removed. Use perlcc -B instead.

p561-Lvalue subroutines

There have been various bugfixes to support lvalue subroutines better. However, the feature still remains experimental.

p561-IO::Socket

IO::Socket::INET failed to open the specified port if the service name was not known. It now correctly uses the supplied port number as is.

p561-File::Find

File::Find now chdir()s correctly when chasing symbolic links.

p561-xsubpp

xsubpp now tolerates embedded POD sections.

p561-no Module;

no Module; does not produce an error even if Module does not have an unimport() method. This parallels the behavior of use vis-a-vis import.

p561-Tests

A large number of tests have been added.

p561-Core features

untie() will now call an UNTIE() hook if it exists. See perltie for details.

The -DT command line switch outputs copious tokenizing information. See perlrun.

Arrays are now always interpolated in double-quotish strings. Previously, "foo@bar.com" used to be a fatal error at compile time, if an array @bar was not used or declared. This transitional behavior was intended to help migrate perl4 code, and is deemed to be no longer useful. See "p561-Arrays now always interpolate into double-quoted strings".

keys(), each(), pop(), push(), shift(), splice() and unshift() can all be overridden now.

my __PACKAGE__ $obj now does the expected thing.

p561-Configuration issues

On some systems (IRIX and Solaris among them) the system malloc is demonstrably better. While the defaults haven't been changed in order to retain binary compatibility with earlier releases, you may be better off building perl with Configure -Uusemymalloc ... as discussed in the INSTALL file.

Configure has been enhanced in various ways:

p561-Documentation

README.aix, README.solaris and README.macos have been added. README.posix-bc has been renamed to README.bs2000. These are installed as perlaix, perlsolaris, perlmacos, and perlbs2000 respectively.

The following pod documents are brand new:

    perlclib    Internal replacements for standard C library functions
    perldebtut  Perl debugging tutorial
    perlebcdic  Considerations for running Perl on EBCDIC platforms
    perlnewmod  Perl modules: preparing a new module for distribution
    perlrequick Perl regular expressions quick start
    perlretut   Perl regular expressions tutorial
    perlutil    utilities packaged with the Perl distribution

The INSTALL file has been expanded to cover various issues, such as 64-bit support.

A longer list of contributors has been added to the source distribution. See the file AUTHORS.

Numerous other changes have been made to the included documentation and FAQs.

p561-Bundled modules

The following modules have been added.

p561-B::Concise

Walks Perl syntax tree, printing concise info about ops. See B::Concise.

p561-File::Temp

Returns name and handle of a temporary file safely. See File::Temp.

p561-Pod::LaTeX

Converts Pod data to formatted LaTeX. See Pod::LaTeX.

p561-Pod::Text::Overstrike

Converts POD data to formatted overstrike text. See Pod::Text::Overstrike.

The following modules have been upgraded.

p561-CGI

CGI v2.752 is now included.

p561-CPAN

CPAN v1.59_54 is now included.

p561-Class::Struct

Various bugfixes have been added.

p561-DB_File

DB_File v1.75 supports newer Berkeley DB versions, among other improvements.

p561-Devel::Peek

Devel::Peek has been enhanced to support dumping of memory statistics, when perl is built with the included malloc().

p561-File::Find

File::Find now supports pre and post-processing of the files in order to sort() them, etc.

p561-Getopt::Long

Getopt::Long v2.25 is included.

p561-IO::Poll

Various bug fixes have been included.

p561-IPC::Open3

IPC::Open3 allows use of numeric file descriptors.

p561-Math::BigFloat

The fmod() function supports modulus operations. Various bug fixes have also been included.

p561-Math::Complex

Math::Complex handles inf, NaN etc., better.

p561-Net::Ping

ping() could fail on odd number of data bytes, and when the echo service isn't running. This has been corrected.

p561-Opcode

A memory leak has been fixed.

p561-Pod::Parser

Version 1.13 of the Pod::Parser suite is included.

p561-Pod::Text

Pod::Text and related modules have been upgraded to the versions in podlators suite v2.08.

p561-SDBM_File

On dosish platforms, some keys went missing because of lack of support for files with "holes". A workaround for the problem has been added.

p561-Sys::Syslog

Various bug fixes have been included.

p561-Tie::RefHash

Now supports Tie::RefHash::Nestable to automagically tie hashref values.

p561-Tie::SubstrHash

Various bug fixes have been included.

p561-Platform-specific improvements

The following new ports are now available.

p561-NCR MP-RAS
p561-NonStop-UX

Perl now builds under Amdahl UTS.

Perl has also been verified to build under Amiga OS.

Support for EPOC has been much improved. See README.epoc.

Building perl with -Duseithreads or -Duse5005threads now works under HP-UX 10.20 (previously it only worked under 10.30 or later). You will need a thread library package installed. See README.hpux.

Long doubles should now work under Linux.

Mac OS Classic is now supported in the mainstream source package. See README.macos.

Support for MPE/iX has been updated. See README.mpeix.

Support for OS/2 has been improved. See os2/Changes and README.os2.

Dynamic loading on z/OS (formerly OS/390) has been improved. See README.os390.

Support for VMS has seen many incremental improvements, including better support for operators like backticks and system(), and better %ENV handling. See README.vms and perlvms.

Support for Stratus VOS has been improved. See vos/Changes and README.vos.

Support for Windows has been improved.

Unless specifically qualified otherwise, the remainder of this document covers changes between the 5.005 and 5.6.0 releases.

p561-Core Enhancements

p561-Interpreter cloning, threads, and concurrency

Perl 5.6.0 introduces the beginnings of support for running multiple interpreters concurrently in different threads. In conjunction with the perl_clone() API call, which can be used to selectively duplicate the state of any given interpreter, it is possible to compile a piece of code once in an interpreter, clone that interpreter one or more times, and run all the resulting interpreters in distinct threads.

On the Windows platform, this feature is used to emulate fork() at the interpreter level. See perlfork for details about that.

This feature is still in evolution. It is eventually meant to be used to selectively clone a subroutine and data reachable from that subroutine in a separate interpreter and run the cloned subroutine in a separate thread. Since there is no shared data between the interpreters, little or no locking will be needed (unless parts of the symbol table are explicitly shared). This is obviously intended to be an easy-to-use replacement for the existing threads support.

Support for cloning interpreters and interpreter concurrency can be enabled using the -Dusethreads Configure option (see win32/Makefile for how to enable it on Windows.) The resulting perl executable will be functionally identical to one that was built with -Dmultiplicity, but the perl_clone() API call will only be available in the former.

-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn enables Perl source code changes that provide a clear separation between the op tree and the data it operates with. The former is immutable, and can therefore be shared between an interpreter and all of its clones, while the latter is considered local to each interpreter, and is therefore copied for each clone.

Note that building Perl with the -Dusemultiplicity Configure option is adequate if you wish to run multiple independent interpreters concurrently in different threads. -Dusethreads only provides the additional functionality of the perl_clone() API call and other support for running cloned interpreters concurrently.

    NOTE: This is an experimental feature.  Implementation details are
    subject to change.

p561-Lexically scoped warning categories

You can now control the granularity of warnings emitted by perl at a finer level using the use warnings pragma. warnings and perllexwarn have copious documentation on this feature.

p561-Unicode and UTF-8 support

Perl now uses UTF-8 as its internal representation for character strings. The utf8 and bytes pragmas are used to control this support in the current lexical scope. See perlunicode, utf8 and bytes for more information.

This feature is expected to evolve quickly to support some form of I/O disciplines that can be used to specify the kind of input and output data (bytes or characters). Until that happens, additional modules from CPAN will be needed to complete the toolkit for dealing with Unicode.

    NOTE: This should be considered an experimental feature.  Implementation
    details are subject to change.

p561-Support for interpolating named characters

The new \N escape interpolates named characters within strings. For example, "Hi! \N{WHITE SMILING FACE}" evaluates to a string with a Unicode smiley face at the end.

p561-"our" declarations

An "our" declaration introduces a value that can be best understood as a lexically scoped symbolic alias to a global variable in the package that was current where the variable was declared. This is mostly useful as an alternative to the vars pragma, but also provides the opportunity to introduce typing and other attributes for such variables. See "our" in perlfunc.

p561-Support for strings represented as a vector of ordinals

Literals of the form v1.2.3.4 are now parsed as a string composed of characters with the specified ordinals. This is an alternative, more readable way to construct (possibly Unicode) strings instead of interpolating characters, as in "\x{1}\x{2}\x{3}\x{4}". The leading v may be omitted if there are more than two ordinals, so 1.2.3 is parsed the same as v1.2.3.

Strings written in this form are also useful to represent version "numbers". It is easy to compare such version "numbers" (which are really just plain strings) using any of the usual string comparison operators eq, ne, lt, gt, etc., or perform bitwise string operations on them using |, &, etc.

In conjunction with the new $^V magic variable (which contains the perl version as a string), such literals can be used as a readable way to check if you're running a particular version of Perl:

    # this will parse in older versions of Perl also
    if ($^V and $^V gt v5.6.0) {
        # new features supported
    }

require and use also have some special magic to support such literals. They will be interpreted as a version rather than as a module name:

    require v5.6.0;             # croak if $^V lt v5.6.0
    use v5.6.0;                 # same, but croaks at compile-time

Alternatively, the v may be omitted if there is more than one dot:

    require 5.6.0;
    use 5.6.0;

Also, sprintf and printf support the Perl-specific format flag %v to print ordinals of characters in arbitrary strings:

    printf "v%vd", $^V;         # prints current version, such as "v5.5.650"
    printf "%*vX", ":", $addr;  # formats IPv6 address
    printf "%*vb", " ", $bits;  # displays bitstring

See "Scalar value constructors" in perldata for additional information.

p561-Improved Perl version numbering system

Beginning with Perl version 5.6.0, the version number convention has been changed to a "dotted integer" scheme that is more commonly found in open source projects.

Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc. The next development series following v5.6.0 will be numbered v5.7.x, beginning with v5.7.0, and the next major production release following v5.6.0 will be v5.8.0.

The English module now sets $PERL_VERSION to $^V (a string value) rather than $] (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)

The v1.2.3 syntax is also now legal in Perl. See "p561-Support for strings represented as a vector of ordinals" for more on that.

To cope with the new versioning system's use of at least three significant digits for each version component, the method used for incrementing the subversion number has also changed slightly. We assume that versions older than v5.6.0 have been incrementing the subversion component in multiples of 10. Versions after v5.6.0 will increment them by 1. Thus, using the new notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance version following v5.6.0 will be v5.6.1 (which should be read as being equivalent to a floating point value of 5.006_001 in the older format, stored in $]).

p561-New syntax for declaring subroutine attributes

Formerly, if you wanted to mark a subroutine as being a method call or as requiring an automatic lock() when it is entered, you had to declare that with a use attrs pragma in the body of the subroutine. That can now be accomplished with declaration syntax, like this:

    sub mymethod : locked method;
    ...
    sub mymethod : locked method {
        ...
    }

    sub othermethod :locked :method;
    ...
    sub othermethod :locked :method {
        ...
    }

(Note how only the first : is mandatory, and whitespace surrounding the : is optional.)

AutoSplit.pm and SelfLoader.pm have been updated to keep the attributes with the stubs they provide. See attributes.

p561-File and directory handles can be autovivified

Similar to how constructs such as $x->[0] autovivify a reference, handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(), socket(), and accept()) now autovivify a file or directory handle if the handle passed to them is an uninitialized scalar variable. This allows the constructs such as open(my $fh, ...) and open(local $fh,...) to be used to create filehandles that will conveniently be closed automatically when the scope ends, provided there are no other references to them. This largely eliminates the need for typeglobs when opening filehandles that must be passed around, as in the following example:

    sub myopen {
        open my $fh, "@_"
             or die "Can't open '@_': $!";
        return $fh;
    }

    {
        my $f = myopen(";
        # $f implicitly closed here
    }

p561-open() with more than two arguments

If open() is passed three arguments instead of two, the second argument is used as the mode and the third argument is taken to be the file name. This is primarily useful for protecting against unintended magic behavior of the traditional two-argument form. See "open" in perlfunc.

p561-64-bit support

Any platform that has 64-bit integers either

        (1) natively as longs or ints
        (2) via special compiler flags
        (3) using long long or int64_t

is able to use "quads" (64-bit integers) as follows:

Note that unless you have the case (a) you will have to configure and compile Perl using the -Duse64bitint Configure flag.

    NOTE: The Configure flags -Duselonglong and -Duse64bits have been
    deprecated.  Use -Duse64bitint instead.

There are actually two modes of 64-bitness: the first one is achieved using Configure -Duse64bitint and the second one using Configure -Duse64bitall. The difference is that the first one is minimal and the second one maximal. The first works in more places than the second.

The use64bitint does only as much as is required to get 64-bit integers into Perl (this may mean, for example, using "long longs") while your memory may still be limited to 2 gigabytes (because your pointers could still be 32-bit). Note that the name 64bitint does not imply that your C compiler will be using 64-bit ints (it might, but it doesn't have to): the use64bitint means that you will be able to have 64 bits wide scalar values.

The use64bitall goes all the way by attempting to switch also integers (if it can), longs (and pointers) to being 64-bit. This may create an even more binary incompatible Perl than -Duse64bitint: the resulting executable may not run at all in a 32-bit box, or you may have to reboot/reconfigure/rebuild your operating system to be 64-bit aware.

Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint nor -Duse64bitall.

Last but not least: note that due to Perl's habit of always using floating point numbers, the quads are still not true integers. When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned, -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they are silently promoted to floating point numbers, after which they will start losing precision (in their lower digits).

    NOTE: 64-bit support is still experimental on most platforms.
    Existing support only covers the LP64 data model.  In particular, the
    LLP64 data model is not yet supported.  64-bit libraries and system
    APIs on many platforms have not stabilized--your mileage may vary.

p561-Large file support

If you have filesystems that support "large files" (files larger than 2 gigabytes), you may now also be able to create and access them from Perl.

    NOTE: The default action is to enable large file support, if
    available on the platform.

If the large file support is on, and you have a Fcntl constant O_LARGEFILE, the O_LARGEFILE is automatically added to the flags of sysopen().

Beware that unless your filesystem also supports "sparse files" seeking to umpteen petabytes may be inadvisable.

Note that in addition to requiring a proper file system to do large files you may also need to adjust your per-process (or your per-system, or per-process-group, or per-user-group) maximum filesize limits before running Perl scripts that try to handle large files, especially if you intend to write such files.

Finally, in addition to your process/process group maximum filesize limits, you may have quota limits on your filesystems that stop you (your user id or your user group id) from using large files.

Adjusting your process/user/group/file system/operating system limits is outside the scope of Perl core language. For process limits, you may try increasing the limits using your shell's limits/limit/ulimit command before running Perl. The BSD::Resource extension (not included with the standard Perl distribution) may also be of use, it offers the getrlimit/setrlimit interface that can be used to adjust process resource usage limits, including the maximum filesize limit.

p561-Long doubles

In some systems you may be able to use long doubles to enhance the range and precision of your double precision floating point numbers (that is, Perl's numbers). Use Configure -Duselongdouble to enable this support (if it is available).

p561-"more bits"

You can "Configure -Dusemorebits" to turn on both the 64-bit support and the long double support.

p561-Enhanced support for sort() subroutines

Perl subroutines with a prototype of ($$), and XSUBs in general, can now be used as sort subroutines. In either case, the two elements to be compared are passed as normal parameters in @_. See "sort" in perlfunc.

For unprototyped sort subroutines, the historical behavior of passing the elements to be compared as the global variables $a and $b remains unchanged.

p561-sort $coderef @foo allowed

sort() did not accept a subroutine reference as the comparison function in earlier versions. This is now permitted.

p561-File globbing implemented internally

Perl now uses the File::Glob implementation of the glob() operator automatically. This avoids using an external csh process and the problems associated with it.

    NOTE: This is currently an experimental feature.  Interfaces and
    implementation are subject to change.

p561-Support for CHECK blocks

In addition to BEGIN, INIT, END, DESTROY and AUTOLOAD, subroutines named CHECK are now special. These are queued up during compilation and behave similar to END blocks, except they are called at the end of compilation rather than at the end of execution. They cannot be called directly.

p561-POSIX character class syntax [: :] supported

For example to match alphabetic characters use /[[:alpha:]]/. See perlre for details.

p561-Better pseudo-random number generator

In 5.005_0x and earlier, perl's rand() function used the C library rand(3) function. As of 5.005_52, Configure tests for drand48(), random(), and rand() (in that order) and picks the first one it finds.

These changes should result in better random numbers from rand().

p561-Improved qw// operator

The qw// operator is now evaluated at compile time into a true list instead of being replaced with a run time call to split(). This removes the confusing misbehaviour of qw// in scalar context, which had inherited that behaviour from split().

Thus:

    $foo = ($bar) = qw(a b c); print "$foo|$bar\n";

now correctly prints "3|a", instead of "2|a".

p561-Better worst-case behavior of hashes

Small changes in the hashing algorithm have been implemented in order to improve the distribution of lower order bits in the hashed value. This is expected to yield better performance on keys that are repeated sequences.

p561-pack() format 'Z' supported

The new format type 'Z' is useful for packing and unpacking null-terminated strings. See "pack" in perlfunc.

p561-pack() format modifier '!' supported

The new format type modifier '!' is useful for packing and unpacking native shorts, ints, and longs. See "pack" in perlfunc.

p561-pack() and unpack() support counted strings

The template character '/' can be used to specify a counted string type to be packed or unpacked. See "pack" in perlfunc.

p561-Comments in pack() templates

The '#' character in a template introduces a comment up to end of the line. This facilitates documentation of pack() templates.

p561-Weak references

In previous versions of Perl, you couldn't cache objects so as to allow them to be deleted if the last reference from outside the cache is deleted. The reference in the cache would hold a reference count on the object and the objects would never be destroyed.

Another familiar problem is with circular references. When an object references itself, its reference count would never go down to zero, and it would not get destroyed until the program is about to exit.

Weak references solve this by allowing you to "weaken" any reference, that is, make it not count towards the reference count. When the last non-weak reference to an object is deleted, the object is destroyed and all the weak references to the object are automatically undef-ed.

To use this feature, you need the Devel::WeakRef package from CPAN, which contains additional documentation.

    NOTE: This is an experimental feature.  Details are subject to change.  

p561-Binary numbers supported

Binary numbers are now supported as literals, in s?printf formats, and oct():

    $answer = 0b101010;
    printf "The answer is: %b\n", oct("0b101010");

p561-Lvalue subroutines

Subroutines can now return modifiable lvalues. See "Lvalue subroutines" in perlsub.

    NOTE: This is an experimental feature.  Details are subject to change.

p561-Some arrows may be omitted in calls through references

Perl now allows the arrow to be omitted in many constructs involving subroutine calls through references. For example, $foo[10]->('foo') may now be written $foo[10]('foo'). This is rather similar to how the arrow may be omitted from $foo[10]->{'foo'}. Note however, that the arrow is still required for foo(10)->('bar').

p561-Boolean assignment operators are legal lvalues

Constructs such as ($a ||= 2) += 1 are now allowed.

p561-exists() is supported on subroutine names

The exists() builtin now works on subroutine names. A subroutine is considered to exist if it has been declared (even if implicitly). See "exists" in perlfunc for examples.

p561-exists() and delete() are supported on array elements

The exists() and delete() builtins now work on simple arrays as well. The behavior is similar to that on hash elements.

exists() can be used to check whether an array element has been initialized. This avoids autovivifying array elements that don't exist. If the array is tied, the EXISTS() method in the corresponding tied package will be invoked.

delete() may be used to remove an element from the array and return it. The array element at that position returns to its uninitialized state, so that testing for the same element with exists() will return false. If the element happens to be the one at the end, the size of the array also shrinks up to the highest element that tests true for exists(), or 0 if none such is found. If the array is tied, the DELETE() method in the corresponding tied package will be invoked.

See "exists" in perlfunc and "delete" in perlfunc for examples.

p561-Pseudo-hashes work better

Dereferencing some types of reference values in a pseudo-hash, such as $ph->{foo}[1], was accidentally disallowed. This has been corrected.

When applied to a pseudo-hash element, exists() now reports whether the specified value exists, not merely if the key is valid.

delete() now works on pseudo-hashes. When given a pseudo-hash element or slice it deletes the values corresponding to the keys (but not the keys themselves). See "Pseudo-hashes: Using an array as a hash" in perlref.

Pseudo-hash slices with constant keys are now optimized to array lookups at compile-time.

List assignments to pseudo-hash slices are now supported.

The fields pragma now provides ways to create pseudo-hashes, via fields::new() and fields::phash(). See fields.

    NOTE: The pseudo-hash data type continues to be experimental.
    Limiting oneself to the interface elements provided by the
    fields pragma will provide protection from any future changes.

p561-Automatic flushing of output buffers

fork(), exec(), system(), qx//, and pipe open()s now flush buffers of all files opened for output when the operation was attempted. This mostly eliminates confusing buffering mishaps suffered by users unaware of how Perl internally handles I/O.

This is not supported on some platforms like Solaris where a suitably correct implementation of fflush(NULL) isn't available.

p561-Better diagnostics on meaningless filehandle operations

Constructs such as open() and close() are compile time errors. Attempting to read from filehandles that were opened only for writing will now produce warnings (just as writing to read-only filehandles does).

p561-Where possible, buffered data discarded from duped input filehandle

open(NEW, "<&OLD") now attempts to discard any data that was previously read and buffered in OLD before duping the handle. On platforms where doing this is allowed, the next read operation on NEW will return the same data as the corresponding operation on OLD. Formerly, it would have returned the data from the start of the following disk block instead.

p561-eof() has the same old magic as <>

eof() would return true if no attempt to read from <> had yet been made. eof() has been changed to have a little magic of its own, it now opens the <> files.

p561-binmode() can be used to set :crlf and :raw modes

binmode() now accepts a second argument that specifies a discipline for the handle in question. The two pseudo-disciplines ":raw" and ":crlf" are currently supported on DOS-derivative platforms. See "binmode" in perlfunc and open.

p561--T filetest recognizes UTF-8 encoded files as "text"

The algorithm used for the -T filetest has been enhanced to correctly identify UTF-8 content as "text".

p561-system(), backticks and pipe open now reflect exec() failure

On Unix and similar platforms, system(), qx() and open(FOO, "cmd |") etc., are implemented via fork() and exec(). When the underlying exec() fails, earlier versions did not report the error properly, since the exec() happened to be in a different process.

The child process now communicates with the parent about the error in launching the external command, which allows these constructs to return with their usual error value and set $!.

p561-Improved diagnostics

Line numbers are no longer suppressed (under most likely circumstances) during the global destruction phase.

Diagnostics emitted from code running in threads other than the main thread are now accompanied by the thread ID.

Embedded null characters in diagnostics now actually show up. They used to truncate the message in prior versions.

$foo::a and $foo::b are now exempt from "possible typo" warnings only if sort() is encountered in package foo.

Unrecognized alphabetic escapes encountered when parsing quote constructs now generate a warning, since they may take on new semantics in later versions of Perl.

Many diagnostics now report the internal operation in which the warning was provoked, like so:

    Use of uninitialized value in concatenation (.) at (eval 1) line 1.
    Use of uninitialized value in print at (eval 1) line 1.

Diagnostics that occur within eval may also report the file and line number where the eval is located, in addition to the eval sequence number and the line number within the evaluated text itself. For example:

    Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF

p561-Diagnostics follow STDERR

Diagnostic output now goes to whichever file the STDERR handle is pointing at, instead of always going to the underlying C runtime library's stderr.

p561-More consistent close-on-exec behavior

On systems that support a close-on-exec flag on filehandles, the flag is now set for any handles created by pipe(), socketpair(), socket(), and accept(), if that is warranted by the value of $^F that may be in effect. Earlier versions neglected to set the flag for handles created with these operators. See "pipe" in perlfunc, "socketpair" in perlfunc, "socket" in perlfunc, "accept" in perlfunc, and "$^F" in perlvar.

p561-syswrite() ease-of-use

The length argument of syswrite() has become optional.

p561-Better syntax checks on parenthesized unary operators

Expressions such as:

    print defined(&foo,&bar,&baz);
    print uc("foo","bar","baz");
    undef($foo,&bar);

used to be accidentally allowed in earlier versions, and produced unpredictable behaviour. Some produced ancillary warnings when used in this way; others silently did the wrong thing.

The parenthesized forms of most unary operators that expect a single argument now ensure that they are not called with more than one argument, making the cases shown above syntax errors. The usual behaviour of:

    print defined &foo, &bar, &baz;
    print uc "foo", "bar", "baz";
    undef $foo, &bar;

remains unchanged. See perlop.

p561-Bit operators support full native integer width

The bit operators (& | ^ ~ << >>) now operate on the full native integral width (the exact size of which is available in $Config{ivsize}). For example, if your platform is either natively 64-bit or if Perl has been configured to use 64-bit integers, these operations apply to 8 bytes (as opposed to 4 bytes on 32-bit platforms). For portability, be sure to mask off the excess bits in the result of unary ~, e.g., ~$x & 0xffffffff.

p561-Improved security features

More potentially unsafe operations taint their results for improved security.

The passwd and shell fields returned by the getpwent(), getpwnam(), and getpwuid() are now tainted, because the user can affect their own encrypted password and login shell.

The variable modified by shmread(), and messages returned by msgrcv() (and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted, because other untrusted processes can modify messages and shared memory segments for their own nefarious purposes.

p561-More functional bareword prototype (*)

Bareword prototypes have been rationalized to enable them to be used to override builtins that accept barewords and interpret them in a special way, such as require or do.

Arguments prototyped as * will now be visible within the subroutine as either a simple scalar or as a reference to a typeglob. See "Prototypes" in perlsub.

p561-require and do may be overridden

require and do 'file' operations may be overridden locally by importing subroutines of the same name into the current package (or globally by importing them into the CORE::GLOBAL:: namespace). Overriding require will also affect use, provided the override is visible at compile-time. See "Overriding Built-in Functions" in perlsub.

p561-$^X variables may now have names longer than one character

Formerly, $^X was synonymous with ${"\cX"}, but $^XY was a syntax error. Now variable names that begin with a control character may be arbitrarily long. However, for compatibility reasons, these variables must be written with explicit braces, as ${^XY} for example. ${^XYZ} is synonymous with ${"\cXYZ"}. Variable names with more than one control character, such as ${^XY^Z}, are illegal.

The old syntax has not changed. As before, `^X' may be either a literal control-X character or the two-character sequence `caret' plus `X'. When braces are omitted, the variable name stops after the control character. Thus "$^XYZ" continues to be synonymous with $^X . "YZ" as before.

As before, lexical variables may not have names beginning with control characters. As before, variables whose names begin with a control character are always forced to be in package `main'. All such variables are reserved for future extensions, except those that begin with ^_, which may be used by user programs and are guaranteed not to acquire special meaning in any future version of Perl.

p561-New variable $^C reflects -c switch

$^C has a boolean value that reflects whether perl is being run in compile-only mode (i.e. via the -c switch). Since BEGIN blocks are executed under such conditions, this variable enables perl code to determine whether actions that make sense only during normal running are warranted. See perlvar.

p561-New variable $^V contains Perl version as a string

$^V contains the Perl version number as a string composed of characters whose ordinals match the version numbers, i.e. v5.6.0. This may be used in string comparisons.

See Support for strings represented as a vector of ordinals for an example.

p561-Optional Y2K warnings

If Perl is built with the cpp macro PERL_Y2KWARN defined, it emits optional warnings when concatenating the number 19 with another number.

This behavior must be specifically enabled when running Configure. See INSTALL and README.Y2K.

p561-Arrays now always interpolate into double-quoted strings

In double-quoted strings, arrays now interpolate, no matter what. The behavior in earlier versions of perl 5 was that arrays would interpolate into strings if the array had been mentioned before the string was compiled, and otherwise Perl would raise a fatal compile-time error. In versions 5.000 through 5.003, the error was

        Literal @example now requires backslash

In versions 5.004_01 through 5.6.0, the error was

        In string, @example now must be written as \@example

The idea here was to get people into the habit of writing "fred\@example.com" when they wanted a literal @ sign, just as they have always written "Give me back my \$5" when they wanted a literal $ sign.

Starting with 5.6.1, when Perl now sees an @ sign in a double-quoted string, it always attempts to interpolate an array, regardless of whether or not the array has been used or declared already. The fatal error has been downgraded to an optional warning:

        Possible unintended interpolation of @example in string

This warns you that "fred@example.com" is going to turn into fred.com if you don't backslash the @. See http://perl.plover.com/at-error.html for more details about the history here.

p561-@- and @+ provide starting/ending offsets of regex submatches

The new magic variables @- and @+ provide the starting and ending offsets, respectively, of $&, $1, $2, etc. See perlvar for details.

p561-Modules and Pragmata

p561-Modules

p561-attributes

While used internally by Perl as a pragma, this module also provides a way to fetch subroutine and variable attributes. See attributes.

p561-B

The Perl Compiler suite has been extensively reworked for this release. More of the standard Perl test suite passes when run under the Compiler, but there is still a significant way to go to achieve production quality compiled executables.

    NOTE: The Compiler suite remains highly experimental.  The
    generated code may not be correct, even when it manages to execute
    without errors.
p561-Benchmark

Overall, Benchmark results exhibit lower average error and better timing accuracy.

You can now run tests for n seconds instead of guessing the right number of tests to run: e.g., timethese(-5, ...) will run each code for at least 5 CPU seconds. Zero as the "number of repetitions" means "for at least 3 CPU seconds". The output format has also changed. For example:

   use Benchmark;$x=3;timethese(-5,{a=>sub{$x*$x},b=>sub{$x**2}})

will now output something like this:

   Benchmark: running a, b, each for at least 5 CPU seconds...
            a:  5 wallclock secs ( 5.77 usr +  0.00 sys =  5.77 CPU) @ 200551.91/s (n=1156516)
            b:  4 wallclock secs ( 5.00 usr +  0.02 sys =  5.02 CPU) @ 159605.18/s (n=800686)

New features: "each for at least N CPU seconds...", "wallclock secs", and the "@ operations/CPU second (n=operations)".

timethese() now returns a reference to a hash of Benchmark objects containing the test results, keyed on the names of the tests.

timethis() now returns the iterations field in the Benchmark result object instead of 0.

timethese(), timethis(), and the new cmpthese() (see below) can also take a format specifier of 'none' to suppress output.

A new function countit() is just like timeit() except that it takes a TIME instead of a COUNT.

A new function cmpthese() prints a chart comparing the results of each test returned from a timethese() call. For each possible pair of tests, the percentage speed difference (iters/sec or seconds/iter) is shown.

For other details, see Benchmark.

p561-ByteLoader

The ByteLoader is a dedicated extension to generate and run Perl bytecode. See ByteLoader.

p561-constant

References can now be used.

The new version also allows a leading underscore in constant names, but disallows a double leading underscore (as in "__LINE__"). Some other names are disallowed or warned against, including BEGIN, END, etc. Some names which were forced into main:: used to fail silently in some cases; now they're fatal (outside of main::) and an optional warning (inside of main::). The ability to detect whether a constant had been set with a given name has been added.

See constant.

p561-charnames

This pragma implements the \N string escape. See charnames.

p561-Data::Dumper

A Maxdepth setting can be specified to avoid venturing too deeply into deep data structures. See Data::Dumper.

The XSUB implementation of Dump() is now automatically called if the Useqq setting is not in use.

Dumping qr// objects works correctly.

p561-DB

DB is an experimental module that exposes a clean abstraction to Perl's debugging API.

p561-DB_File

DB_File can now be built with Berkeley DB versions 1, 2 or 3. See ext/DB_File/Changes.

p561-Devel::DProf

Devel::DProf, a Perl source code profiler has been added. See Devel::DProf and dprofpp.

p561-Devel::Peek

The Devel::Peek module provides access to the internal representation of Perl variables and data. It is a data debugging tool for the XS programmer.

p561-Dumpvalue

The Dumpvalue module provides screen dumps of Perl data.

p561-DynaLoader

DynaLoader now supports a dl_unload_file() function on platforms that support unloading shared objects using dlclose().

Perl can also optionally arrange to unload all extension shared objects loaded by Perl. To enable this, build Perl with the Configure option -Accflags=-DDL_UNLOAD_ALL_AT_EXIT. (This maybe useful if you are using Apache with mod_perl.)

p561-English

$PERL_VERSION now stands for $^V (a string value) rather than for $] (a numeric value).

p561-Env

Env now supports accessing environment variables like PATH as array variables.

p561-Fcntl

More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for large file (more than 4GB) access (NOTE: the O_LARGEFILE is automatically added to sysopen() flags if large file support has been configured, as is the default), Free/Net/OpenBSD locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of O_RDONLY, O_WRONLY, and O_RDWR. The seek()/sysseek() constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the :seek tag. The chmod()/stat() S_IF* constants and S_IS* functions are available via the :mode tag.

p561-File::Compare

A compare_text() function has been added, which allows custom comparison functions. See File::Compare.

p561-File::Find

File::Find now works correctly when the wanted() function is either autoloaded or is a symbolic reference.

A bug that caused File::Find to lose track of the working directory when pruning top-level directories has been fixed.

File::Find now also supports several other options to control its behavior. It can follow symbolic links if the follow option is specified. Enabling the no_chdir option will make File::Find skip changing the current directory when walking directories. The untaint flag can be useful when running with taint checks enabled.

See File::Find.

p561-File::Glob

This extension implements BSD-style file globbing. By default, it will also be used for the internal implementation of the glob() operator. See File::Glob.

p561-File::Spec

New methods have been added to the File::Spec module: devnull() returns the name of the null device (/dev/null on Unix) and tmpdir() the name of the temp directory (normally /tmp on Unix). There are now also methods to convert between absolute and relative filenames: abs2rel() and rel2abs(). For compatibility with operating systems that specify volume names in file paths, the splitpath(), splitdir(), and catdir() methods have been added.

p561-File::Spec::Functions

The new File::Spec::Functions modules provides a function interface to the File::Spec module. Allows shorthand

    $fullname = catfile($dir1, $dir2, $file);

instead of

    $fullname = File::Spec->catfile($dir1, $dir2, $file);
p561-Getopt::Long

Getopt::Long licensing has changed to allow the Perl Artistic License as well as the GPL. It used to be GPL only, which got in the way of non-GPL applications that wanted to use Getopt::Long.

Getopt::Long encourages the use of Pod::Usage to produce help messages. For example:

    use Getopt::Long;
    use Pod::Usage;
    my $man = 0;
    my $help = 0;
    GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
    pod2usage(1) if $help;
    pod2usage(-exitstatus => 0, -verbose => 2) if $man;

    __END__

    =head1 NAME

    sample - Using Getopt::Long and Pod::Usage

    =head1 SYNOPSIS

    sample [options] [file ...]

     Options:
       -help            brief help message
       -man             full documentation

    =head1 OPTIONS

    =over 8

    =item B<-help>

    Print a brief help message and exits.

    =item B<-man>

    Prints the manual page and exits.

    =back

    =head1 DESCRIPTION

    B will read the given input file(s) and do something
    useful with the contents thereof.

    =cut

See Pod::Usage for details.

A bug that prevented the non-option call-back <> from being specified as the first argument has been fixed.

To specify the characters < and > as option starters, use ><. Note, however, that changing option starters is strongly deprecated.

p561-IO

write() and syswrite() will now accept a single-argument form of the call, for consistency with Perl's syswrite().

You can now create a TCP-based IO::Socket::INET without forcing a connect attempt. This allows you to configure its options (like making it non-blocking) and then call connect() manually.

A bug that prevented the IO::Socket::protocol() accessor from ever returning the correct value has been corrected.

IO::Socket::connect now uses non-blocking IO instead of alarm() to do connect timeouts.

IO::Socket::accept now uses select() instead of alarm() for doing timeouts.

IO::Socket::INET->new now sets $! correctly on failure. $@ is still set for backwards compatibility.

p561-JPL

Java Perl Lingo is now distributed with Perl. See jpl/README for more information.

p561-lib

use lib now weeds out any trailing duplicate entries. no lib removes all named entries.

p561-Math::BigInt

The bitwise operations <<, >>, &, |, and ~ are now supported on bigints.

p561-Math::Complex

The accessor methods Re, Im, arg, abs, rho, and theta can now also act as mutators (accessor $z->Re(), mutator $z->Re(3)).

The class method display_format and the corresponding object method display_format, in addition to accepting just one argument, now can also accept a parameter hash. Recognized keys of a parameter hash are "style", which corresponds to the old one parameter case, and two new parameters: "format", which is a printf()-style format string (defaults usually to "%.15g", you can revert to the default by setting the format string to undef) used for both parts of a complex number, and "polar_pretty_print" (defaults to true), which controls whether an attempt is made to try to recognize small multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a polar complex number.

The potentially disruptive change is that in list context both methods now return the parameter hash, instead of only the value of the "style" parameter.

p561-Math::Trig

A little bit of radial trigonometry (cylindrical and spherical), radial coordinate conversions, and the great circle distance were added.

p561-Pod::Parser, Pod::InputObjects

Pod::Parser is a base class for parsing and selecting sections of pod documentation from an input stream. This module takes care of identifying pod paragraphs and commands in the input and hands off the parsed paragraphs and commands to user-defined methods which are free to interpret or translate them as they see fit.

Pod::InputObjects defines some input objects needed by Pod::Parser, and for advanced users of Pod::Parser that need more about a command besides its name and text.

As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned "base parser code" recommended for use by all pod2xxx translators. Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already underway. For any questions or comments about pod parsing and translating issues and utilities, please use the pod-people@perl.org mailing list.

For further information, please see Pod::Parser and Pod::InputObjects.

p561-Pod::Checker, podchecker

This utility checks pod files for correct syntax, according to perlpod. Obvious errors are flagged as such, while warnings are printed for mistakes that can be handled gracefully. The checklist is not complete yet. See Pod::Checker.

p561-Pod::ParseUtils, Pod::Find

These modules provide a set of gizmos that are useful mainly for pod translators. Pod::Find traverses directory structures and returns found pod files, along with their canonical names (like File::Spec::Unix). Pod::ParseUtils contains Pod::List (useful for storing pod list information), Pod::Hyperlink (for parsing the contents of L<> sequences) and Pod::Cache (for caching information about pod files, e.g., link nodes).

p561-Pod::Select, podselect

Pod::Select is a subclass of Pod::Parser which provides a function named "podselect()" to filter out user-specified sections of raw pod documentation from an input stream. podselect is a script that provides access to Pod::Select from other scripts to be used as a filter. See Pod::Select.

p561-Pod::Usage, pod2usage

Pod::Usage provides the function "pod2usage()" to print usage messages for a Perl script based on its embedded pod documentation. The pod2usage() function is generally useful to all script authors since it lets them write and maintain a single source (the pods) for documentation, thus removing the need to create and maintain redundant usage message text consisting of information already in the pods.

There is also a pod2usage script which can be used from other kinds of scripts to print usage messages from pods (even for non-Perl scripts with pods embedded in comments).

For details and examples, please see Pod::Usage.

p561-Pod::Text and Pod::Man

Pod::Text has been rewritten to use Pod::Parser. While pod2text() is still available for backwards compatibility, the module now has a new preferred interface. See Pod::Text for the details. The new Pod::Text module is easily subclassed for tweaks to the output, and two such subclasses (Pod::Text::Termcap for man-page-style bold and underlining using termcap information, and Pod::Text::Color for markup with ANSI color sequences) are now standard.

pod2man has been turned into a module, Pod::Man, which also uses Pod::Parser. In the process, several outstanding bugs related to quotes in section headers, quoting of code escapes, and nested lists have been fixed. pod2man is now a wrapper script around this module.

p561-SDBM_File

An EXISTS method has been added to this module (and sdbm_exists() has been added to the underlying sdbm library), so one can now call exists on an SDBM_File tied hash and get the correct result, rather than a runtime error.

A bug that may have caused data loss when more than one disk block happens to be read from the database in a single FETCH() has been fixed.

p561-Sys::Syslog

Sys::Syslog now uses XSUBs to access facilities from syslog.h so it no longer requires syslog.ph to exist.

p561-Sys::Hostname

Sys::Hostname now uses XSUBs to call the C library's gethostname() or uname() if they exist.

p561-Term::ANSIColor

Term::ANSIColor is a very simple module to provide easy and readable access to the ANSI color and highlighting escape sequences, supported by most ANSI terminal emulators. It is now included standard.

p561-Time::Local

The timelocal() and timegm() functions used to silently return bogus results when the date fell outside the machine's integer range. They now consistently croak() if the date falls in an unsupported range.

p561-Win32

The error return value in list context has been changed for all functions that return a list of values. Previously these functions returned a list with a single element undef if an error occurred. Now these functions return the empty list in these situations. This applies to the following functions:

    Win32::FsType
    Win32::GetOSVersion

The remaining functions are unchanged and continue to return undef on error even in list context.

The Win32::SetLastError(ERROR) function has been added as a complement to the Win32::GetLastError() function.

The new Win32::GetFullPathName(FILENAME) returns the full absolute pathname for FILENAME in scalar context. In list context it returns a two-element list containing the fully qualified directory name and the filename. See Win32.

p561-XSLoader

The XSLoader extension is a simpler alternative to DynaLoader. See XSLoader.

p561-DBM Filters

A new feature called "DBM Filters" has been added to all the DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File. DBM Filters add four new methods to each DBM module:

    filter_store_key
    filter_store_value
    filter_fetch_key
    filter_fetch_value

These can be used to filter key-value pairs before the pairs are written to the database or just after they are read from the database. See perldbmfilter for further information.

p561-Pragmata

use attrs is now obsolete, and is only provided for backward-compatibility. It's been replaced by the sub : attributes syntax. See "Subroutine Attributes" in perlsub and attributes.

Lexical warnings pragma, use warnings;, to control optional warnings. See perllexwarn.

use filetest to control the behaviour of filetests (-r -w ...). Currently only one subpragma implemented, "use filetest 'access';", that uses access(2) or equivalent to check permissions instead of using stat(2) as usual. This matters in filesystems where there are ACLs (access control lists): the stat(2) might lie, but access(2) knows better.

The open pragma can be used to specify default disciplines for handle constructors (e.g. open()) and for qx//. The two pseudo-disciplines :raw and :crlf are currently supported on DOS-derivative platforms (i.e. where binmode is not a no-op). See also "p561-binmode() can be used to set :crlf and :raw modes".

p561-Utility Changes

p561-dprofpp

dprofpp is used to display profile data generated using Devel::DProf. See dprofpp.

p561-find2perl

The find2perl utility now uses the enhanced features of the File::Find module. The -depth and -follow options are supported. Pod documentation is also included in the script.

p561-h2xs

The h2xs tool can now work in conjunction with C::Scan (available from CPAN) to automatically parse real-life header files. The -M, -a, -k, and -o options are new.

p561-perlcc

perlcc now supports the C and Bytecode backends. By default, it generates output from the simple C backend rather than the optimized C backend.

Support for non-Unix platforms has been improved.

p561-perldoc

perldoc has been reworked to avoid possible security holes. It will not by default let itself be run as the superuser, but you may still use the -U switch to try to make it drop privileges first.

p561-The Perl Debugger

Many bug fixes and enhancements were added to perl5db.pl, the Perl debugger. The help documentation was rearranged. New commands include < ?, > ?, and { ? to list out current actions, man docpage to run your doc viewer on some perl docset, and support for quoted options. The help information was rearranged, and should be viewable once again if you're using less as your pager. A serious security hole was plugged--you should immediately remove all older versions of the Perl debugger as installed in previous releases, all the way back to perl3, from your system to avoid being bitten by this.

p561-Improved Documentation

Many of the platform-specific README files are now part of the perl installation. See perl for the complete list.

p561-perlapi.pod

The official list of public Perl API functions.

p561-perlboot.pod

A tutorial for beginners on object-oriented Perl.

p561-perlcompile.pod

An introduction to using the Perl Compiler suite.

p561-perldbmfilter.pod

A howto document on using the DBM filter facility.

p561-perldebug.pod

All material unrelated to running the Perl debugger, plus all low-level guts-like details that risked crushing the casual user of the debugger, have been relocated from the old manpage to the next entry below.

p561-perldebguts.pod

This new manpage contains excessively low-level material not related to the Perl debugger, but slightly related to debugging Perl itself. It also contains some arcane internal details of how the debugging process works that may only be of interest to developers of Perl debuggers.

p561-perlfork.pod

Notes on the fork() emulation currently available for the Windows platform.

p561-perlfilter.pod

An introduction to writing Perl source filters.

p561-perlhack.pod

Some guidelines for hacking the Perl source code.

p561-perlintern.pod

A list of internal functions in the Perl source code. (List is currently empty.)

p561-perllexwarn.pod

Introduction and reference information about lexically scoped warning categories.

p561-perlnumber.pod

Detailed information about numbers as they are represented in Perl.

p561-perlopentut.pod

A tutorial on using open() effectively.

p561-perlreftut.pod

A tutorial that introduces the essentials of references.

p561-perltootc.pod

A tutorial on managing class data for object modules.

p561-perltodo.pod

Discussion of the most often wanted features that may someday be supported in Perl.

p561-perlunicode.pod

An introduction to Unicode support features in Perl.

p561-Performance enhancements

p561-Simple sort() using { $a <=> $b } and the like are optimized

Many common sort() operations using a simple inlined block are now optimized for faster performance.

p561-Optimized assignments to lexical variables

Certain operations in the RHS of assignment statements have been optimized to directly set the lexical variable on the LHS, eliminating redundant copying overheads.

p561-Faster subroutine calls

Minor changes in how subroutine calls are handled internally provide marginal improvements in performance.

p561-delete(), each(), values() and hash iteration are faster

The hash values returned by delete(), each(), values() and hashes in a list context are the actual values in the hash, instead of copies. This results in significantly better performance, because it eliminates needless copying in most situations.

p561-Installation and Configuration Improvements

p561--Dusethreads means something different

The -Dusethreads flag now enables the experimental interpreter-based thread support by default. To get the flavor of experimental threads that was in 5.005 instead, you need to run Configure with "-Dusethreads -Duse5005threads".

As of v5.6.0, interpreter-threads support is still lacking a way to create new threads from Perl (i.e., use Thread; will not work with interpreter threads). use Thread; continues to be available when you specify the -Duse5005threads option to Configure, bugs and all.

    NOTE: Support for threads continues to be an experimental feature.
    Interfaces and implementation are subject to sudden and drastic changes.

p561-New Configure flags

The following new flags may be enabled on the Configure command line by running Configure with -Dflag.

    usemultiplicity
    usethreads useithreads      (new interpreter threads: no Perl API yet)
    usethreads use5005threads   (threads as they were in 5.005)

    use64bitint                 (equal to now deprecated 'use64bits')
    use64bitall

    uselongdouble
    usemorebits
    uselargefiles
    usesocks                    (only SOCKS v5 supported)

p561-Threadedness and 64-bitness now more daring

The Configure options enabling the use of threads and the use of 64-bitness are now more daring in the sense that they no more have an explicit list of operating systems of known threads/64-bit capabilities. In other words: if your operating system has the necessary APIs and datatypes, you should be able just to go ahead and use them, for threads by Configure -Dusethreads, and for 64 bits either explicitly by Configure -Duse64bitint or implicitly if your system has 64-bit wide datatypes. See also "p561-64-bit support".

p561-Long Doubles

Some platforms have "long doubles", floating point numbers of even larger range than ordinary "doubles". To enable using long doubles for Perl's scalars, use -Duselongdouble.

p561--Dusemorebits

You can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits. See also "p561-64-bit support".

p561--Duselargefiles

Some platforms support system APIs that are capable of handling large files (typically, files larger than two gigabytes). Perl will try to use these APIs if you ask for -Duselargefiles.

See "p561-Large file support" for more information.

p561-installusrbinperl

You can use "Configure -Uinstallusrbinperl" which causes installperl to skip installing perl also as /usr/bin/perl. This is useful if you prefer not to modify /usr/bin for some reason or another but harmful because many scripts assume to find Perl in /usr/bin/perl.

p561-SOCKS support

You can use "Configure -Dusesocks" which causes Perl to probe for the SOCKS proxy protocol library (v5, not v4). For more information on SOCKS, see:

    http://www.socks.nec.com/

p561--A flag

You can "post-edit" the Configure variables using the Configure -A switch. The editing happens immediately after the platform specific hints files have been processed but before the actual configuration process starts. Run Configure -h to find out the full -A syntax.

p561-Enhanced Installation Directories

The installation structure has been enriched to improve the support for maintaining multiple versions of perl, to provide locations for vendor-supplied modules, scripts, and manpages, and to ease maintenance of locally-added modules, scripts, and manpages. See the section on Installation Directories in the INSTALL file for complete details. For most users building and installing from source, the defaults should be fine.

If you previously used Configure -Dsitelib or -Dsitearch to set special values for library directories, you might wish to consider using the new -Dsiteprefix setting instead. Also, if you wish to re-use a config.sh file from an earlier version of perl, you should be sure to check that Configure makes sensible choices for the new directories. See INSTALL for complete details.

p561-gcc automatically tried if 'cc' does not seem to be working

In many platforms the vendor-supplied 'cc' is too stripped-down to build Perl (basically, the 'cc' doesn't do ANSI C). If this seems to be the case and the 'cc' does not seem to be the GNU C compiler 'gcc', an automatic attempt is made to find and use 'gcc' instead.

p561-Platform specific changes

p561-Supported platforms

p561-DOS

p561-OS390 (OpenEdition MVS)

Support for this EBCDIC platform has not been renewed in this release. There are difficulties in reconciling Perl's standardization on UTF-8 as its internal representation for characters with the EBCDIC character set, because the two are incompatible.

It is unclear whether future versions will renew support for this platform, but the possibility exists.

p561-VMS

Numerous revisions and extensions to configuration, build, testing, and installation process to accommodate core changes and VMS-specific options.

Expand %ENV-handling code to allow runtime mapping to logical names, CLI symbols, and CRTL environ array.

Extension of subprocess invocation code to accept filespecs as command "verbs".

Add to Perl command line processing the ability to use default file types and to recognize Unix-style 2>&1.

Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.

Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly.

Barewords at start of Unix-syntax paths may be treated as text rather than only as logical names.

Optional secure translation of several logical names used internally by Perl.

Miscellaneous bugfixing and porting of new core code to VMS.

Thanks are gladly extended to the many people who have contributed VMS patches, testing, and ideas.

p561-Win32

Perl can now emulate fork() internally, using multiple interpreters running in different concurrent threads. This support must be enabled at build time. See perlfork for detailed information.

When given a pathname that consists only of a drivename, such as A:, opendir() and stat() now use the current working directory for the drive rather than the drive root.

The builtin XSUB functions in the Win32:: namespace are documented. See Win32.

$^X now contains the full path name of the running executable.

A Win32::GetLongPathName() function is provided to complement Win32::GetFullPathName() and Win32::GetShortPathName(). See Win32.

POSIX::uname() is supported.

system(1,...) now returns true process IDs rather than process handles. kill() accepts any real process id, rather than strictly return values from system(1,...).

For better compatibility with Unix, kill(0, $pid) can now be used to test whether a process exists.

The Shell module is supported.

Better support for building Perl under command.com in Windows 95 has been added.

Scripts are read in binary mode by default to allow ByteLoader (and the filter mechanism in general) to work properly. For compatibility, the DATA filehandle will be set to text mode if a carriage return is detected at the end of the line containing the __END__ or __DATA__ token; if not, the DATA filehandle will be left open in binary mode. Earlier versions always opened the DATA filehandle in text mode.

The glob() operator is implemented via the File::Glob extension, which supports glob syntax of the C shell. This increases the flexibility of the glob() operator, but there may be compatibility issues for programs that relied on the older globbing syntax. If you want to preserve compatibility with the older syntax, you might want to run perl with -MFile::DosGlob. For details and compatibility information, see File::Glob.

p561-Significant bug fixes

p561- on empty files

With $/ set to undef, "slurping" an empty file returns a string of zero length (instead of undef, as it used to) the first time the HANDLE is read after $/ is set to undef. Further reads yield undef.

This means that the following will append "foo" to an empty file (it used to do nothing):

    perl -0777 -pi -e 's/^/foo/' empty_file

The behaviour of:

    perl -pi -e 's/^/foo/' empty_file

is unchanged (it continues to leave the file empty).

p561-eval '...' improvements

Line numbers (as reflected by caller() and most diagnostics) within eval '...' were often incorrect where here documents were involved. This has been corrected.

Lexical lookups for variables appearing in eval '...' within functions that were themselves called within an eval '...' were searching the wrong place for lexicals. The lexical search now correctly ends at the subroutine's block boundary.

The use of return within eval {...} caused $@ not to be reset correctly when no exception occurred within the eval. This has been fixed.

Parsing of here documents used to be flawed when they appeared as the replacement expression in eval 's/.../.../e'. This has been fixed.

p561-All compilation errors are true errors

Some "errors" encountered at compile time were by necessity generated as warnings followed by eventual termination of the program. This enabled more such errors to be reported in a single run, rather than causing a hard stop at the first error that was encountered.

The mechanism for reporting such errors has been reimplemented to queue compile-time errors and report them at the end of the compilation as true errors rather than as warnings. This fixes cases where error messages leaked through in the form of warnings when code was compiled at run time using eval STRING, and also allows such errors to be reliably trapped using eval "...".

p561-Implicitly closed filehandles are safer

Sometimes implicitly closed filehandles (as when they are localized, and Perl automatically closes them on exiting the scope) could inadvertently set $? or $!. This has been corrected.

p561-Behavior of list slices is more consistent

When taking a slice of a literal list (as opposed to a slice of an array or hash), Perl used to return an empty list if the result happened to be composed of all undef values.

The new behavior is to produce an empty list if (and only if) the original list was empty. Consider the following example:

    @a = (1,undef,undef,2)[2,1,2];

The old behavior would have resulted in @a having no elements. The new behavior ensures it has three undefined elements.

Note in particular that the behavior of slices of the following cases remains unchanged:

    @a = ()[1,2];
    @a = (getpwent)[7,0];
    @a = (anything_returning_empty_list())[2,1,2];
    @a = @b[2,1,2];
    @a = @c{'a','b','c'};

See perldata.

p561-(\$) prototype and $foo{a}

A scalar reference prototype now correctly allows a hash or array element in that slot.

p561-goto &sub and AUTOLOAD

The goto &sub construct works correctly when &sub happens to be autoloaded.

p561--bareword allowed under use integer

The autoquoting of barewords preceded by - did not work in prior versions when the integer pragma was enabled. This has been fixed.

p561-Failures in DESTROY()

When code in a destructor threw an exception, it went unnoticed in earlier versions of Perl, unless someone happened to be looking in $@ just after the point the destructor happened to run. Such failures are now visible as warnings when warnings are enabled.

p561-Locale bugs fixed

printf() and sprintf() previously reset the numeric locale back to the default "C" locale. This has been fixed.

Numbers formatted according to the local numeric locale (such as using a decimal comma instead of a decimal dot) caused "isn't numeric" warnings, even while the operations accessing those numbers produced correct results. These warnings have been discontinued.

p561-Memory leaks

The eval 'return sub {...}' construct could sometimes leak memory. This has been fixed.

Operations that aren't filehandle constructors used to leak memory when used on invalid filehandles. This has been fixed.

Constructs that modified @_ could fail to deallocate values in @_ and thus leak memory. This has been corrected.

p561-Spurious subroutine stubs after failed subroutine calls

Perl could sometimes create empty subroutine stubs when a subroutine was not found in the package. Such cases stopped later method lookups from progressing into base packages. This has been corrected.

p561-Taint failures under -U

When running in unsafe mode, taint violations could sometimes cause silent failures. This has been fixed.

p561-END blocks and the -c switch

Prior versions used to run BEGIN and END blocks when Perl was run in compile-only mode. Since this is typically not the expected behavior, END blocks are not executed anymore when the -c switch is used, or if compilation fails.

See "p561-Support for CHECK blocks" for how to run things when the compile phase ends.

p561-Potential to leak DATA filehandles

Using the __DATA__ token creates an implicit filehandle to the file that contains the token. It is the program's responsibility to close it when it is done reading from it.

This caveat is now better explained in the documentation. See perldata.

p561-New or Changed Diagnostics

p561-"%s" variable %s masks earlier declaration in same %s

(W misc) A "my" or "our" variable has been redeclared in the current scope or statement, effectively eliminating all access to the previous instance. This is almost always a typographical error. Note that the earlier variable will still exist until the end of the scope or until all closure referents to it are destroyed.

p561-"my sub" not yet implemented

(F) Lexically scoped subroutines are not yet implemented. Don't try that yet.

p561-"our" variable %s redeclared

(W misc) You seem to have already declared the same global once before in the current lexical scope.

p561-'!' allowed only after types %s

(F) The '!' is allowed in pack() and unpack() only after certain types. See "pack" in perlfunc.

p561-/ cannot take a count

(F) You had an unpack template indicating a counted-length string, but you have also specified an explicit size for the string. See "pack" in perlfunc.

p561-/ must be followed by a, A or Z

(F) You had an unpack template indicating a counted-length string, which must be followed by one of the letters a, A or Z to indicate what sort of string is to be unpacked. See "pack" in perlfunc.

p561-/ must be followed by a*, A* or Z*

(F) You had a pack template indicating a counted-length string, Currently the only things that can have their length counted are a*, A* or Z*. See "pack" in perlfunc.

p561-/ must follow a numeric type

(F) You had an unpack template that contained a '#', but this did not follow some numeric unpack specification. See "pack" in perlfunc.

p561-/%s/: Unrecognized escape \\%c passed through

(W regexp) You used a backslash-character combination which is not recognized by Perl. This combination appears in an interpolated variable or a '-delimited regular expression. The character was understood literally.

p561-/%s/: Unrecognized escape \\%c in character class passed through

(W regexp) You used a backslash-character combination which is not recognized by Perl inside character classes. The character was understood literally.

p561-/%s/ should probably be written as "%s"

(W syntax) You have used a pattern where Perl expected to find a string, as in the first argument to join. Perl will treat the true or false result of matching the pattern against $_ as the string, which is probably not what you had in mind.

p561-%s() called too early to check prototype

(W prototype) You've called a function that has a prototype before the parser saw a definition or declaration for it, and Perl could not check that the call conforms to the prototype. You need to either add an early prototype declaration for the subroutine in question, or move the subroutine definition ahead of the call to get proper prototype checking. Alternatively, if you are certain that you're calling the function correctly, you may put an ampersand before the name to avoid the warning. See perlsub.

p561-%s argument is not a HASH or ARRAY element

(F) The argument to exists() must be a hash or array element, such as:

    $foo{$bar}
    $ref->{"susie"}[12]
p561-%s argument is not a HASH or ARRAY element or slice

(F) The argument to delete() must be either a hash or array element, such as:

    $foo{$bar}
    $ref->{"susie"}[12]

or a hash or array slice, such as:

    @foo[$bar, $baz, $xyzzy]
    @{$ref->[12]}{"susie", "queue"}
p561-%s argument is not a subroutine name

(F) The argument to exists() for exists &sub must be a subroutine name, and not a subroutine call. exists &sub() will generate this error.

p561-%s package attribute may clash with future reserved word: %s

(W reserved) A lowercase attribute name was used that had a package-specific handler. That name might have a meaning to Perl itself some day, even though it doesn't yet. Perhaps you should use a mixed-case attribute name, instead. See attributes.

p561-(in cleanup) %s

(W misc) This prefix usually indicates that a DESTROY() method raised the indicated exception. Since destructors are usually called by the system at arbitrary points during execution, and often a vast number of times, the warning is issued only once for any number of failures that would otherwise result in the same message being repeated.

Failure of user callbacks dispatched using the G_KEEPERR flag could also result in this warning. See "G_KEEPERR" in perlcall.

p561-<> should be quotes

(F) You wrote require when you should have written require 'file'.

p561-Attempt to join self

(F) You tried to join a thread from within itself, which is an impossible task. You may be joining the wrong thread, or you may need to move the join() to some other thread.

p561-Bad evalled substitution pattern

(F) You've used the /e switch to evaluate the replacement for a substitution, but perl found a syntax error in the code to evaluate, most likely an unexpected right brace '}'.

p561-Bad realloc() ignored

(S) An internal routine called realloc() on something that had never been malloc()ed in the first place. Mandatory, but can be disabled by setting environment variable PERL_BADFREE to 1.

p561-Bareword found in conditional

(W bareword) The compiler found a bareword where it expected a conditional, which often indicates that an || or && was parsed as part of the last argument of the previous construct, for example:

    open FOO || die;

It may also indicate a misspelled constant that has been interpreted as a bareword:

    use constant TYPO => 1;
    if (TYOP) { print "foo" }

The strict pragma is useful in avoiding such errors.

p561-Binary number > 0b11111111111111111111111111111111 non-portable

(W portable) The binary number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

p561-Bit vector size > 32 non-portable

(W portable) Using bit vector sizes larger than 32 is non-portable.

p561-Buffer overflow in prime_env_iter: %s

(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over %ENV, it encountered a logical name or symbol definition which was too long, so it was truncated to the string shown.

p561-Can't check filesystem of script "%s"

(P) For some reason you can't check the filesystem of the script for nosuid.

p561-Can't declare class for non-scalar %s in "%s"

(S) Currently, only scalar variables can declared with a specific class qualifier in a "my" or "our" declaration. The semantics may be extended for other types of variables in future.

p561-Can't declare %s in "%s"

(F) Only scalar, array, and hash variables may be declared as "my" or "our" variables. They must have ordinary identifiers as names.

p561-Can't ignore signal CHLD, forcing to default

(W signal) Perl has detected that it is being run with the SIGCHLD signal (sometimes known as SIGCLD) disabled. Since disabling this signal will interfere with proper determination of exit status of child processes, Perl has reset the signal to its default value. This situation typically indicates that the parent program under which Perl may be running (e.g., cron) is being very careless.

p561-Can't modify non-lvalue subroutine call

(F) Subroutines meant to be used in lvalue context should be declared as such, see "Lvalue subroutines" in perlsub.

p561-Can't read CRTL environ

(S) A warning peculiar to VMS. Perl tried to read an element of %ENV from the CRTL's internal environment array and discovered the array was missing. You need to figure out where your CRTL misplaced its environ or define PERL_ENV_TABLES (see perlvms) so that environ is not searched.

p561-Can't remove %s: %s, skipping file

(S) You requested an inplace edit without creating a backup file. Perl was unable to remove the original file to replace it with the modified file. The file was left unmodified.

p561-Can't return %s from lvalue subroutine

(F) Perl detected an attempt to return illegal lvalues (such as temporary or readonly values) from a subroutine used as an lvalue. This is not allowed.

p561-Can't weaken a nonreference

(F) You attempted to weaken something that was not a reference. Only references can be weakened.

p561-Character class [:%s:] unknown

(F) The class in the character class [: :] syntax is unknown. See perlre.

p561-Character class syntax [%s] belongs inside character classes

(W unsafe) The character class constructs [: :], [= =], and [. .] go inside character classes, the [] are part of the construct, for example: /[012[:alpha:]345]/. Note that [= =] and [. .] are not currently implemented; they are simply placeholders for future extensions.

p561-Constant is not %s reference

(F) A constant value (perhaps declared using the use constant pragma) is being dereferenced, but it amounts to the wrong type of reference. The message indicates the type of reference that was expected. This usually indicates a syntax error in dereferencing the constant value. See "Constant Functions" in perlsub and constant.

p561-constant(%s): %s

(F) The parser found inconsistencies either while attempting to define an overloaded constant, or when trying to find the character name specified in the \N{...} escape. Perhaps you forgot to load the corresponding overload or charnames pragma? See charnames and overload.

p561-CORE::%s is not a keyword

(F) The CORE:: namespace is reserved for Perl keywords.

p561-defined(@array) is deprecated

(D) defined() is not usually useful on arrays because it checks for an undefined scalar value. If you want to see if the array is empty, just use if (@array) { # not empty } for example.

p561-defined(%hash) is deprecated

(D) defined() is not usually useful on hashes because it checks for an undefined scalar value. If you want to see if the hash is empty, just use if (%hash) { # not empty } for example.

p561-Did not produce a valid header

See Server error.

p561-(Did you mean "local" instead of "our"?)

(W misc) Remember that "our" does not localize the declared global variable. You have declared it again in the same lexical scope, which seems superfluous.

p561-Document contains no data

See Server error.

p561-entering effective %s failed

(F) While under the use filetest pragma, switching the real and effective uids or gids failed.

p561-false [] range "%s" in regexp

(W regexp) A character class range must start and end at a literal character, not another character class like \d or [:alpha:]. The "-" in your false range is interpreted as a literal "-". Consider quoting the "-", "\-". See perlre.

p561-Filehandle %s opened only for output

(W io) You tried to read from a filehandle opened only for writing. If you intended it to be a read/write filehandle, you needed to open it with "+<" or "+>" or "+>>" instead of with "<" or nothing. If you intended only to read from the file, use "<". See "open" in perlfunc.

p561-flock() on closed filehandle %s

(W closed) The filehandle you're attempting to flock() got itself closed some time before now. Check your logic flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name?

p561-Global symbol "%s" requires explicit package name

(F) You've said "use strict vars", which indicates that all variables must either be lexically scoped (using "my"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::").

p561-Hexadecimal number > 0xffffffff non-portable

(W portable) The hexadecimal number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

p561-Ill-formed CRTL environ value "%s"

(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal environ array, and encountered an element without the = delimiter used to separate keys from values. The element is ignored.

p561-Ill-formed message in prime_env_iter: |%s|

(W internal) A warning peculiar to VMS. Perl tried to read a logical name or CLI symbol definition when preparing to iterate over %ENV, and didn't see the expected delimiter between key and value, so the line was ignored.

p561-Illegal binary digit %s

(F) You used a digit other than 0 or 1 in a binary number.

p561-Illegal binary digit %s ignored

(W digit) You may have tried to use a digit other than 0 or 1 in a binary number. Interpretation of the binary number stopped before the offending digit.

p561-Illegal number of bits in vec

(F) The number of bits in vec() (the third argument) must be a power of two from 1 to 32 (or 64, if your platform supports that).

p561-Integer overflow in %s number

(W overflow) The hexadecimal, octal or binary number you have specified either as a literal or as an argument to hex() or oct() is too big for your architecture, and has been converted to a floating point number. On a 32-bit architecture the largest hexadecimal, octal or binary number representable without overflow is 0xFFFFFFFF, 037777777777, or 0b11111111111111111111111111111111 respectively. Note that Perl transparently promotes all numbers to a floating point representation internally--subject to loss of precision errors in subsequent operations.

p561-Invalid %s attribute: %s

The indicated attribute for a subroutine or variable was not recognized by Perl or by a user-supplied handler. See attributes.

p561-Invalid %s attributes: %s

The indicated attributes for a subroutine or variable were not recognized by Perl or by a user-supplied handler. See attributes.

p561-invalid [] range "%s" in regexp

The offending range is now explicitly displayed.

p561-Invalid separator character %s in attribute list

(F) Something other than a colon or whitespace was seen between the elements of an attribute list. If the previous attribute had a parenthesised parameter list, perhaps that list was terminated too soon. See attributes.

p561-Invalid separator character %s in subroutine attribute list

(F) Something other than a colon or whitespace was seen between the elements of a subroutine attribute list. If the previous attribute had a parenthesised parameter list, perhaps that list was terminated too soon.

p561-leaving effective %s failed

(F) While under the use filetest pragma, switching the real and effective uids or gids failed.

p561-Lvalue subs returning %s not implemented yet

(F) Due to limitations in the current implementation, array and hash values cannot be returned in subroutines used in lvalue context. See "Lvalue subroutines" in perlsub.

p561-Method %s not permitted

See Server error.

p561-Missing %sbrace%s on \N{}

(F) Wrong syntax of character name literal \N{charname} within double-quotish context.

p561-Missing command in piped open

(W pipe) You used the open(FH, "| command") or open(FH, "command |") construction, but the command was missing or blank.

p561-Missing name in "my sub"

(F) The reserved syntax for lexically scoped subroutines requires that they have a name with which they can be found.

p561-No %s specified for -%c

(F) The indicated command line switch needs a mandatory argument, but you haven't specified one.

p561-No package name allowed for variable %s in "our"

(F) Fully qualified variable names are not allowed in "our" declarations, because that doesn't make much sense under existing semantics. Such syntax is reserved for future extensions.

p561-No space allowed after -%c

(F) The argument to the indicated command line switch must follow immediately after the switch, without intervening spaces.

p561-no UTC offset information; assuming local time is UTC

(S) A warning peculiar to VMS. Perl was unable to find the local timezone offset, so it's assuming that local system time is equivalent to UTC. If it's not, define the logical name SYS$TIMEZONE_DIFFERENTIAL to translate to the number of seconds which need to be added to UTC to get local time.

p561-Octal number > 037777777777 non-portable

(W portable) The octal number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

See also perlport for writing portable code.

p561-panic: del_backref

(P) Failed an internal consistency check while trying to reset a weak reference.

p561-panic: kid popen errno read

(F) forked child returned an incomprehensible message about its errno.

p561-panic: magic_killbackrefs

(P) Failed an internal consistency check while trying to reset all weak references to an object.

p561-Parentheses missing around "%s" list

(W parenthesis) You said something like

    my $foo, $bar = @_;

when you meant

    my ($foo, $bar) = @_;

Remember that "my", "our", and "local" bind tighter than comma.

p561-Possible unintended interpolation of %s in string

(W ambiguous) It used to be that Perl would try to guess whether you wanted an array interpolated or a literal @. It no longer does this; arrays are now always interpolated into strings. This means that if you try something like:

        print "fred@example.com";

and the array @example doesn't exist, Perl is going to print fred.com, which is probably not what you wanted. To get a literal @ sign in a string, put a backslash before it, just as you would to get a literal $ sign.

p561-Possible Y2K bug: %s

(W y2k) You are concatenating the number 19 with another number, which could be a potential Year 2000 problem.

p561-pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead

(W deprecated) You have written something like this:

    sub doit
    {
        use attrs qw(locked);
    }

You should use the new declaration syntax instead.

    sub doit : locked
    {
        ...

The use attrs pragma is now obsolete, and is only provided for backward-compatibility. See "Subroutine Attributes" in perlsub.

p561-Premature end of script headers

See Server error.

p561-Repeat count in pack overflows

(F) You can't specify a repeat count so large that it overflows your signed integers. See "pack" in perlfunc.

p561-Repeat count in unpack overflows

(F) You can't specify a repeat count so large that it overflows your signed integers. See "unpack" in perlfunc.

p561-realloc() of freed memory ignored

(S) An internal routine called realloc() on something that had already been freed.

p561-Reference is already weak

(W misc) You have attempted to weaken a reference that is already weak. Doing so has no effect.

p561-setpgrp can't take arguments

(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments, unlike POSIX setpgid(), which takes a process ID and process group ID.

p561-Strange *+?{} on zero-length expression

(W regexp) You applied a regular expression quantifier in a place where it makes no sense, such as on a zero-width assertion. Try putting the quantifier inside the assertion instead. For example, the way to match "abc" provided that it is followed by three repetitions of "xyz" is /abc(?=(?:xyz){3})/, not /abc(?=xyz){3}/.

p561-switching effective %s is not implemented

(F) While under the use filetest pragma, we cannot switch the real and effective uids or gids.

p561-This Perl can't reset CRTL environ elements (%s)
p561-This Perl can't set CRTL environ elements (%s=%s)

(W internal) Warnings peculiar to VMS. You tried to change or delete an element of the CRTL's internal environ array, but your copy of Perl wasn't built with a CRTL that contained the setenv() function. You'll need to rebuild Perl with a CRTL that does, or redefine PERL_ENV_TABLES (see perlvms) so that the environ array isn't the target of the change to %ENV which produced the warning.

p561-Too late to run %s block

(W void) A CHECK or INIT block is being defined during run time proper, when the opportunity to run them has already passed. Perhaps you are loading a file with require or do when you should be using use instead. Or perhaps you should put the require or do inside a BEGIN block.

p561-Unknown open() mode '%s'

(F) The second argument of 3-argument open() is not among the list of valid modes: <, >, >>, +<, +>, +>>, -|, |-.

p561-Unknown process %x sent message to prime_env_iter: %s

(P) An error peculiar to VMS. Perl was reading values for %ENV before iterating over it, and someone else stuck a message in the stream of data Perl expected. Someone's very confused, or perhaps trying to subvert Perl's population of %ENV for nefarious purposes.

p561-Unrecognized escape \\%c passed through

(W misc) You used a backslash-character combination which is not recognized by Perl. The character was understood literally.

p561-Unterminated attribute parameter in attribute list

(F) The lexer saw an opening (left) parenthesis character while parsing an attribute list, but the matching closing (right) parenthesis character was not found. You may need to add (or remove) a backslash character to get your parentheses to balance. See attributes.

p561-Unterminated attribute list

(F) The lexer found something other than a simple identifier at the start of an attribute, and it wasn't a semicolon or the start of a block. Perhaps you terminated the parameter list of the previous attribute too soon. See attributes.

p561-Unterminated attribute parameter in subroutine attribute list

(F) The lexer saw an opening (left) parenthesis character while parsing a subroutine attribute list, but the matching closing (right) parenthesis character was not found. You may need to add (or remove) a backslash character to get your parentheses to balance.

p561-Unterminated subroutine attribute list

(F) The lexer found something other than a simple identifier at the start of a subroutine attribute, and it wasn't a semicolon or the start of a block. Perhaps you terminated the parameter list of the previous attribute too soon.

p561-Value of CLI symbol "%s" too long

(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV element from a CLI symbol table, and found a resultant string longer than 1024 characters. The return value has been truncated to 1024 characters.

p561-Version number must be a constant number

(P) The attempt to translate a use Module n.n LIST statement into its equivalent BEGIN block found an internal inconsistency with the version number.

p561-New tests

p561-lib/attrs

Compatibility tests for sub : attrs vs the older use attrs.

p561-lib/env

Tests for new environment scalar capability (e.g., use Env qw($BAR);).

p561-lib/env-array

Tests for new environment array capability (e.g., use Env qw(@PATH);).

p561-lib/io_const

IO constants (SEEK_*, _IO*).

p561-lib/io_dir

Directory-related IO methods (new, read, close, rewind, tied delete).

p561-lib/io_multihomed

INET sockets with multi-homed hosts.

p561-lib/io_poll

IO poll().

p561-lib/io_unix

UNIX sockets.

p561-op/attrs

Regression tests for my ($x,@y,%z) : attrs and .

p561-op/filetest

File test operators.

p561-op/lex_assign

Verify operations that access pad objects (lexicals and temporaries).

p561-op/exists_sub

Verify exists &sub operations.

p561-Incompatible Changes

p561-Perl Source Incompatibilities

Beware that any new warnings that have been added or old ones that have been enhanced are not considered incompatible changes.

Since all new warnings must be explicitly requested via the -w switch or the warnings pragma, it is ultimately the programmer's responsibility to ensure that warnings are enabled judiciously.

p561-CHECK is a new keyword

All subroutine definitions named CHECK are now special. See /"Support for CHECK blocks" for more information.

p561-Treatment of list slices of undef has changed

There is a potential incompatibility in the behavior of list slices that are comprised entirely of undefined values. See "p561-Behavior of list slices is more consistent".

p561-Format of $English::PERL_VERSION is different

The English module now sets $PERL_VERSION to $^V (a string value) rather than $] (a numeric value). This is a potential incompatibility. Send us a report via perlbug if you are affected by this.

See "p561-Improved Perl version numbering system" for the reasons for this change.

p561-Literals of the form 1.2.3 parse differently

Previously, numeric literals with more than one dot in them were interpreted as a floating point number concatenated with one or more numbers. Such "numbers" are now parsed as strings composed of the specified ordinals.

For example, print 97.98.99 used to output 97.9899 in earlier versions, but now prints abc.

See "p561-Support for strings represented as a vector of ordinals".

p561-Possibly changed pseudo-random number generator

Perl programs that depend on reproducing a specific set of pseudo-random numbers may now produce different output due to improvements made to the rand() builtin. You can use sh Configure -Drandfunc=rand to obtain the old behavior.

See "p561-Better pseudo-random number generator".

p561-Hashing function for hash keys has changed

Even though Perl hashes are not order preserving, the apparently random order encountered when iterating on the contents of a hash is actually determined by the hashing algorithm used. Improvements in the algorithm may yield a random order that is different from that of previous versions, especially when iterating on hashes.

See "p561-Better worst-case behavior of hashes" for additional information.

p561-undef fails on read only values

Using the undef operator on a readonly value (such as $1) has the same effect as assigning undef to the readonly value--it throws an exception.

p561-Close-on-exec bit may be set on pipe and socket handles

Pipe and socket handles are also now subject to the close-on-exec behavior determined by the special variable $^F.

See "p561-More consistent close-on-exec behavior".

p561-Writing "$$1" to mean "${$}1" is unsupported

Perl 5.004 deprecated the interpretation of $$1 and similar within interpolated strings to mean $$ . "1", but still allowed it.

In Perl 5.6.0 and later, "$$1" always means "${$1}".

p561-delete(), each(), values() and \(%h)

operate on aliases to values, not copies

delete(), each(), values() and hashes (e.g. \(%h)) in a list context return the actual values in the hash, instead of copies (as they used to in earlier versions). Typical idioms for using these constructs copy the returned values, but this can make a significant difference when creating references to the returned values. Keys in the hash are still returned as copies when iterating on a hash.

See also "p561-delete(), each(), values() and hash iteration are faster".

p561-vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS

vec() generates a run-time error if the BITS argument is not a valid power-of-two integer.

p561-Text of some diagnostic output has changed

Most references to internal Perl operations in diagnostics have been changed to be more descriptive. This may be an issue for programs that may incorrectly rely on the exact text of diagnostics for proper functioning.

p561-%@ has been removed

The undocumented special variable %@ that used to accumulate "background" errors (such as those that happen in DESTROY()) has been removed, because it could potentially result in memory leaks.

p561-Parenthesized not() behaves like a list operator

The not operator now falls under the "if it looks like a function, it behaves like a function" rule.

As a result, the parenthesized form can be used with grep and map. The following construct used to be a syntax error before, but it works as expected now:

    grep not($_), @things;

On the other hand, using not with a literal list slice may not work. The following previously allowed construct:

    print not (1,2,3)[0];

needs to be written with additional parentheses now:

    print not((1,2,3)[0]);

The behavior remains unaffected when not is not followed by parentheses.

p561-Semantics of bareword prototype (*) have changed

The semantics of the bareword prototype * have changed. Perl 5.005 always coerced simple scalar arguments to a typeglob, which wasn't useful in situations where the subroutine must distinguish between a simple scalar and a typeglob. The new behavior is to not coerce bareword arguments to a typeglob. The value will always be visible as either a simple scalar or as a reference to a typeglob.

See "p561-More functional bareword prototype (*)".

p561-Semantics of bit operators may have changed on 64-bit platforms

If your platform is either natively 64-bit or if Perl has been configured to used 64-bit integers, i.e., $Config{ivsize} is 8, there may be a potential incompatibility in the behavior of bitwise numeric operators (& | ^ ~ << >>). These operators used to strictly operate on the lower 32 bits of integers in previous versions, but now operate over the entire native integral width. In particular, note that unary ~ will produce different results on platforms that have different $Config{ivsize}. For portability, be sure to mask off the excess bits in the result of unary ~, e.g., ~$x & 0xffffffff.

See "p561-Bit operators support full native integer width".

p561-More builtins taint their results

As described in "p561-Improved security features", there may be more sources of taint in a Perl program.

To avoid these new tainting behaviors, you can build Perl with the Configure option -Accflags=-DINCOMPLETE_TAINTS. Beware that the ensuing perl binary may be insecure.

p561-C Source Incompatibilities

p561-PERL_POLLUTE

Release 5.005 grandfathered old global symbol names by providing preprocessor macros for extension source compatibility. As of release 5.6.0, these preprocessor definitions are not available by default. You need to explicitly compile perl with -DPERL_POLLUTE to get these definitions. For extensions still using the old symbols, this option can be specified via MakeMaker:

    perl Makefile.PL POLLUTE=1
p561-PERL_IMPLICIT_CONTEXT

This new build option provides a set of macros for all API functions such that an implicit interpreter/thread context argument is passed to every API function. As a result of this, something like sv_setsv(foo,bar) amounts to a macro invocation that actually translates to something like Perl_sv_setsv(my_perl,foo,bar). While this is generally expected to not have any significant source compatibility issues, the difference between a macro and a real function call will need to be considered.

This means that there is a source compatibility issue as a result of this if your extensions attempt to use pointers to any of the Perl API functions.

Note that the above issue is not relevant to the default build of Perl, whose interfaces continue to match those of prior versions (but subject to the other options described here).

See "The Perl API" in perlguts for detailed information on the ramifications of building Perl with this option.

    NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
    with one of -Dusethreads, -Dusemultiplicity, or both.  It is not
    intended to be enabled by users at this time.
p561-PERL_POLLUTE_MALLOC

Enabling Perl's malloc in release 5.005 and earlier caused the namespace of the system's malloc family of functions to be usurped by the Perl versions, since by default they used the same names. Besides causing problems on platforms that do not allow these functions to be cleanly replaced, this also meant that the system versions could not be called in programs that used Perl's malloc. Previous versions of Perl have allowed this behaviour to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor definitions.

As of release 5.6.0, Perl's malloc family of functions have default names distinct from the system versions. You need to explicitly compile perl with -DPERL_POLLUTE_MALLOC to get the older behaviour. HIDEMYMALLOC and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now the default.

Note that these functions do not constitute Perl's memory allocation API. See "Memory Allocation" in perlguts for further information about that.

p561-Compatible C Source API Changes

p561-PATCHLEVEL is now PERL_VERSION

The cpp macros PERL_REVISION, PERL_VERSION, and PERL_SUBVERSION are now available by default from perl.h, and reflect the base revision, patchlevel, and subversion respectively. PERL_REVISION had no prior equivalent, while PERL_VERSION and PERL_SUBVERSION were previously available as PATCHLEVEL and SUBVERSION.

The new names cause less pollution of the cpp namespace and reflect what the numbers have come to stand for in common practice. For compatibility, the old names are still supported when patchlevel.h is explicitly included (as required before), so there is no source incompatibility from the change.

p561-Binary Incompatibilities

In general, the default build of this release is expected to be binary compatible for extensions built with the 5.005 release or its maintenance versions. However, specific platforms may have broken binary compatibility due to changes in the defaults used in hints files. Therefore, please be sure to always check the platform-specific README files for any notes to the contrary.

The usethreads or usemultiplicity builds are not binary compatible with the corresponding builds in 5.005.

On platforms that require an explicit list of exports (AIX, OS/2 and Windows, among others), purely internal symbols such as parser functions and the run time opcodes are not exported by default. Perl 5.005 used to export all functions irrespective of whether they were considered part of the public API or not.

For the full list of public API functions, see perlapi.

p561-Known Problems

p561-Localizing a tied hash element may leak memory

As of the 5.6.1 release, there is a known leak when code such as this is executed:

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

    ...

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

p561-Known test failures

p561-EBCDIC platforms not fully supported

In earlier releases of Perl, EBCDIC environments like OS390 (also known as Open Edition MVS) and VM-ESA were supported. Due to changes required by the UTF-8 (Unicode) support, the EBCDIC platforms are not supported in Perl 5.6.0.

The 5.6.1 release improves support for EBCDIC platforms, but they are not fully supported yet.

p561-UNICOS/mk CC failures during Configure run

In UNICOS/mk the following errors may appear during the Configure run:

        Guessing which symbols your C compiler and preprocessor define...
        CC-20 cc: ERROR File = try.c, Line = 3
        ...
          bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
        ...
        4 errors detected in the compilation of "try.c".

The culprit is the broken awk of UNICOS/mk. The effect is fortunately rather mild: Perl itself is not adversely affected by the error, only the h2ph utility coming with Perl, and that is rather rarely needed these days.

p561-Arrow operator and arrays

When the left argument to the arrow operator -> is an array, or the scalar operator operating on an array, the result of the operation must be considered erroneous. For example:

    @x->[2]
    scalar(@x)->[2]

These expressions will get run-time errors in some future release of Perl.

p561-Experimental features

As discussed above, many features are still experimental. Interfaces and implementation of these features are subject to change, and in extreme cases, even subject to removal in some future release of Perl. These features include the following:

p561-Threads
p561-Unicode
p561-64-bit support
p561-Lvalue subroutines
p561-Weak references
p561-The pseudo-hash data type
p561-The Compiler suite
p561-Internal implementation of file globbing
p561-The DB module
p561-The regular expression code constructs:

(?{ code }) and (??{ code })

p561-Obsolete Diagnostics

p561-Character class syntax [: :] is reserved for future extensions

(W) Within regular expression character classes ([]) the syntax beginning with "[:" and ending with ":]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[:" and ":\]".

p561-Ill-formed logical name |%s| in prime_env_iter

(W) A warning peculiar to VMS. A logical name was encountered when preparing to iterate over %ENV which violates the syntactic rules governing logical names. Because it cannot be translated normally, it is skipped, and will not appear in %ENV. This may be a benign occurrence, as some software packages might directly modify logical name tables and introduce nonstandard names, or it may indicate that a logical name table has been corrupted.

p561-In string, @%s now must be written as \@%s

The description of this error used to say:

        (Someday it will simply assume that an unbackslashed @
         interpolates an array.)

That day has come, and this fatal error has been removed. It has been replaced by a non-fatal warning instead. See "p561-Arrays now always interpolate into double-quoted strings" for details.

p561-Probable precedence problem on %s

(W) The compiler found a bareword where it expected a conditional, which often indicates that an || or && was parsed as part of the last argument of the previous construct, for example:

    open FOO || die;
p561-regexp too big

(F) The current implementation of regular expressions uses shorts as address offsets within a string. Unfortunately this means that if the regular expression compiles to longer than 32767, it'll blow up. Usually when you want a regular expression this big, there is a better way to do it with multiple statements. See perlre.

"_to_mean_"${$}"_is_deprecated" >p561-Use of "$$" to mean "${$}" is deprecated

(D) Perl versions before 5.004 misinterpreted any type marker followed by "$" and a digit. For example, "$$0" was incorrectly taken to mean "${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.

However, the developers of Perl 5.004 could not fix this bug completely, because at least two widely-used modules depend on the old meaning of "$$0" in a string. So Perl 5.004 still interprets "$$" in the old (broken) way inside strings; but it generates this message as a warning. And in Perl 5.005, this special treatment will cease.

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

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

p561-HISTORY

Written by Gurusamy Sarathy <gsar@ActiveState.com>, with many contributions from The Perl Porters.

Send omissions or corrections to <perlbug@perl.org>.

p56-NAME

perl56delta - what's new for perl v5.6.0

p56-DESCRIPTION

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

p56-Core Enhancements

p56-Interpreter cloning, threads, and concurrency

Perl 5.6.0 introduces the beginnings of support for running multiple interpreters concurrently in different threads. In conjunction with the perl_clone() API call, which can be used to selectively duplicate the state of any given interpreter, it is possible to compile a piece of code once in an interpreter, clone that interpreter one or more times, and run all the resulting interpreters in distinct threads.

On the Windows platform, this feature is used to emulate fork() at the interpreter level. See perlfork for details about that.

This feature is still in evolution. It is eventually meant to be used to selectively clone a subroutine and data reachable from that subroutine in a separate interpreter and run the cloned subroutine in a separate thread. Since there is no shared data between the interpreters, little or no locking will be needed (unless parts of the symbol table are explicitly shared). This is obviously intended to be an easy-to-use replacement for the existing threads support.

Support for cloning interpreters and interpreter concurrency can be enabled using the -Dusethreads Configure option (see win32/Makefile for how to enable it on Windows.) The resulting perl executable will be functionally identical to one that was built with -Dmultiplicity, but the perl_clone() API call will only be available in the former.

-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn enables Perl source code changes that provide a clear separation between the op tree and the data it operates with. The former is immutable, and can therefore be shared between an interpreter and all of its clones, while the latter is considered local to each interpreter, and is therefore copied for each clone.

Note that building Perl with the -Dusemultiplicity Configure option is adequate if you wish to run multiple independent interpreters concurrently in different threads. -Dusethreads only provides the additional functionality of the perl_clone() API call and other support for running cloned interpreters concurrently.

    NOTE: This is an experimental feature.  Implementation details are
    subject to change.

p56-Lexically scoped warning categories

You can now control the granularity of warnings emitted by perl at a finer level using the use warnings pragma. warnings and perllexwarn have copious documentation on this feature.

p56-Unicode and UTF-8 support

Perl now uses UTF-8 as its internal representation for character strings. The utf8 and bytes pragmas are used to control this support in the current lexical scope. See perlunicode, utf8 and bytes for more information.

This feature is expected to evolve quickly to support some form of I/O disciplines that can be used to specify the kind of input and output data (bytes or characters). Until that happens, additional modules from CPAN will be needed to complete the toolkit for dealing with Unicode.

    NOTE: This should be considered an experimental feature.  Implementation
    details are subject to change.

p56-Support for interpolating named characters

The new \N escape interpolates named characters within strings. For example, "Hi! \N{WHITE SMILING FACE}" evaluates to a string with a unicode smiley face at the end.

p56-"our" declarations

An "our" declaration introduces a value that can be best understood as a lexically scoped symbolic alias to a global variable in the package that was current where the variable was declared. This is mostly useful as an alternative to the vars pragma, but also provides the opportunity to introduce typing and other attributes for such variables. See "our" in perlfunc.

p56-Support for strings represented as a vector of ordinals

Literals of the form v1.2.3.4 are now parsed as a string composed of characters with the specified ordinals. This is an alternative, more readable way to construct (possibly unicode) strings instead of interpolating characters, as in "\x{1}\x{2}\x{3}\x{4}". The leading v may be omitted if there are more than two ordinals, so 1.2.3 is parsed the same as v1.2.3.

Strings written in this form are also useful to represent version "numbers". It is easy to compare such version "numbers" (which are really just plain strings) using any of the usual string comparison operators eq, ne, lt, gt, etc., or perform bitwise string operations on them using |, &, etc.

In conjunction with the new $^V magic variable (which contains the perl version as a string), such literals can be used as a readable way to check if you're running a particular version of Perl:

    # this will parse in older versions of Perl also
    if ($^V and $^V gt v5.6.0) {
        # new features supported
    }

require and use also have some special magic to support such literals, but this particular usage should be avoided because it leads to misleading error messages under versions of Perl which don't support vector strings. Using a true version number will ensure correct behavior in all versions of Perl:

    require 5.006;    # run time check for v5.6
    use 5.006_001;    # compile time check for v5.6.1

Also, sprintf and printf support the Perl-specific format flag %v to print ordinals of characters in arbitrary strings:

    printf "v%vd", $^V;         # prints current version, such as "v5.5.650"
    printf "%*vX", ":", $addr;  # formats IPv6 address
    printf "%*vb", " ", $bits;  # displays bitstring

See "Scalar value constructors" in perldata for additional information.

p56-Improved Perl version numbering system

Beginning with Perl version 5.6.0, the version number convention has been changed to a "dotted integer" scheme that is more commonly found in open source projects.

Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc. The next development series following v5.6.0 will be numbered v5.7.x, beginning with v5.7.0, and the next major production release following v5.6.0 will be v5.8.0.

The English module now sets $PERL_VERSION to $^V (a string value) rather than $] (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)

The v1.2.3 syntax is also now legal in Perl. See "p56-Support for strings represented as a vector of ordinals" for more on that.

To cope with the new versioning system's use of at least three significant digits for each version component, the method used for incrementing the subversion number has also changed slightly. We assume that versions older than v5.6.0 have been incrementing the subversion component in multiples of 10. Versions after v5.6.0 will increment them by 1. Thus, using the new notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance version following v5.6.0 will be v5.6.1 (which should be read as being equivalent to a floating point value of 5.006_001 in the older format, stored in $]).

p56-New syntax for declaring subroutine attributes

Formerly, if you wanted to mark a subroutine as being a method call or as requiring an automatic lock() when it is entered, you had to declare that with a use attrs pragma in the body of the subroutine. That can now be accomplished with declaration syntax, like this:

    sub mymethod : locked method;
    ...
    sub mymethod : locked method {
        ...
    }

    sub othermethod :locked :method;
    ...
    sub othermethod :locked :method {
        ...
    }

(Note how only the first : is mandatory, and whitespace surrounding the : is optional.)

AutoSplit.pm and SelfLoader.pm have been updated to keep the attributes with the stubs they provide. See attributes.

p56-File and directory handles can be autovivified

Similar to how constructs such as $x->[0] autovivify a reference, handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(), socket(), and accept()) now autovivify a file or directory handle if the handle passed to them is an uninitialized scalar variable. This allows the constructs such as open(my $fh, ...) and open(local $fh,...) to be used to create filehandles that will conveniently be closed automatically when the scope ends, provided there are no other references to them. This largely eliminates the need for typeglobs when opening filehandles that must be passed around, as in the following example:

    sub myopen {
        open my $fh, "@_"
             or die "Can't open '@_': $!";
        return $fh;
    }

    {
        my $f = myopen(";
        # $f implicitly closed here
    }

p56-open() with more than two arguments

If open() is passed three arguments instead of two, the second argument is used as the mode and the third argument is taken to be the file name. This is primarily useful for protecting against unintended magic behavior of the traditional two-argument form. See "open" in perlfunc.

p56-64-bit support

Any platform that has 64-bit integers either

        (1) natively as longs or ints
        (2) via special compiler flags
        (3) using long long or int64_t

is able to use "quads" (64-bit integers) as follows:

Note that unless you have the case (a) you will have to configure and compile Perl using the -Duse64bitint Configure flag.

    NOTE: The Configure flags -Duselonglong and -Duse64bits have been
    deprecated.  Use -Duse64bitint instead.

There are actually two modes of 64-bitness: the first one is achieved using Configure -Duse64bitint and the second one using Configure -Duse64bitall. The difference is that the first one is minimal and the second one maximal. The first works in more places than the second.

The use64bitint does only as much as is required to get 64-bit integers into Perl (this may mean, for example, using "long longs") while your memory may still be limited to 2 gigabytes (because your pointers could still be 32-bit). Note that the name 64bitint does not imply that your C compiler will be using 64-bit ints (it might, but it doesn't have to): the use64bitint means that you will be able to have 64 bits wide scalar values.

The use64bitall goes all the way by attempting to switch also integers (if it can), longs (and pointers) to being 64-bit. This may create an even more binary incompatible Perl than -Duse64bitint: the resulting executable may not run at all in a 32-bit box, or you may have to reboot/reconfigure/rebuild your operating system to be 64-bit aware.

Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint nor -Duse64bitall.

Last but not least: note that due to Perl's habit of always using floating point numbers, the quads are still not true integers. When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned, -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they are silently promoted to floating point numbers, after which they will start losing precision (in their lower digits).

    NOTE: 64-bit support is still experimental on most platforms.
    Existing support only covers the LP64 data model.  In particular, the
    LLP64 data model is not yet supported.  64-bit libraries and system
    APIs on many platforms have not stabilized--your mileage may vary.

p56-Large file support

If you have filesystems that support "large files" (files larger than 2 gigabytes), you may now also be able to create and access them from Perl.

    NOTE: The default action is to enable large file support, if
    available on the platform.

If the large file support is on, and you have a Fcntl constant O_LARGEFILE, the O_LARGEFILE is automatically added to the flags of sysopen().

Beware that unless your filesystem also supports "sparse files" seeking to umpteen petabytes may be inadvisable.

Note that in addition to requiring a proper file system to do large files you may also need to adjust your per-process (or your per-system, or per-process-group, or per-user-group) maximum filesize limits before running Perl scripts that try to handle large files, especially if you intend to write such files.

Finally, in addition to your process/process group maximum filesize limits, you may have quota limits on your filesystems that stop you (your user id or your user group id) from using large files.

Adjusting your process/user/group/file system/operating system limits is outside the scope of Perl core language. For process limits, you may try increasing the limits using your shell's limits/limit/ulimit command before running Perl. The BSD::Resource extension (not included with the standard Perl distribution) may also be of use, it offers the getrlimit/setrlimit interface that can be used to adjust process resource usage limits, including the maximum filesize limit.

p56-Long doubles

In some systems you may be able to use long doubles to enhance the range and precision of your double precision floating point numbers (that is, Perl's numbers). Use Configure -Duselongdouble to enable this support (if it is available).

p56-"more bits"

You can "Configure -Dusemorebits" to turn on both the 64-bit support and the long double support.

p56-Enhanced support for sort() subroutines

Perl subroutines with a prototype of ($$), and XSUBs in general, can now be used as sort subroutines. In either case, the two elements to be compared are passed as normal parameters in @_. See "sort" in perlfunc.

For unprototyped sort subroutines, the historical behavior of passing the elements to be compared as the global variables $a and $b remains unchanged.

p56-sort $coderef @foo allowed

sort() did not accept a subroutine reference as the comparison function in earlier versions. This is now permitted.

p56-File globbing implemented internally

Perl now uses the File::Glob implementation of the glob() operator automatically. This avoids using an external csh process and the problems associated with it.

    NOTE: This is currently an experimental feature.  Interfaces and
    implementation are subject to change.

p56-Support for CHECK blocks

In addition to BEGIN, INIT, END, DESTROY and AUTOLOAD, subroutines named CHECK are now special. These are queued up during compilation and behave similar to END blocks, except they are called at the end of compilation rather than at the end of execution. They cannot be called directly.

p56-POSIX character class syntax [: :] supported

For example to match alphabetic characters use /[[:alpha:]]/. See perlre for details.

p56-Better pseudo-random number generator

In 5.005_0x and earlier, perl's rand() function used the C library rand(3) function. As of 5.005_52, Configure tests for drand48(), random(), and rand() (in that order) and picks the first one it finds.

These changes should result in better random numbers from rand().

p56-Improved qw// operator

The qw// operator is now evaluated at compile time into a true list instead of being replaced with a run time call to split(). This removes the confusing misbehaviour of qw// in scalar context, which had inherited that behaviour from split().

Thus:

    $foo = ($bar) = qw(a b c); print "$foo|$bar\n";

now correctly prints "3|a", instead of "2|a".

p56-Better worst-case behavior of hashes

Small changes in the hashing algorithm have been implemented in order to improve the distribution of lower order bits in the hashed value. This is expected to yield better performance on keys that are repeated sequences.

p56-pack() format 'Z' supported

The new format type 'Z' is useful for packing and unpacking null-terminated strings. See "pack" in perlfunc.

p56-pack() format modifier '!' supported

The new format type modifier '!' is useful for packing and unpacking native shorts, ints, and longs. See "pack" in perlfunc.

p56-pack() and unpack() support counted strings

The template character '/' can be used to specify a counted string type to be packed or unpacked. See "pack" in perlfunc.

p56-Comments in pack() templates

The '#' character in a template introduces a comment up to end of the line. This facilitates documentation of pack() templates.

p56-Weak references

In previous versions of Perl, you couldn't cache objects so as to allow them to be deleted if the last reference from outside the cache is deleted. The reference in the cache would hold a reference count on the object and the objects would never be destroyed.

Another familiar problem is with circular references. When an object references itself, its reference count would never go down to zero, and it would not get destroyed until the program is about to exit.

Weak references solve this by allowing you to "weaken" any reference, that is, make it not count towards the reference count. When the last non-weak reference to an object is deleted, the object is destroyed and all the weak references to the object are automatically undef-ed.

To use this feature, you need the Devel::WeakRef package from CPAN, which contains additional documentation.

    NOTE: This is an experimental feature.  Details are subject to change.  

p56-Binary numbers supported

Binary numbers are now supported as literals, in s?printf formats, and oct():

    $answer = 0b101010;
    printf "The answer is: %b\n", oct("0b101010");

p56-Lvalue subroutines

Subroutines can now return modifiable lvalues. See "Lvalue subroutines" in perlsub.

    NOTE: This is an experimental feature.  Details are subject to change.

p56-Some arrows may be omitted in calls through references

Perl now allows the arrow to be omitted in many constructs involving subroutine calls through references. For example, $foo[10]->('foo') may now be written $foo[10]('foo'). This is rather similar to how the arrow may be omitted from $foo[10]->{'foo'}. Note however, that the arrow is still required for foo(10)->('bar').

p56-Boolean assignment operators are legal lvalues

Constructs such as ($a ||= 2) += 1 are now allowed.

p56-exists() is supported on subroutine names

The exists() builtin now works on subroutine names. A subroutine is considered to exist if it has been declared (even if implicitly). See "exists" in perlfunc for examples.

p56-exists() and delete() are supported on array elements

The exists() and delete() builtins now work on simple arrays as well. The behavior is similar to that on hash elements.

exists() can be used to check whether an array element has been initialized. This avoids autovivifying array elements that don't exist. If the array is tied, the EXISTS() method in the corresponding tied package will be invoked.

delete() may be used to remove an element from the array and return it. The array element at that position returns to its uninitialized state, so that testing for the same element with exists() will return false. If the element happens to be the one at the end, the size of the array also shrinks up to the highest element that tests true for exists(), or 0 if none such is found. If the array is tied, the DELETE() method in the corresponding tied package will be invoked.

See "exists" in perlfunc and "delete" in perlfunc for examples.

p56-Pseudo-hashes work better

Dereferencing some types of reference values in a pseudo-hash, such as $ph->{foo}[1], was accidentally disallowed. This has been corrected.

When applied to a pseudo-hash element, exists() now reports whether the specified value exists, not merely if the key is valid.

delete() now works on pseudo-hashes. When given a pseudo-hash element or slice it deletes the values corresponding to the keys (but not the keys themselves). See "Pseudo-hashes: Using an array as a hash" in perlref.

Pseudo-hash slices with constant keys are now optimized to array lookups at compile-time.

List assignments to pseudo-hash slices are now supported.

The fields pragma now provides ways to create pseudo-hashes, via fields::new() and fields::phash(). See fields.

    NOTE: The pseudo-hash data type continues to be experimental.
    Limiting oneself to the interface elements provided by the
    fields pragma will provide protection from any future changes.

p56-Automatic flushing of output buffers

fork(), exec(), system(), qx//, and pipe open()s now flush buffers of all files opened for output when the operation was attempted. This mostly eliminates confusing buffering mishaps suffered by users unaware of how Perl internally handles I/O.

This is not supported on some platforms like Solaris where a suitably correct implementation of fflush(NULL) isn't available.

p56-Better diagnostics on meaningless filehandle operations

Constructs such as open() and close() are compile time errors. Attempting to read from filehandles that were opened only for writing will now produce warnings (just as writing to read-only filehandles does).

p56-Where possible, buffered data discarded from duped input filehandle

open(NEW, "<&OLD") now attempts to discard any data that was previously read and buffered in OLD before duping the handle. On platforms where doing this is allowed, the next read operation on NEW will return the same data as the corresponding operation on OLD. Formerly, it would have returned the data from the start of the following disk block instead.

p56-eof() has the same old magic as <>

eof() would return true if no attempt to read from <> had yet been made. eof() has been changed to have a little magic of its own, it now opens the <> files.

p56-binmode() can be used to set :crlf and :raw modes

binmode() now accepts a second argument that specifies a discipline for the handle in question. The two pseudo-disciplines ":raw" and ":crlf" are currently supported on DOS-derivative platforms. See "binmode" in perlfunc and open.

p56--T filetest recognizes UTF-8 encoded files as "text"

The algorithm used for the -T filetest has been enhanced to correctly identify UTF-8 content as "text".

p56-system(), backticks and pipe open now reflect exec() failure

On Unix and similar platforms, system(), qx() and open(FOO, "cmd |") etc., are implemented via fork() and exec(). When the underlying exec() fails, earlier versions did not report the error properly, since the exec() happened to be in a different process.

The child process now communicates with the parent about the error in launching the external command, which allows these constructs to return with their usual error value and set $!.

p56-Improved diagnostics

Line numbers are no longer suppressed (under most likely circumstances) during the global destruction phase.

Diagnostics emitted from code running in threads other than the main thread are now accompanied by the thread ID.

Embedded null characters in diagnostics now actually show up. They used to truncate the message in prior versions.

$foo::a and $foo::b are now exempt from "possible typo" warnings only if sort() is encountered in package foo.

Unrecognized alphabetic escapes encountered when parsing quote constructs now generate a warning, since they may take on new semantics in later versions of Perl.

Many diagnostics now report the internal operation in which the warning was provoked, like so:

    Use of uninitialized value in concatenation (.) at (eval 1) line 1.
    Use of uninitialized value in print at (eval 1) line 1.

Diagnostics that occur within eval may also report the file and line number where the eval is located, in addition to the eval sequence number and the line number within the evaluated text itself. For example:

    Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF

p56-Diagnostics follow STDERR

Diagnostic output now goes to whichever file the STDERR handle is pointing at, instead of always going to the underlying C runtime library's stderr.

p56-More consistent close-on-exec behavior

On systems that support a close-on-exec flag on filehandles, the flag is now set for any handles created by pipe(), socketpair(), socket(), and accept(), if that is warranted by the value of $^F that may be in effect. Earlier versions neglected to set the flag for handles created with these operators. See "pipe" in perlfunc, "socketpair" in perlfunc, "socket" in perlfunc, "accept" in perlfunc, and "$^F" in perlvar.

p56-syswrite() ease-of-use

The length argument of syswrite() has become optional.

p56-Better syntax checks on parenthesized unary operators

Expressions such as:

    print defined(&foo,&bar,&baz);
    print uc("foo","bar","baz");
    undef($foo,&bar);

used to be accidentally allowed in earlier versions, and produced unpredictable behaviour. Some produced ancillary warnings when used in this way; others silently did the wrong thing.

The parenthesized forms of most unary operators that expect a single argument now ensure that they are not called with more than one argument, making the cases shown above syntax errors. The usual behaviour of:

    print defined &foo, &bar, &baz;
    print uc "foo", "bar", "baz";
    undef $foo, &bar;

remains unchanged. See perlop.

p56-Bit operators support full native integer width

The bit operators (& | ^ ~ << >>) now operate on the full native integral width (the exact size of which is available in $Config{ivsize}). For example, if your platform is either natively 64-bit or if Perl has been configured to use 64-bit integers, these operations apply to 8 bytes (as opposed to 4 bytes on 32-bit platforms). For portability, be sure to mask off the excess bits in the result of unary ~, e.g., ~$x & 0xffffffff.

p56-Improved security features

More potentially unsafe operations taint their results for improved security.

The passwd and shell fields returned by the getpwent(), getpwnam(), and getpwuid() are now tainted, because the user can affect their own encrypted password and login shell.

The variable modified by shmread(), and messages returned by msgrcv() (and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted, because other untrusted processes can modify messages and shared memory segments for their own nefarious purposes.

p56-More functional bareword prototype (*)

Bareword prototypes have been rationalized to enable them to be used to override builtins that accept barewords and interpret them in a special way, such as require or do.

Arguments prototyped as * will now be visible within the subroutine as either a simple scalar or as a reference to a typeglob. See "Prototypes" in perlsub.

p56-require and do may be overridden

require and do 'file' operations may be overridden locally by importing subroutines of the same name into the current package (or globally by importing them into the CORE::GLOBAL:: namespace). Overriding require will also affect use, provided the override is visible at compile-time. See "Overriding Built-in Functions" in perlsub.

p56-$^X variables may now have names longer than one character

Formerly, $^X was synonymous with ${"\cX"}, but $^XY was a syntax error. Now variable names that begin with a control character may be arbitrarily long. However, for compatibility reasons, these variables must be written with explicit braces, as ${^XY} for example. ${^XYZ} is synonymous with ${"\cXYZ"}. Variable names with more than one control character, such as ${^XY^Z}, are illegal.

The old syntax has not changed. As before, `^X' may be either a literal control-X character or the two-character sequence `caret' plus `X'. When braces are omitted, the variable name stops after the control character. Thus "$^XYZ" continues to be synonymous with $^X . "YZ" as before.

As before, lexical variables may not have names beginning with control characters. As before, variables whose names begin with a control character are always forced to be in package `main'. All such variables are reserved for future extensions, except those that begin with ^_, which may be used by user programs and are guaranteed not to acquire special meaning in any future version of Perl.

p56-New variable $^C reflects -c switch

$^C has a boolean value that reflects whether perl is being run in compile-only mode (i.e. via the -c switch). Since BEGIN blocks are executed under such conditions, this variable enables perl code to determine whether actions that make sense only during normal running are warranted. See perlvar.

p56-New variable $^V contains Perl version as a string

$^V contains the Perl version number as a string composed of characters whose ordinals match the version numbers, i.e. v5.6.0. This may be used in string comparisons.

See Support for strings represented as a vector of ordinals for an example.

p56-Optional Y2K warnings

If Perl is built with the cpp macro PERL_Y2KWARN defined, it emits optional warnings when concatenating the number 19 with another number.

This behavior must be specifically enabled when running Configure. See INSTALL and README.Y2K.

p56-Arrays now always interpolate into double-quoted strings

In double-quoted strings, arrays now interpolate, no matter what. The behavior in earlier versions of perl 5 was that arrays would interpolate into strings if the array had been mentioned before the string was compiled, and otherwise Perl would raise a fatal compile-time error. In versions 5.000 through 5.003, the error was

        Literal @example now requires backslash

In versions 5.004_01 through 5.6.0, the error was

        In string, @example now must be written as \@example

The idea here was to get people into the habit of writing "fred\@example.com" when they wanted a literal @ sign, just as they have always written "Give me back my \$5" when they wanted a literal $ sign.

Starting with 5.6.1, when Perl now sees an @ sign in a double-quoted string, it always attempts to interpolate an array, regardless of whether or not the array has been used or declared already. The fatal error has been downgraded to an optional warning:

        Possible unintended interpolation of @example in string

This warns you that "fred@example.com" is going to turn into fred.com if you don't backslash the @. See http://perl.plover.com/at-error.html for more details about the history here.

p56-@- and @+ provide starting/ending offsets of regex matches

The new magic variables @- and @+ provide the starting and ending offsets, respectively, of $&, $1, $2, etc. See perlvar for details.

p56-Modules and Pragmata

p56-Modules

p56-attributes

While used internally by Perl as a pragma, this module also provides a way to fetch subroutine and variable attributes. See attributes.

p56-B

The Perl Compiler suite has been extensively reworked for this release. More of the standard Perl test suite passes when run under the Compiler, but there is still a significant way to go to achieve production quality compiled executables.

    NOTE: The Compiler suite remains highly experimental.  The
    generated code may not be correct, even when it manages to execute
    without errors.
p56-Benchmark

Overall, Benchmark results exhibit lower average error and better timing accuracy.

You can now run tests for n seconds instead of guessing the right number of tests to run: e.g., timethese(-5, ...) will run each code for at least 5 CPU seconds. Zero as the "number of repetitions" means "for at least 3 CPU seconds". The output format has also changed. For example:

   use Benchmark;$x=3;timethese(-5,{a=>sub{$x*$x},b=>sub{$x**2}})

will now output something like this:

   Benchmark: running a, b, each for at least 5 CPU seconds...
            a:  5 wallclock secs ( 5.77 usr +  0.00 sys =  5.77 CPU) @ 200551.91/s (n=1156516)
            b:  4 wallclock secs ( 5.00 usr +  0.02 sys =  5.02 CPU) @ 159605.18/s (n=800686)

New features: "each for at least N CPU seconds...", "wallclock secs", and the "@ operations/CPU second (n=operations)".

timethese() now returns a reference to a hash of Benchmark objects containing the test results, keyed on the names of the tests.

timethis() now returns the iterations field in the Benchmark result object instead of 0.

timethese(), timethis(), and the new cmpthese() (see below) can also take a format specifier of 'none' to suppress output.

A new function countit() is just like timeit() except that it takes a TIME instead of a COUNT.

A new function cmpthese() prints a chart comparing the results of each test returned from a timethese() call. For each possible pair of tests, the percentage speed difference (iters/sec or seconds/iter) is shown.

For other details, see Benchmark.

p56-ByteLoader

The ByteLoader is a dedicated extension to generate and run Perl bytecode. See ByteLoader.

p56-constant

References can now be used.

The new version also allows a leading underscore in constant names, but disallows a double leading underscore (as in "__LINE__"). Some other names are disallowed or warned against, including BEGIN, END, etc. Some names which were forced into main:: used to fail silently in some cases; now they're fatal (outside of main::) and an optional warning (inside of main::). The ability to detect whether a constant had been set with a given name has been added.

See constant.

p56-charnames

This pragma implements the \N string escape. See charnames.

p56-Data::Dumper

A Maxdepth setting can be specified to avoid venturing too deeply into deep data structures. See Data::Dumper.

The XSUB implementation of Dump() is now automatically called if the Useqq setting is not in use.

Dumping qr// objects works correctly.

p56-DB

DB is an experimental module that exposes a clean abstraction to Perl's debugging API.

p56-DB_File

DB_File can now be built with Berkeley DB versions 1, 2 or 3. See ext/DB_File/Changes.

p56-Devel::DProf

Devel::DProf, a Perl source code profiler has been added. See Devel::DProf and dprofpp.

p56-Devel::Peek

The Devel::Peek module provides access to the internal representation of Perl variables and data. It is a data debugging tool for the XS programmer.

p56-Dumpvalue

The Dumpvalue module provides screen dumps of Perl data.

p56-DynaLoader

DynaLoader now supports a dl_unload_file() function on platforms that support unloading shared objects using dlclose().

Perl can also optionally arrange to unload all extension shared objects loaded by Perl. To enable this, build Perl with the Configure option -Accflags=-DDL_UNLOAD_ALL_AT_EXIT. (This maybe useful if you are using Apache with mod_perl.)

p56-English

$PERL_VERSION now stands for $^V (a string value) rather than for $] (a numeric value).

p56-Env

Env now supports accessing environment variables like PATH as array variables.

p56-Fcntl

More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for large file (more than 4GB) access (NOTE: the O_LARGEFILE is automatically added to sysopen() flags if large file support has been configured, as is the default), Free/Net/OpenBSD locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of O_RDONLY, O_WRONLY, and O_RDWR. The seek()/sysseek() constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the :seek tag. The chmod()/stat() S_IF* constants and S_IS* functions are available via the :mode tag.

p56-File::Compare

A compare_text() function has been added, which allows custom comparison functions. See File::Compare.

p56-File::Find

File::Find now works correctly when the wanted() function is either autoloaded or is a symbolic reference.

A bug that caused File::Find to lose track of the working directory when pruning top-level directories has been fixed.

File::Find now also supports several other options to control its behavior. It can follow symbolic links if the follow option is specified. Enabling the no_chdir option will make File::Find skip changing the current directory when walking directories. The untaint flag can be useful when running with taint checks enabled.

See File::Find.

p56-File::Glob

This extension implements BSD-style file globbing. By default, it will also be used for the internal implementation of the glob() operator. See File::Glob.

p56-File::Spec

New methods have been added to the File::Spec module: devnull() returns the name of the null device (/dev/null on Unix) and tmpdir() the name of the temp directory (normally /tmp on Unix). There are now also methods to convert between absolute and relative filenames: abs2rel() and rel2abs(). For compatibility with operating systems that specify volume names in file paths, the splitpath(), splitdir(), and catdir() methods have been added.

p56-File::Spec::Functions

The new File::Spec::Functions modules provides a function interface to the File::Spec module. Allows shorthand

    $fullname = catfile($dir1, $dir2, $file);

instead of

    $fullname = File::Spec->catfile($dir1, $dir2, $file);
p56-Getopt::Long

Getopt::Long licensing has changed to allow the Perl Artistic License as well as the GPL. It used to be GPL only, which got in the way of non-GPL applications that wanted to use Getopt::Long.

Getopt::Long encourages the use of Pod::Usage to produce help messages. For example:

    use Getopt::Long;
    use Pod::Usage;
    my $man = 0;
    my $help = 0;
    GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
    pod2usage(1) if $help;
    pod2usage(-exitstatus => 0, -verbose => 2) if $man;

    __END__

    =head1 NAME

    sample - Using Getopt::Long and Pod::Usage

    =head1 SYNOPSIS

    sample [options] [file ...]

     Options:
       -help            brief help message
       -man             full documentation

    =head1 OPTIONS

    =over 8

    =item B<-help>

    Print a brief help message and exits.

    =item B<-man>

    Prints the manual page and exits.

    =back

    =head1 DESCRIPTION

    B will read the given input file(s) and do something
    useful with the contents thereof.

    =cut

See Pod::Usage for details.

A bug that prevented the non-option call-back <> from being specified as the first argument has been fixed.

To specify the characters < and > as option starters, use ><. Note, however, that changing option starters is strongly deprecated.

p56-IO

write() and syswrite() will now accept a single-argument form of the call, for consistency with Perl's syswrite().

You can now create a TCP-based IO::Socket::INET without forcing a connect attempt. This allows you to configure its options (like making it non-blocking) and then call connect() manually.

A bug that prevented the IO::Socket::protocol() accessor from ever returning the correct value has been corrected.

IO::Socket::connect now uses non-blocking IO instead of alarm() to do connect timeouts.

IO::Socket::accept now uses select() instead of alarm() for doing timeouts.

IO::Socket::INET->new now sets $! correctly on failure. $@ is still set for backwards compatibility.

p56-JPL

Java Perl Lingo is now distributed with Perl. See jpl/README for more information.

p56-lib

use lib now weeds out any trailing duplicate entries. no lib removes all named entries.

p56-Math::BigInt

The bitwise operations <<, >>, &, |, and ~ are now supported on bigints.

p56-Math::Complex

The accessor methods Re, Im, arg, abs, rho, and theta can now also act as mutators (accessor $z->Re(), mutator $z->Re(3)).

The class method display_format and the corresponding object method display_format, in addition to accepting just one argument, now can also accept a parameter hash. Recognized keys of a parameter hash are "style", which corresponds to the old one parameter case, and two new parameters: "format", which is a printf()-style format string (defaults usually to "%.15g", you can revert to the default by setting the format string to undef) used for both parts of a complex number, and "polar_pretty_print" (defaults to true), which controls whether an attempt is made to try to recognize small multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a polar complex number.

The potentially disruptive change is that in list context both methods now return the parameter hash, instead of only the value of the "style" parameter.

p56-Math::Trig

A little bit of radial trigonometry (cylindrical and spherical), radial coordinate conversions, and the great circle distance were added.

p56-Pod::Parser, Pod::InputObjects

Pod::Parser is a base class for parsing and selecting sections of pod documentation from an input stream. This module takes care of identifying pod paragraphs and commands in the input and hands off the parsed paragraphs and commands to user-defined methods which are free to interpret or translate them as they see fit.

Pod::InputObjects defines some input objects needed by Pod::Parser, and for advanced users of Pod::Parser that need more about a command besides its name and text.

As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned "base parser code" recommended for use by all pod2xxx translators. Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already underway. For any questions or comments about pod parsing and translating issues and utilities, please use the pod-people@perl.org mailing list.

For further information, please see Pod::Parser and Pod::InputObjects.

p56-Pod::Checker, podchecker

This utility checks pod files for correct syntax, according to perlpod. Obvious errors are flagged as such, while warnings are printed for mistakes that can be handled gracefully. The checklist is not complete yet. See Pod::Checker.

p56-Pod::ParseUtils, Pod::Find

These modules provide a set of gizmos that are useful mainly for pod translators. Pod::Find traverses directory structures and returns found pod files, along with their canonical names (like File::Spec::Unix). Pod::ParseUtils contains Pod::List (useful for storing pod list information), Pod::Hyperlink (for parsing the contents of L<> sequences) and Pod::Cache (for caching information about pod files, e.g., link nodes).

p56-Pod::Select, podselect

Pod::Select is a subclass of Pod::Parser which provides a function named "podselect()" to filter out user-specified sections of raw pod documentation from an input stream. podselect is a script that provides access to Pod::Select from other scripts to be used as a filter. See Pod::Select.

p56-Pod::Usage, pod2usage

Pod::Usage provides the function "pod2usage()" to print usage messages for a Perl script based on its embedded pod documentation. The pod2usage() function is generally useful to all script authors since it lets them write and maintain a single source (the pods) for documentation, thus removing the need to create and maintain redundant usage message text consisting of information already in the pods.

There is also a pod2usage script which can be used from other kinds of scripts to print usage messages from pods (even for non-Perl scripts with pods embedded in comments).

For details and examples, please see Pod::Usage.

p56-Pod::Text and Pod::Man

Pod::Text has been rewritten to use Pod::Parser. While pod2text() is still available for backwards compatibility, the module now has a new preferred interface. See Pod::Text for the details. The new Pod::Text module is easily subclassed for tweaks to the output, and two such subclasses (Pod::Text::Termcap for man-page-style bold and underlining using termcap information, and Pod::Text::Color for markup with ANSI color sequences) are now standard.

pod2man has been turned into a module, Pod::Man, which also uses Pod::Parser. In the process, several outstanding bugs related to quotes in section headers, quoting of code escapes, and nested lists have been fixed. pod2man is now a wrapper script around this module.

p56-SDBM_File

An EXISTS method has been added to this module (and sdbm_exists() has been added to the underlying sdbm library), so one can now call exists on an SDBM_File tied hash and get the correct result, rather than a runtime error.

A bug that may have caused data loss when more than one disk block happens to be read from the database in a single FETCH() has been fixed.

p56-Sys::Syslog

Sys::Syslog now uses XSUBs to access facilities from syslog.h so it no longer requires syslog.ph to exist.

p56-Sys::Hostname

Sys::Hostname now uses XSUBs to call the C library's gethostname() or uname() if they exist.

p56-Term::ANSIColor

Term::ANSIColor is a very simple module to provide easy and readable access to the ANSI color and highlighting escape sequences, supported by most ANSI terminal emulators. It is now included standard.

p56-Time::Local

The timelocal() and timegm() functions used to silently return bogus results when the date fell outside the machine's integer range. They now consistently croak() if the date falls in an unsupported range.

p56-Win32

The error return value in list context has been changed for all functions that return a list of values. Previously these functions returned a list with a single element undef if an error occurred. Now these functions return the empty list in these situations. This applies to the following functions:

    Win32::FsType
    Win32::GetOSVersion

The remaining functions are unchanged and continue to return undef on error even in list context.

The Win32::SetLastError(ERROR) function has been added as a complement to the Win32::GetLastError() function.

The new Win32::GetFullPathName(FILENAME) returns the full absolute pathname for FILENAME in scalar context. In list context it returns a two-element list containing the fully qualified directory name and the filename. See Win32.

p56-XSLoader

The XSLoader extension is a simpler alternative to DynaLoader. See XSLoader.

p56-DBM Filters

A new feature called "DBM Filters" has been added to all the DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File. DBM Filters add four new methods to each DBM module:

    filter_store_key
    filter_store_value
    filter_fetch_key
    filter_fetch_value

These can be used to filter key-value pairs before the pairs are written to the database or just after they are read from the database. See perldbmfilter for further information.

p56-Pragmata

use attrs is now obsolete, and is only provided for backward-compatibility. It's been replaced by the sub : attributes syntax. See "Subroutine Attributes" in perlsub and attributes.

Lexical warnings pragma, use warnings;, to control optional warnings. See perllexwarn.

use filetest to control the behaviour of filetests (-r -w ...). Currently only one subpragma implemented, "use filetest 'access';", that uses access(2) or equivalent to check permissions instead of using stat(2) as usual. This matters in filesystems where there are ACLs (access control lists): the stat(2) might lie, but access(2) knows better.

The open pragma can be used to specify default disciplines for handle constructors (e.g. open()) and for qx//. The two pseudo-disciplines :raw and :crlf are currently supported on DOS-derivative platforms (i.e. where binmode is not a no-op). See also "p56-binmode() can be used to set :crlf and :raw modes".

p56-Utility Changes

p56-dprofpp

dprofpp is used to display profile data generated using Devel::DProf. See dprofpp.

p56-find2perl

The find2perl utility now uses the enhanced features of the File::Find module. The -depth and -follow options are supported. Pod documentation is also included in the script.

p56-h2xs

The h2xs tool can now work in conjunction with C::Scan (available from CPAN) to automatically parse real-life header files. The -M, -a, -k, and -o options are new.

p56-perlcc

perlcc now supports the C and Bytecode backends. By default, it generates output from the simple C backend rather than the optimized C backend.

Support for non-Unix platforms has been improved.

p56-perldoc

perldoc has been reworked to avoid possible security holes. It will not by default let itself be run as the superuser, but you may still use the -U switch to try to make it drop privileges first.

p56-The Perl Debugger

Many bug fixes and enhancements were added to perl5db.pl, the Perl debugger. The help documentation was rearranged. New commands include < ?, > ?, and { ? to list out current actions, man docpage to run your doc viewer on some perl docset, and support for quoted options. The help information was rearranged, and should be viewable once again if you're using less as your pager. A serious security hole was plugged--you should immediately remove all older versions of the Perl debugger as installed in previous releases, all the way back to perl3, from your system to avoid being bitten by this.

p56-Improved Documentation

Many of the platform-specific README files are now part of the perl installation. See perl for the complete list.

p56-perlapi.pod

The official list of public Perl API functions.

p56-perlboot.pod

A tutorial for beginners on object-oriented Perl.

p56-perlcompile.pod

An introduction to using the Perl Compiler suite.

p56-perldbmfilter.pod

A howto document on using the DBM filter facility.

p56-perldebug.pod

All material unrelated to running the Perl debugger, plus all low-level guts-like details that risked crushing the casual user of the debugger, have been relocated from the old manpage to the next entry below.

p56-perldebguts.pod

This new manpage contains excessively low-level material not related to the Perl debugger, but slightly related to debugging Perl itself. It also contains some arcane internal details of how the debugging process works that may only be of interest to developers of Perl debuggers.

p56-perlfork.pod

Notes on the fork() emulation currently available for the Windows platform.

p56-perlfilter.pod

An introduction to writing Perl source filters.

p56-perlhack.pod

Some guidelines for hacking the Perl source code.

p56-perlintern.pod

A list of internal functions in the Perl source code. (List is currently empty.)

p56-perllexwarn.pod

Introduction and reference information about lexically scoped warning categories.

p56-perlnumber.pod

Detailed information about numbers as they are represented in Perl.

p56-perlopentut.pod

A tutorial on using open() effectively.

p56-perlreftut.pod

A tutorial that introduces the essentials of references.

p56-perltootc.pod

A tutorial on managing class data for object modules.

p56-perltodo.pod

Discussion of the most often wanted features that may someday be supported in Perl.

p56-perlunicode.pod

An introduction to Unicode support features in Perl.

p56-Performance enhancements

p56-Simple sort() using { $a <=> $b } and the like are optimized

Many common sort() operations using a simple inlined block are now optimized for faster performance.

p56-Optimized assignments to lexical variables

Certain operations in the RHS of assignment statements have been optimized to directly set the lexical variable on the LHS, eliminating redundant copying overheads.

p56-Faster subroutine calls

Minor changes in how subroutine calls are handled internally provide marginal improvements in performance.

p56-delete(), each(), values() and hash iteration are faster

The hash values returned by delete(), each(), values() and hashes in a list context are the actual values in the hash, instead of copies. This results in significantly better performance, because it eliminates needless copying in most situations.

p56-Installation and Configuration Improvements

p56--Dusethreads means something different

The -Dusethreads flag now enables the experimental interpreter-based thread support by default. To get the flavor of experimental threads that was in 5.005 instead, you need to run Configure with "-Dusethreads -Duse5005threads".

As of v5.6.0, interpreter-threads support is still lacking a way to create new threads from Perl (i.e., use Thread; will not work with interpreter threads). use Thread; continues to be available when you specify the -Duse5005threads option to Configure, bugs and all.

    NOTE: Support for threads continues to be an experimental feature.
    Interfaces and implementation are subject to sudden and drastic changes.

p56-New Configure flags

The following new flags may be enabled on the Configure command line by running Configure with -Dflag.

    usemultiplicity
    usethreads useithreads      (new interpreter threads: no Perl API yet)
    usethreads use5005threads   (threads as they were in 5.005)

    use64bitint                 (equal to now deprecated 'use64bits')
    use64bitall

    uselongdouble
    usemorebits
    uselargefiles
    usesocks                    (only SOCKS v5 supported)

p56-Threadedness and 64-bitness now more daring

The Configure options enabling the use of threads and the use of 64-bitness are now more daring in the sense that they no more have an explicit list of operating systems of known threads/64-bit capabilities. In other words: if your operating system has the necessary APIs and datatypes, you should be able just to go ahead and use them, for threads by Configure -Dusethreads, and for 64 bits either explicitly by Configure -Duse64bitint or implicitly if your system has 64-bit wide datatypes. See also "p56-64-bit support".

p56-Long Doubles

Some platforms have "long doubles", floating point numbers of even larger range than ordinary "doubles". To enable using long doubles for Perl's scalars, use -Duselongdouble.

p56--Dusemorebits

You can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits. See also "p56-64-bit support".

p56--Duselargefiles

Some platforms support system APIs that are capable of handling large files (typically, files larger than two gigabytes). Perl will try to use these APIs if you ask for -Duselargefiles.

See "p56-Large file support" for more information.

p56-installusrbinperl

You can use "Configure -Uinstallusrbinperl" which causes installperl to skip installing perl also as /usr/bin/perl. This is useful if you prefer not to modify /usr/bin for some reason or another but harmful because many scripts assume to find Perl in /usr/bin/perl.

p56-SOCKS support

You can use "Configure -Dusesocks" which causes Perl to probe for the SOCKS proxy protocol library (v5, not v4). For more information on SOCKS, see:

    http://www.socks.nec.com/

p56--A flag

You can "post-edit" the Configure variables using the Configure -A switch. The editing happens immediately after the platform specific hints files have been processed but before the actual configuration process starts. Run Configure -h to find out the full -A syntax.

p56-Enhanced Installation Directories

The installation structure has been enriched to improve the support for maintaining multiple versions of perl, to provide locations for vendor-supplied modules, scripts, and manpages, and to ease maintenance of locally-added modules, scripts, and manpages. See the section on Installation Directories in the INSTALL file for complete details. For most users building and installing from source, the defaults should be fine.

If you previously used Configure -Dsitelib or -Dsitearch to set special values for library directories, you might wish to consider using the new -Dsiteprefix setting instead. Also, if you wish to re-use a config.sh file from an earlier version of perl, you should be sure to check that Configure makes sensible choices for the new directories. See INSTALL for complete details.

p56-Platform specific changes

p56-Supported platforms

p56-DOS

p56-OS390 (OpenEdition MVS)

Support for this EBCDIC platform has not been renewed in this release. There are difficulties in reconciling Perl's standardization on UTF-8 as its internal representation for characters with the EBCDIC character set, because the two are incompatible.

It is unclear whether future versions will renew support for this platform, but the possibility exists.

p56-VMS

Numerous revisions and extensions to configuration, build, testing, and installation process to accommodate core changes and VMS-specific options.

Expand %ENV-handling code to allow runtime mapping to logical names, CLI symbols, and CRTL environ array.

Extension of subprocess invocation code to accept filespecs as command "verbs".

Add to Perl command line processing the ability to use default file types and to recognize Unix-style 2>&1.

Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.

Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly.

Barewords at start of Unix-syntax paths may be treated as text rather than only as logical names.

Optional secure translation of several logical names used internally by Perl.

Miscellaneous bugfixing and porting of new core code to VMS.

Thanks are gladly extended to the many people who have contributed VMS patches, testing, and ideas.

p56-Win32

Perl can now emulate fork() internally, using multiple interpreters running in different concurrent threads. This support must be enabled at build time. See perlfork for detailed information.

When given a pathname that consists only of a drivename, such as A:, opendir() and stat() now use the current working directory for the drive rather than the drive root.

The builtin XSUB functions in the Win32:: namespace are documented. See Win32.

$^X now contains the full path name of the running executable.

A Win32::GetLongPathName() function is provided to complement Win32::GetFullPathName() and Win32::GetShortPathName(). See Win32.

POSIX::uname() is supported.

system(1,...) now returns true process IDs rather than process handles. kill() accepts any real process id, rather than strictly return values from system(1,...).

For better compatibility with Unix, kill(0, $pid) can now be used to test whether a process exists.

The Shell module is supported.

Better support for building Perl under command.com in Windows 95 has been added.

Scripts are read in binary mode by default to allow ByteLoader (and the filter mechanism in general) to work properly. For compatibility, the DATA filehandle will be set to text mode if a carriage return is detected at the end of the line containing the __END__ or __DATA__ token; if not, the DATA filehandle will be left open in binary mode. Earlier versions always opened the DATA filehandle in text mode.

The glob() operator is implemented via the File::Glob extension, which supports glob syntax of the C shell. This increases the flexibility of the glob() operator, but there may be compatibility issues for programs that relied on the older globbing syntax. If you want to preserve compatibility with the older syntax, you might want to run perl with -MFile::DosGlob. For details and compatibility information, see File::Glob.

p56-Significant bug fixes

p56- on empty files

With $/ set to undef, "slurping" an empty file returns a string of zero length (instead of undef, as it used to) the first time the HANDLE is read after $/ is set to undef. Further reads yield undef.

This means that the following will append "foo" to an empty file (it used to do nothing):

    perl -0777 -pi -e 's/^/foo/' empty_file

The behaviour of:

    perl -pi -e 's/^/foo/' empty_file

is unchanged (it continues to leave the file empty).

p56-eval '...' improvements

Line numbers (as reflected by caller() and most diagnostics) within eval '...' were often incorrect where here documents were involved. This has been corrected.

Lexical lookups for variables appearing in eval '...' within functions that were themselves called within an eval '...' were searching the wrong place for lexicals. The lexical search now correctly ends at the subroutine's block boundary.

The use of return within eval {...} caused $@ not to be reset correctly when no exception occurred within the eval. This has been fixed.

Parsing of here documents used to be flawed when they appeared as the replacement expression in eval 's/.../.../e'. This has been fixed.

p56-All compilation errors are true errors

Some "errors" encountered at compile time were by necessity generated as warnings followed by eventual termination of the program. This enabled more such errors to be reported in a single run, rather than causing a hard stop at the first error that was encountered.

The mechanism for reporting such errors has been reimplemented to queue compile-time errors and report them at the end of the compilation as true errors rather than as warnings. This fixes cases where error messages leaked through in the form of warnings when code was compiled at run time using eval STRING, and also allows such errors to be reliably trapped using eval "...".

p56-Implicitly closed filehandles are safer

Sometimes implicitly closed filehandles (as when they are localized, and Perl automatically closes them on exiting the scope) could inadvertently set $? or $!. This has been corrected.

p56-Behavior of list slices is more consistent

When taking a slice of a literal list (as opposed to a slice of an array or hash), Perl used to return an empty list if the result happened to be composed of all undef values.

The new behavior is to produce an empty list if (and only if) the original list was empty. Consider the following example:

    @a = (1,undef,undef,2)[2,1,2];

The old behavior would have resulted in @a having no elements. The new behavior ensures it has three undefined elements.

Note in particular that the behavior of slices of the following cases remains unchanged:

    @a = ()[1,2];
    @a = (getpwent)[7,0];
    @a = (anything_returning_empty_list())[2,1,2];
    @a = @b[2,1,2];
    @a = @c{'a','b','c'};

See perldata.

p56-(\$) prototype and $foo{a}

A scalar reference prototype now correctly allows a hash or array element in that slot.

p56-goto &sub and AUTOLOAD

The goto &sub construct works correctly when &sub happens to be autoloaded.

p56--bareword allowed under use integer

The autoquoting of barewords preceded by - did not work in prior versions when the integer pragma was enabled. This has been fixed.

p56-Failures in DESTROY()

When code in a destructor threw an exception, it went unnoticed in earlier versions of Perl, unless someone happened to be looking in $@ just after the point the destructor happened to run. Such failures are now visible as warnings when warnings are enabled.

p56-Locale bugs fixed

printf() and sprintf() previously reset the numeric locale back to the default "C" locale. This has been fixed.

Numbers formatted according to the local numeric locale (such as using a decimal comma instead of a decimal dot) caused "isn't numeric" warnings, even while the operations accessing those numbers produced correct results. These warnings have been discontinued.

p56-Memory leaks

The eval 'return sub {...}' construct could sometimes leak memory. This has been fixed.

Operations that aren't filehandle constructors used to leak memory when used on invalid filehandles. This has been fixed.

Constructs that modified @_ could fail to deallocate values in @_ and thus leak memory. This has been corrected.

p56-Spurious subroutine stubs after failed subroutine calls

Perl could sometimes create empty subroutine stubs when a subroutine was not found in the package. Such cases stopped later method lookups from progressing into base packages. This has been corrected.

p56-Taint failures under -U

When running in unsafe mode, taint violations could sometimes cause silent failures. This has been fixed.

p56-END blocks and the -c switch

Prior versions used to run BEGIN and END blocks when Perl was run in compile-only mode. Since this is typically not the expected behavior, END blocks are not executed anymore when the -c switch is used, or if compilation fails.

See "p56-Support for CHECK blocks" for how to run things when the compile phase ends.

p56-Potential to leak DATA filehandles

Using the __DATA__ token creates an implicit filehandle to the file that contains the token. It is the program's responsibility to close it when it is done reading from it.

This caveat is now better explained in the documentation. See perldata.

p56-New or Changed Diagnostics

p56-"%s" variable %s masks earlier declaration in same %s

(W misc) A "my" or "our" variable has been redeclared in the current scope or statement, effectively eliminating all access to the previous instance. This is almost always a typographical error. Note that the earlier variable will still exist until the end of the scope or until all closure referents to it are destroyed.

p56-"my sub" not yet implemented

(F) Lexically scoped subroutines are not yet implemented. Don't try that yet.

p56-"our" variable %s redeclared

(W misc) You seem to have already declared the same global once before in the current lexical scope.

p56-'!' allowed only after types %s

(F) The '!' is allowed in pack() and unpack() only after certain types. See "pack" in perlfunc.

p56-/ cannot take a count

(F) You had an unpack template indicating a counted-length string, but you have also specified an explicit size for the string. See "pack" in perlfunc.

p56-/ must be followed by a, A or Z

(F) You had an unpack template indicating a counted-length string, which must be followed by one of the letters a, A or Z to indicate what sort of string is to be unpacked. See "pack" in perlfunc.

p56-/ must be followed by a*, A* or Z*

(F) You had a pack template indicating a counted-length string, Currently the only things that can have their length counted are a*, A* or Z*. See "pack" in perlfunc.

p56-/ must follow a numeric type

(F) You had an unpack template that contained a '#', but this did not follow some numeric unpack specification. See "pack" in perlfunc.

p56-/%s/: Unrecognized escape \\%c passed through

(W regexp) You used a backslash-character combination which is not recognized by Perl. This combination appears in an interpolated variable or a '-delimited regular expression. The character was understood literally.

p56-/%s/: Unrecognized escape \\%c in character class passed through

(W regexp) You used a backslash-character combination which is not recognized by Perl inside character classes. The character was understood literally.

p56-/%s/ should probably be written as "%s"

(W syntax) You have used a pattern where Perl expected to find a string, as in the first argument to join. Perl will treat the true or false result of matching the pattern against $_ as the string, which is probably not what you had in mind.

p56-%s() called too early to check prototype

(W prototype) You've called a function that has a prototype before the parser saw a definition or declaration for it, and Perl could not check that the call conforms to the prototype. You need to either add an early prototype declaration for the subroutine in question, or move the subroutine definition ahead of the call to get proper prototype checking. Alternatively, if you are certain that you're calling the function correctly, you may put an ampersand before the name to avoid the warning. See perlsub.

p56-%s argument is not a HASH or ARRAY element

(F) The argument to exists() must be a hash or array element, such as:

    $foo{$bar}
    $ref->{"susie"}[12]
p56-%s argument is not a HASH or ARRAY element or slice

(F) The argument to delete() must be either a hash or array element, such as:

    $foo{$bar}
    $ref->{"susie"}[12]

or a hash or array slice, such as:

    @foo[$bar, $baz, $xyzzy]
    @{$ref->[12]}{"susie", "queue"}
p56-%s argument is not a subroutine name

(F) The argument to exists() for exists &sub must be a subroutine name, and not a subroutine call. exists &sub() will generate this error.

p56-%s package attribute may clash with future reserved word: %s

(W reserved) A lowercase attribute name was used that had a package-specific handler. That name might have a meaning to Perl itself some day, even though it doesn't yet. Perhaps you should use a mixed-case attribute name, instead. See attributes.

p56-(in cleanup) %s

(W misc) This prefix usually indicates that a DESTROY() method raised the indicated exception. Since destructors are usually called by the system at arbitrary points during execution, and often a vast number of times, the warning is issued only once for any number of failures that would otherwise result in the same message being repeated.

Failure of user callbacks dispatched using the G_KEEPERR flag could also result in this warning. See "G_KEEPERR" in perlcall.

p56-<> should be quotes

(F) You wrote require when you should have written require 'file'.

p56-Attempt to join self

(F) You tried to join a thread from within itself, which is an impossible task. You may be joining the wrong thread, or you may need to move the join() to some other thread.

p56-Bad evalled substitution pattern

(F) You've used the /e switch to evaluate the replacement for a substitution, but perl found a syntax error in the code to evaluate, most likely an unexpected right brace '}'.

p56-Bad realloc() ignored

(S) An internal routine called realloc() on something that had never been malloc()ed in the first place. Mandatory, but can be disabled by setting environment variable PERL_BADFREE to 1.

p56-Bareword found in conditional

(W bareword) The compiler found a bareword where it expected a conditional, which often indicates that an || or && was parsed as part of the last argument of the previous construct, for example:

    open FOO || die;

It may also indicate a misspelled constant that has been interpreted as a bareword:

    use constant TYPO => 1;
    if (TYOP) { print "foo" }

The strict pragma is useful in avoiding such errors.

p56-Binary number > 0b11111111111111111111111111111111 non-portable

(W portable) The binary number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

p56-Bit vector size > 32 non-portable

(W portable) Using bit vector sizes larger than 32 is non-portable.

p56-Buffer overflow in prime_env_iter: %s

(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over %ENV, it encountered a logical name or symbol definition which was too long, so it was truncated to the string shown.

p56-Can't check filesystem of script "%s"

(P) For some reason you can't check the filesystem of the script for nosuid.

p56-Can't declare class for non-scalar %s in "%s"

(S) Currently, only scalar variables can declared with a specific class qualifier in a "my" or "our" declaration. The semantics may be extended for other types of variables in future.

p56-Can't declare %s in "%s"

(F) Only scalar, array, and hash variables may be declared as "my" or "our" variables. They must have ordinary identifiers as names.

p56-Can't ignore signal CHLD, forcing to default

(W signal) Perl has detected that it is being run with the SIGCHLD signal (sometimes known as SIGCLD) disabled. Since disabling this signal will interfere with proper determination of exit status of child processes, Perl has reset the signal to its default value. This situation typically indicates that the parent program under which Perl may be running (e.g., cron) is being very careless.

p56-Can't modify non-lvalue subroutine call

(F) Subroutines meant to be used in lvalue context should be declared as such, see "Lvalue subroutines" in perlsub.

p56-Can't read CRTL environ

(S) A warning peculiar to VMS. Perl tried to read an element of %ENV from the CRTL's internal environment array and discovered the array was missing. You need to figure out where your CRTL misplaced its environ or define PERL_ENV_TABLES (see perlvms) so that environ is not searched.

p56-Can't remove %s: %s, skipping file

(S) You requested an inplace edit without creating a backup file. Perl was unable to remove the original file to replace it with the modified file. The file was left unmodified.

p56-Can't return %s from lvalue subroutine

(F) Perl detected an attempt to return illegal lvalues (such as temporary or readonly values) from a subroutine used as an lvalue. This is not allowed.

p56-Can't weaken a nonreference

(F) You attempted to weaken something that was not a reference. Only references can be weakened.

p56-Character class [:%s:] unknown

(F) The class in the character class [: :] syntax is unknown. See perlre.

p56-Character class syntax [%s] belongs inside character classes

(W unsafe) The character class constructs [: :], [= =], and [. .] go inside character classes, the [] are part of the construct, for example: /[012[:alpha:]345]/. Note that [= =] and [. .] are not currently implemented; they are simply placeholders for future extensions.

p56-Constant is not %s reference

(F) A constant value (perhaps declared using the use constant pragma) is being dereferenced, but it amounts to the wrong type of reference. The message indicates the type of reference that was expected. This usually indicates a syntax error in dereferencing the constant value. See "Constant Functions" in perlsub and constant.

p56-constant(%s): %s

(F) The parser found inconsistencies either while attempting to define an overloaded constant, or when trying to find the character name specified in the \N{...} escape. Perhaps you forgot to load the corresponding overload or charnames pragma? See charnames and overload.

p56-CORE::%s is not a keyword

(F) The CORE:: namespace is reserved for Perl keywords.

p56-defined(@array) is deprecated

(D) defined() is not usually useful on arrays because it checks for an undefined scalar value. If you want to see if the array is empty, just use if (@array) { # not empty } for example.

p56-defined(%hash) is deprecated

(D) defined() is not usually useful on hashes because it checks for an undefined scalar value. If you want to see if the hash is empty, just use if (%hash) { # not empty } for example.

p56-Did not produce a valid header

See Server error.

p56-(Did you mean "local" instead of "our"?)

(W misc) Remember that "our" does not localize the declared global variable. You have declared it again in the same lexical scope, which seems superfluous.

p56-Document contains no data

See Server error.

p56-entering effective %s failed

(F) While under the use filetest pragma, switching the real and effective uids or gids failed.

p56-false [] range "%s" in regexp

(W regexp) A character class range must start and end at a literal character, not another character class like \d or [:alpha:]. The "-" in your false range is interpreted as a literal "-". Consider quoting the "-", "\-". See perlre.

p56-Filehandle %s opened only for output

(W io) You tried to read from a filehandle opened only for writing. If you intended it to be a read/write filehandle, you needed to open it with "+<" or "+>" or "+>>" instead of with "<" or nothing. If you intended only to read from the file, use "<". See "open" in perlfunc.

p56-flock() on closed filehandle %s

(W closed) The filehandle you're attempting to flock() got itself closed some time before now. Check your logic flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name?

p56-Global symbol "%s" requires explicit package name

(F) You've said "use strict vars", which indicates that all variables must either be lexically scoped (using "my"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::").

p56-Hexadecimal number > 0xffffffff non-portable

(W portable) The hexadecimal number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

p56-Ill-formed CRTL environ value "%s"

(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal environ array, and encountered an element without the = delimiter used to separate keys from values. The element is ignored.

p56-Ill-formed message in prime_env_iter: |%s|

(W internal) A warning peculiar to VMS. Perl tried to read a logical name or CLI symbol definition when preparing to iterate over %ENV, and didn't see the expected delimiter between key and value, so the line was ignored.

p56-Illegal binary digit %s

(F) You used a digit other than 0 or 1 in a binary number.

p56-Illegal binary digit %s ignored

(W digit) You may have tried to use a digit other than 0 or 1 in a binary number. Interpretation of the binary number stopped before the offending digit.

p56-Illegal number of bits in vec

(F) The number of bits in vec() (the third argument) must be a power of two from 1 to 32 (or 64, if your platform supports that).

p56-Integer overflow in %s number

(W overflow) The hexadecimal, octal or binary number you have specified either as a literal or as an argument to hex() or oct() is too big for your architecture, and has been converted to a floating point number. On a 32-bit architecture the largest hexadecimal, octal or binary number representable without overflow is 0xFFFFFFFF, 037777777777, or 0b11111111111111111111111111111111 respectively. Note that Perl transparently promotes all numbers to a floating point representation internally--subject to loss of precision errors in subsequent operations.

p56-Invalid %s attribute: %s

The indicated attribute for a subroutine or variable was not recognized by Perl or by a user-supplied handler. See attributes.

p56-Invalid %s attributes: %s

The indicated attributes for a subroutine or variable were not recognized by Perl or by a user-supplied handler. See attributes.

p56-invalid [] range "%s" in regexp

The offending range is now explicitly displayed.

p56-Invalid separator character %s in attribute list

(F) Something other than a colon or whitespace was seen between the elements of an attribute list. If the previous attribute had a parenthesised parameter list, perhaps that list was terminated too soon. See attributes.

p56-Invalid separator character %s in subroutine attribute list

(F) Something other than a colon or whitespace was seen between the elements of a subroutine attribute list. If the previous attribute had a parenthesised parameter list, perhaps that list was terminated too soon.

p56-leaving effective %s failed

(F) While under the use filetest pragma, switching the real and effective uids or gids failed.

p56-Lvalue subs returning %s not implemented yet

(F) Due to limitations in the current implementation, array and hash values cannot be returned in subroutines used in lvalue context. See "Lvalue subroutines" in perlsub.

p56-Method %s not permitted

See Server error.

p56-Missing %sbrace%s on \N{}

(F) Wrong syntax of character name literal \N{charname} within double-quotish context.

p56-Missing command in piped open

(W pipe) You used the open(FH, "| command") or open(FH, "command |") construction, but the command was missing or blank.

p56-Missing name in "my sub"

(F) The reserved syntax for lexically scoped subroutines requires that they have a name with which they can be found.

p56-No %s specified for -%c

(F) The indicated command line switch needs a mandatory argument, but you haven't specified one.

p56-No package name allowed for variable %s in "our"

(F) Fully qualified variable names are not allowed in "our" declarations, because that doesn't make much sense under existing semantics. Such syntax is reserved for future extensions.

p56-No space allowed after -%c

(F) The argument to the indicated command line switch must follow immediately after the switch, without intervening spaces.

p56-no UTC offset information; assuming local time is UTC

(S) A warning peculiar to VMS. Perl was unable to find the local timezone offset, so it's assuming that local system time is equivalent to UTC. If it's not, define the logical name SYS$TIMEZONE_DIFFERENTIAL to translate to the number of seconds which need to be added to UTC to get local time.

p56-Octal number > 037777777777 non-portable

(W portable) The octal number you specified is larger than 2**32-1 (4294967295) and therefore non-portable between systems. See perlport for more on portability concerns.

See also perlport for writing portable code.

p56-panic: del_backref

(P) Failed an internal consistency check while trying to reset a weak reference.

p56-panic: kid popen errno read

(F) forked child returned an incomprehensible message about its errno.

p56-panic: magic_killbackrefs

(P) Failed an internal consistency check while trying to reset all weak references to an object.

p56-Parentheses missing around "%s" list

(W parenthesis) You said something like

    my $foo, $bar = @_;

when you meant

    my ($foo, $bar) = @_;

Remember that "my", "our", and "local" bind tighter than comma.

p56-Possible unintended interpolation of %s in string

(W ambiguous) It used to be that Perl would try to guess whether you wanted an array interpolated or a literal @. It no longer does this; arrays are now always interpolated into strings. This means that if you try something like:

        print "fred@example.com";

and the array @example doesn't exist, Perl is going to print fred.com, which is probably not what you wanted. To get a literal @ sign in a string, put a backslash before it, just as you would to get a literal $ sign.

p56-Possible Y2K bug: %s

(W y2k) You are concatenating the number 19 with another number, which could be a potential Year 2000 problem.

p56-pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead

(W deprecated) You have written something like this:

    sub doit
    {
        use attrs qw(locked);
    }

You should use the new declaration syntax instead.

    sub doit : locked
    {
        ...

The use attrs pragma is now obsolete, and is only provided for backward-compatibility. See "Subroutine Attributes" in perlsub.

p56-Premature end of script headers

See Server error.

p56-Repeat count in pack overflows

(F) You can't specify a repeat count so large that it overflows your signed integers. See "pack" in perlfunc.

p56-Repeat count in unpack overflows

(F) You can't specify a repeat count so large that it overflows your signed integers. See "unpack" in perlfunc.

p56-realloc() of freed memory ignored

(S) An internal routine called realloc() on something that had already been freed.

p56-Reference is already weak

(W misc) You have attempted to weaken a reference that is already weak. Doing so has no effect.

p56-setpgrp can't take arguments

(F) Your system has the setpgrp() from BSD 4.2, which takes no arguments, unlike POSIX setpgid(), which takes a process ID and process group ID.

p56-Strange *+?{} on zero-length expression

(W regexp) You applied a regular expression quantifier in a place where it makes no sense, such as on a zero-width assertion. Try putting the quantifier inside the assertion instead. For example, the way to match "abc" provided that it is followed by three repetitions of "xyz" is /abc(?=(?:xyz){3})/, not /abc(?=xyz){3}/.

p56-switching effective %s is not implemented

(F) While under the use filetest pragma, we cannot switch the real and effective uids or gids.

p56-This Perl can't reset CRTL environ elements (%s)
p56-This Perl can't set CRTL environ elements (%s=%s)

(W internal) Warnings peculiar to VMS. You tried to change or delete an element of the CRTL's internal environ array, but your copy of Perl wasn't built with a CRTL that contained the setenv() function. You'll need to rebuild Perl with a CRTL that does, or redefine PERL_ENV_TABLES (see perlvms) so that the environ array isn't the target of the change to %ENV which produced the warning.

p56-Too late to run %s block

(W void) A CHECK or INIT block is being defined during run time proper, when the opportunity to run them has already passed. Perhaps you are loading a file with require or do when you should be using use instead. Or perhaps you should put the require or do inside a BEGIN block.

p56-Unknown open() mode '%s'

(F) The second argument of 3-argument open() is not among the list of valid modes: <, >, >>, +<, +>, +>>, -|, |-.

p56-Unknown process %x sent message to prime_env_iter: %s

(P) An error peculiar to VMS. Perl was reading values for %ENV before iterating over it, and someone else stuck a message in the stream of data Perl expected. Someone's very confused, or perhaps trying to subvert Perl's population of %ENV for nefarious purposes.

p56-Unrecognized escape \\%c passed through

(W misc) You used a backslash-character combination which is not recognized by Perl. The character was understood literally.

p56-Unterminated attribute parameter in attribute list

(F) The lexer saw an opening (left) parenthesis character while parsing an attribute list, but the matching closing (right) parenthesis character was not found. You may need to add (or remove) a backslash character to get your parentheses to balance. See attributes.

p56-Unterminated attribute list

(F) The lexer found something other than a simple identifier at the start of an attribute, and it wasn't a semicolon or the start of a block. Perhaps you terminated the parameter list of the previous attribute too soon. See attributes.

p56-Unterminated attribute parameter in subroutine attribute list

(F) The lexer saw an opening (left) parenthesis character while parsing a subroutine attribute list, but the matching closing (right) parenthesis character was not found. You may need to add (or remove) a backslash character to get your parentheses to balance.

p56-Unterminated subroutine attribute list

(F) The lexer found something other than a simple identifier at the start of a subroutine attribute, and it wasn't a semicolon or the start of a block. Perhaps you terminated the parameter list of the previous attribute too soon.

p56-Value of CLI symbol "%s" too long

(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV element from a CLI symbol table, and found a resultant string longer than 1024 characters. The return value has been truncated to 1024 characters.

p56-Version number must be a constant number

(P) The attempt to translate a use Module n.n LIST statement into its equivalent BEGIN block found an internal inconsistency with the version number.

p56-New tests

p56-lib/attrs

Compatibility tests for sub : attrs vs the older use attrs.

p56-lib/env

Tests for new environment scalar capability (e.g., use Env qw($BAR);).

p56-lib/env-array

Tests for new environment array capability (e.g., use Env qw(@PATH);).

p56-lib/io_const

IO constants (SEEK_*, _IO*).

p56-lib/io_dir

Directory-related IO methods (new, read, close, rewind, tied delete).

p56-lib/io_multihomed

INET sockets with multi-homed hosts.

p56-lib/io_poll

IO poll().

p56-lib/io_unix

UNIX sockets.

p56-op/attrs

Regression tests for my ($x,@y,%z) : attrs and .

p56-op/filetest

File test operators.

p56-op/lex_assign

Verify operations that access pad objects (lexicals and temporaries).

p56-op/exists_sub

Verify exists &sub operations.

p56-Incompatible Changes

p56-Perl Source Incompatibilities

Beware that any new warnings that have been added or old ones that have been enhanced are not considered incompatible changes.

Since all new warnings must be explicitly requested via the -w switch or the warnings pragma, it is ultimately the programmer's responsibility to ensure that warnings are enabled judiciously.

p56-CHECK is a new keyword

All subroutine definitions named CHECK are now special. See /"Support for CHECK blocks" for more information.

p56-Treatment of list slices of undef has changed

There is a potential incompatibility in the behavior of list slices that are comprised entirely of undefined values. See "p56-Behavior of list slices is more consistent".

p56-Format of $English::PERL_VERSION is different

The English module now sets $PERL_VERSION to $^V (a string value) rather than $] (a numeric value). This is a potential incompatibility. Send us a report via perlbug if you are affected by this.

See "p56-Improved Perl version numbering system" for the reasons for this change.

p56-Literals of the form 1.2.3 parse differently

Previously, numeric literals with more than one dot in them were interpreted as a floating point number concatenated with one or more numbers. Such "numbers" are now parsed as strings composed of the specified ordinals.

For example, print 97.98.99 used to output 97.9899 in earlier versions, but now prints abc.

See "p56-Support for strings represented as a vector of ordinals".

p56-Possibly changed pseudo-random number generator

Perl programs that depend on reproducing a specific set of pseudo-random numbers may now produce different output due to improvements made to the rand() builtin. You can use sh Configure -Drandfunc=rand to obtain the old behavior.

See "p56-Better pseudo-random number generator".

p56-Hashing function for hash keys has changed

Even though Perl hashes are not order preserving, the apparently random order encountered when iterating on the contents of a hash is actually determined by the hashing algorithm used. Improvements in the algorithm may yield a random order that is different from that of previous versions, especially when iterating on hashes.

See "p56-Better worst-case behavior of hashes" for additional information.

p56-undef fails on read only values

Using the undef operator on a readonly value (such as $1) has the same effect as assigning undef to the readonly value--it throws an exception.

p56-Close-on-exec bit may be set on pipe and socket handles

Pipe and socket handles are also now subject to the close-on-exec behavior determined by the special variable $^F.

See "p56-More consistent close-on-exec behavior".

p56-Writing "$$1" to mean "${$}1" is unsupported

Perl 5.004 deprecated the interpretation of $$1 and similar within interpolated strings to mean $$ . "1", but still allowed it.

In Perl 5.6.0 and later, "$$1" always means "${$1}".

p56-delete(), each(), values() and \(%h)

operate on aliases to values, not copies

delete(), each(), values() and hashes (e.g. \(%h)) in a list context return the actual values in the hash, instead of copies (as they used to in earlier versions). Typical idioms for using these constructs copy the returned values, but this can make a significant difference when creating references to the returned values. Keys in the hash are still returned as copies when iterating on a hash.

See also "p56-delete(), each(), values() and hash iteration are faster".

p56-vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS

vec() generates a run-time error if the BITS argument is not a valid power-of-two integer.

p56-Text of some diagnostic output has changed

Most references to internal Perl operations in diagnostics have been changed to be more descriptive. This may be an issue for programs that may incorrectly rely on the exact text of diagnostics for proper functioning.

p56-%@ has been removed

The undocumented special variable %@ that used to accumulate "background" errors (such as those that happen in DESTROY()) has been removed, because it could potentially result in memory leaks.

p56-Parenthesized not() behaves like a list operator

The not operator now falls under the "if it looks like a function, it behaves like a function" rule.

As a result, the parenthesized form can be used with grep and map. The following construct used to be a syntax error before, but it works as expected now:

    grep not($_), @things;

On the other hand, using not with a literal list slice may not work. The following previously allowed construct:

    print not (1,2,3)[0];

needs to be written with additional parentheses now:

    print not((1,2,3)[0]);

The behavior remains unaffected when not is not followed by parentheses.

p56-Semantics of bareword prototype (*) have changed

The semantics of the bareword prototype * have changed. Perl 5.005 always coerced simple scalar arguments to a typeglob, which wasn't useful in situations where the subroutine must distinguish between a simple scalar and a typeglob. The new behavior is to not coerce bareword arguments to a typeglob. The value will always be visible as either a simple scalar or as a reference to a typeglob.

See "p56-More functional bareword prototype (*)".

p56-Semantics of bit operators may have changed on 64-bit platforms

If your platform is either natively 64-bit or if Perl has been configured to used 64-bit integers, i.e., $Config{ivsize} is 8, there may be a potential incompatibility in the behavior of bitwise numeric operators (& | ^ ~ << >>). These operators used to strictly operate on the lower 32 bits of integers in previous versions, but now operate over the entire native integral width. In particular, note that unary ~ will produce different results on platforms that have different $Config{ivsize}. For portability, be sure to mask off the excess bits in the result of unary ~, e.g., ~$x & 0xffffffff.

See "p56-Bit operators support full native integer width".

p56-More builtins taint their results

As described in "p56-Improved security features", there may be more sources of taint in a Perl program.

To avoid these new tainting behaviors, you can build Perl with the Configure option -Accflags=-DINCOMPLETE_TAINTS. Beware that the ensuing perl binary may be insecure.

p56-C Source Incompatibilities

p56-PERL_POLLUTE

Release 5.005 grandfathered old global symbol names by providing preprocessor macros for extension source compatibility. As of release 5.6.0, these preprocessor definitions are not available by default. You need to explicitly compile perl with -DPERL_POLLUTE to get these definitions. For extensions still using the old symbols, this option can be specified via MakeMaker:

    perl Makefile.PL POLLUTE=1
p56-PERL_IMPLICIT_CONTEXT

This new build option provides a set of macros for all API functions such that an implicit interpreter/thread context argument is passed to every API function. As a result of this, something like sv_setsv(foo,bar) amounts to a macro invocation that actually translates to something like Perl_sv_setsv(my_perl,foo,bar). While this is generally expected to not have any significant source compatibility issues, the difference between a macro and a real function call will need to be considered.

This means that there is a source compatibility issue as a result of this if your extensions attempt to use pointers to any of the Perl API functions.

Note that the above issue is not relevant to the default build of Perl, whose interfaces continue to match those of prior versions (but subject to the other options described here).

See "The Perl API" in perlguts for detailed information on the ramifications of building Perl with this option.

    NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
    with one of -Dusethreads, -Dusemultiplicity, or both.  It is not
    intended to be enabled by users at this time.
p56-PERL_POLLUTE_MALLOC

Enabling Perl's malloc in release 5.005 and earlier caused the namespace of the system's malloc family of functions to be usurped by the Perl versions, since by default they used the same names. Besides causing problems on platforms that do not allow these functions to be cleanly replaced, this also meant that the system versions could not be called in programs that used Perl's malloc. Previous versions of Perl have allowed this behaviour to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor definitions.

As of release 5.6.0, Perl's malloc family of functions have default names distinct from the system versions. You need to explicitly compile perl with -DPERL_POLLUTE_MALLOC to get the older behaviour. HIDEMYMALLOC and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now the default.

Note that these functions do not constitute Perl's memory allocation API. See "Memory Allocation" in perlguts for further information about that.

p56-Compatible C Source API Changes

p56-PATCHLEVEL is now PERL_VERSION

The cpp macros PERL_REVISION, PERL_VERSION, and PERL_SUBVERSION are now available by default from perl.h, and reflect the base revision, patchlevel, and subversion respectively. PERL_REVISION had no prior equivalent, while PERL_VERSION and PERL_SUBVERSION were previously available as PATCHLEVEL and SUBVERSION.

The new names cause less pollution of the cpp namespace and reflect what the numbers have come to stand for in common practice. For compatibility, the old names are still supported when patchlevel.h is explicitly included (as required before), so there is no source incompatibility from the change.

p56-Binary Incompatibilities

In general, the default build of this release is expected to be binary compatible for extensions built with the 5.005 release or its maintenance versions. However, specific platforms may have broken binary compatibility due to changes in the defaults used in hints files. Therefore, please be sure to always check the platform-specific README files for any notes to the contrary.

The usethreads or usemultiplicity builds are not binary compatible with the corresponding builds in 5.005.

On platforms that require an explicit list of exports (AIX, OS/2 and Windows, among others), purely internal symbols such as parser functions and the run time opcodes are not exported by default. Perl 5.005 used to export all functions irrespective of whether they were considered part of the public API or not.

For the full list of public API functions, see perlapi.

p56-Known Problems

p56-Thread test failures

The subtests 19 and 20 of lib/thr5005.t test 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.

p56-EBCDIC platforms not supported

In earlier releases of Perl, EBCDIC environments like OS390 (also known as Open Edition MVS) and VM-ESA were supported. Due to changes required by the UTF-8 (Unicode) support, the EBCDIC platforms are not supported in Perl 5.6.0.

p56-In 64-bit HP-UX the lib/io_multihomed test may hang

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

p56-NEXTSTEP 3.3 POSIX test failure

In NEXTSTEP 3.3p2 the implementation of the strftime(3) in the operating system libraries is buggy: the %j format numbers the days of a month starting from zero, which, while being logical to programmers, will cause the subtests 19 to 27 of the lib/posix test may fail.

p56-Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc

If compiled with gcc 2.95 the lib/sdbm test will fail (dump core). The cure is to use the vendor cc, it comes with the operating system and produces good code.

p56-UNICOS/mk CC failures during Configure run

In UNICOS/mk the following errors may appear during the Configure run:

        Guessing which symbols your C compiler and preprocessor define...
        CC-20 cc: ERROR File = try.c, Line = 3
        ...
          bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
        ...
        4 errors detected in the compilation of "try.c".

The culprit is the broken awk of UNICOS/mk. The effect is fortunately rather mild: Perl itself is not adversely affected by the error, only the h2ph utility coming with Perl, and that is rather rarely needed these days.

p56-Arrow operator and arrays

When the left argument to the arrow operator -> is an array, or the scalar operator operating on an array, the result of the operation must be considered erroneous. For example:

    @x->[2]
    scalar(@x)->[2]

These expressions will get run-time errors in some future release of Perl.

p56-Experimental features

As discussed above, many features are still experimental. Interfaces and implementation of these features are subject to change, and in extreme cases, even subject to removal in some future release of Perl. These features include the following:

p56-Threads
p56-Unicode
p56-64-bit support
p56-Lvalue subroutines
p56-Weak references
p56-The pseudo-hash data type
p56-The Compiler suite
p56-Internal implementation of file globbing
p56-The DB module
p56-The regular expression code constructs:

(?{ code }) and (??{ code })

p56-Obsolete Diagnostics

p56-Character class syntax [: :] is reserved for future extensions

(W) Within regular expression character classes ([]) the syntax beginning with "[:" and ending with ":]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[:" and ":\]".

p56-Ill-formed logical name |%s| in prime_env_iter

(W) A warning peculiar to VMS. A logical name was encountered when preparing to iterate over %ENV which violates the syntactic rules governing logical names. Because it cannot be translated normally, it is skipped, and will not appear in %ENV. This may be a benign occurrence, as some software packages might directly modify logical name tables and introduce nonstandard names, or it may indicate that a logical name table has been corrupted.

p56-In string, @%s now must be written as \@%s

The description of this error used to say:

        (Someday it will simply assume that an unbackslashed @
         interpolates an array.)

That day has come, and this fatal error has been removed. It has been replaced by a non-fatal warning instead. See "p56-Arrays now always interpolate into double-quoted strings" for details.

p56-Probable precedence problem on %s

(W) The compiler found a bareword where it expected a conditional, which often indicates that an || or && was parsed as part of the last argument of the previous construct, for example:

    open FOO || die;
p56-regexp too big

(F) The current implementation of regular expressions uses shorts as address offsets within a string. Unfortunately this means that if the regular expression compiles to longer than 32767, it'll blow up. Usually when you want a regular expression this big, there is a better way to do it with multiple statements. See perlre.

"_to_mean_"${$}"_is_deprecated" >p56-Use of "$$" to mean "${$}" is deprecated

(D) Perl versions before 5.004 misinterpreted any type marker followed by "$" and a digit. For example, "$$0" was incorrectly taken to mean "${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.

However, the developers of Perl 5.004 could not fix this bug completely, because at least two widely-used modules depend on the old meaning of "$$0" in a string. So Perl 5.004 still interprets "$$" in the old (broken) way inside strings; but it generates this message as a warning. And in Perl 5.005, this special treatment will cease.

p56-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. There may also be information at http://www.perl.com/perl/ , 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.

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

p56-HISTORY

Written by Gurusamy Sarathy <gsar@activestate.com>, with many contributions from The Perl Porters.

Send omissions or corrections to <perlbug@perl.org>.

p5005-NAME

perl5005delta - what's new for perl5.005

p5005-DESCRIPTION

This document describes differences between the 5.004 release and this one.

p5005-About the new versioning system

Perl is now developed on two tracks: a maintenance track that makes small, safe updates to released production versions with emphasis on compatibility; and a development track that pursues more aggressive evolution. Maintenance releases (which should be considered production quality) have subversion numbers that run from 1 to 49, and development releases (which should be considered "alpha" quality) run from 50 to 99.

Perl 5.005 is the combined product of the new dual-track development scheme.

p5005-Incompatible Changes

p5005-WARNING: This version is not binary compatible with Perl 5.004.

Starting with Perl 5.004_50 there were many deep and far-reaching changes to the language internals. If you have dynamically loaded extensions that you built under perl 5.003 or 5.004, you can continue to use them with 5.004, but you will need to rebuild and reinstall those extensions to use them 5.005. See INSTALL for detailed instructions on how to upgrade.

p5005-Default installation structure has changed

The new Configure defaults are designed to allow a smooth upgrade from 5.004 to 5.005, but you should read INSTALL for a detailed discussion of the changes in order to adapt them to your system.

p5005-Perl Source Compatibility

When none of the experimental features are enabled, there should be very few user-visible Perl source compatibility issues.

If threads are enabled, then some caveats apply. @_ and $_ become lexical variables. The effect of this should be largely transparent to the user, but there are some boundary conditions under which user will need to be aware of the issues. For example, local(@_) results in a "Can't localize lexical variable @_ ..." message. This may be enabled in a future version.

Some new keywords have been introduced. These are generally expected to have very little impact on compatibility. See "p5005-New INIT keyword", "p5005-New lock keyword", and "p5005-New qr// operator".

Certain barewords are now reserved. Use of these will provoke a warning if you have asked for them with the -w switch. See "p5005-our is now a reserved word".

p5005-C Source Compatibility

There have been a large number of changes in the internals to support the new features in this release.

p5005-Binary Compatibility

This version is NOT binary compatible with older versions. All extensions will need to be recompiled. Further binaries built with threads enabled are incompatible with binaries built without. This should largely be transparent to the user, as all binary incompatible configurations have their own unique architecture name, and extension binaries get installed at unique locations. This allows coexistence of several configurations in the same directory hierarchy. See INSTALL.

p5005-Security fixes may affect compatibility

A few taint leaks and taint omissions have been corrected. This may lead to "failure" of scripts that used to work with older versions. Compiling with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes to the tainting behavior. But note that the resulting perl will have known insecurities.

Oneliners with the -e switch do not create temporary files anymore.

p5005-Relaxed new mandatory warnings introduced in 5.004

Many new warnings that were introduced in 5.004 have been made optional. Some of these warnings are still present, but perl's new features make them less often a problem. See "p5005-New Diagnostics".

p5005-Licensing

Perl has a new Social Contract for contributors. See Porting/Contract.

The license included in much of the Perl documentation has changed. Most of the Perl documentation was previously under the implicit GNU General Public License or the Artistic License (at the user's choice). Now much of the documentation unambiguously states the terms under which it may be distributed. Those terms are in general much less restrictive than the GNU GPL. See perl and the individual perl manpages listed therein.

p5005-Core Changes

p5005-Threads

WARNING: Threading is considered an experimental feature. Details of the implementation may change without notice. There are known limitations and some bugs. These are expected to be fixed in future versions.

See README.threads.

p5005-Compiler

WARNING: The Compiler and related tools are considered experimental. Features may change without notice, and there are known limitations and bugs. Since the compiler is fully external to perl, the default configuration will build and install it.

The Compiler produces three different types of transformations of a perl program. The C backend generates C code that captures perl's state just before execution begins. It eliminates the compile-time overheads of the regular perl interpreter, but the run-time performance remains comparatively the same. The CC backend generates optimized C code equivalent to the code path at run-time. The CC backend has greater potential for big optimizations, but only a few optimizations are implemented currently. The Bytecode backend generates a platform independent bytecode representation of the interpreter's state just before execution. Thus, the Bytecode back end also eliminates much of the compilation overhead of the interpreter.

The compiler comes with several valuable utilities.

B::Lint is an experimental module to detect and warn about suspicious code, especially the cases that the -w switch does not detect.

B::Deparse can be used to demystify perl code, and understand how perl optimizes certain constructs.

B::Xref generates cross reference reports of all definition and use of variables, subroutines and formats in a program.

B::Showlex show the lexical variables used by a subroutine or file at a glance.

perlcc is a simple frontend for compiling perl.

See ext/B/README, B, and the respective compiler modules.

p5005-Regular Expressions

Perl's regular expression engine has been seriously overhauled, and many new constructs are supported. Several bugs have been fixed.

Here is an itemized summary:

p5005-Many new and improved optimizations

Changes in the RE engine:

        Unneeded nodes removed;
        Substrings merged together;
        New types of nodes to process (SUBEXPR)* and similar expressions
            quickly, used if the SUBEXPR has no side effects and matches
            strings of the same length;
        Better optimizations by lookup for constant substrings;
        Better search for constants substrings anchored by $ ;

Changes in Perl code using RE engine:

        More optimizations to s/longer/short/;
        study() was not working;
        /blah/ may be optimized to an analogue of index() if $& $` $' not seen;
        Unneeded copying of matched-against string removed;
        Only matched part of the string is copying if $` $' were not seen;
p5005-Many bug fixes

Note that only the major bug fixes are listed here. See Changes for others.

        Backtracking might not restore start of $3.
        No feedback if max count for * or + on "complex" subexpression
            was reached, similarly (but at compile time) for {3,34567}
        Primitive restrictions on max count introduced to decrease a 
            possibility of a segfault;
        (ZERO-LENGTH)* could segfault;
        (ZERO-LENGTH)* was prohibited;
        Long REs were not allowed;
        /RE/g could skip matches at the same position after a 
          zero-length match;
p5005-New regular expression constructs

The following new syntax elements are supported:

        (?<=RE)
        (?RE)
        \z
p5005-New operator for precompiled regular expressions

See "p5005-New qr// operator".

p5005-Other improvements
        Better debugging output (possibly with colors),
            even from non-debugging Perl;
        RE engine code now looks like C, not like assembler;
        Behaviour of RE modifiable by `use re' directive;
        Improved documentation;
        Test suite significantly extended;
        Syntax [:^upper:] etc., reserved inside character classes;
p5005-Incompatible changes
        (?i) localized inside enclosing group;
        $( is not interpolated into RE any more;
        /RE/g may match at the same position (with non-zero length)
            after a zero-length match (bug fix).

See perlre and perlop.

p5005-Improved malloc()

See banner at the beginning of malloc.c for details.

p5005-Quicksort is internally implemented

Perl now contains its own highly optimized qsort() routine. The new qsort() is resistant to inconsistent comparison functions, so Perl's sort() will not provoke coredumps any more when given poorly written sort subroutines. (Some C library qsort()s that were being used before used to have this problem.) In our testing, the new qsort() required the minimal number of pair-wise compares on average, among all known qsort() implementations.

See perlfunc/sort.

p5005-Reliable signals

Perl's signal handling is susceptible to random crashes, because signals arrive asynchronously, and the Perl runtime is not reentrant at arbitrary times.

However, one experimental implementation of reliable signals is available when threads are enabled. See Thread::Signal. Also see INSTALL for how to build a Perl capable of threads.

p5005-Reliable stack pointers

The internals now reallocate the perl stack only at predictable times. In particular, magic calls never trigger reallocations of the stack, because all reentrancy of the runtime is handled using a "stack of stacks". This should improve reliability of cached stack pointers in the internals and in XSUBs.

p5005-More generous treatment of carriage returns

Perl used to complain if it encountered literal carriage returns in scripts. Now they are mostly treated like whitespace within program text. Inside string literals and here documents, literal carriage returns are ignored if they occur paired with linefeeds, or get interpreted as whitespace if they stand alone. This behavior means that literal carriage returns in files should be avoided. You can get the older, more compatible (but less generous) behavior by defining the preprocessor symbol PERL_STRICT_CR when building perl. Of course, all this has nothing whatever to do with how escapes like \r are handled within strings.

Note that this doesn't somehow magically allow you to keep all text files in DOS format. The generous treatment only applies to files that perl itself parses. If your C compiler doesn't allow carriage returns in files, you may still be unable to build modules that need a C compiler.

p5005-Memory leaks

substr, pos and vec don't leak memory anymore when used in lvalue context. Many small leaks that impacted applications that embed multiple interpreters have been fixed.

p5005-Better support for multiple interpreters

The build-time option -DMULTIPLICITY has had many of the details reworked. Some previously global variables that should have been per-interpreter now are. With care, this allows interpreters to call each other. See the PerlInterp extension on CPAN.

p5005-Behavior of local() on array and hash elements is now well-defined

See "Temporary Values via local()" in perlsub.

p5005-%! is transparently tied to the Errno module

See perlvar, and Errno.

p5005-Pseudo-hashes are supported

See perlref.

p5005-EXPR foreach EXPR is supported

See perlsyn.

p5005-Keywords can be globally overridden

See perlsub.

p5005-$^E is meaningful on Win32

See perlvar.

p5005-foreach (1..1000000) optimized

foreach (1..1000000) is now optimized into a counting loop. It does not try to allocate a 1000000-size list anymore.

p5005-Foo:: can be used as implicitly quoted package name

Barewords caused unintuitive behavior when a subroutine with the same name as a package happened to be defined. Thus, new Foo @args, use the result of the call to Foo() instead of Foo being treated as a literal. The recommended way to write barewords in the indirect object slot is new Foo:: @args. Note that the method new() is called with a first argument of Foo, not Foo:: when you do that.

p5005-exists $Foo::{Bar::} tests existence of a package

It was impossible to test for the existence of a package without actually creating it before. Now exists $Foo::{Bar::} can be used to test if the Foo::Bar namespace has been created.

p5005-Better locale support

See perllocale.

p5005-Experimental support for 64-bit platforms

Perl5 has always had 64-bit support on systems with 64-bit longs. Starting with 5.005, the beginnings of experimental support for systems with 32-bit long and 64-bit 'long long' integers has been added. If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually define it in perl.h) then perl will be built with 'long long' support. There will be many compiler warnings, and the resultant perl may not work on all systems. There are many other issues related to third-party extensions and libraries. This option exists to allow people to work on those issues.

p5005-prototype() returns useful results on builtins

See "prototype" in perlfunc.

p5005-Extended support for exception handling

die() now accepts a reference value, and $@ gets set to that value in exception traps. This makes it possible to propagate exception objects. This is an undocumented experimental feature.

p5005-Re-blessing in DESTROY() supported for chaining DESTROY() methods

See "Destructors" in perlobj.

p5005-All printf format conversions are handled internally

See "printf" in perlfunc.

p5005-New INIT keyword

INIT subs are like BEGIN and END, but they get run just before the perl runtime begins execution. e.g., the Perl Compiler makes use of INIT blocks to initialize and resolve pointers to XSUBs.

p5005-New lock keyword

The lock keyword is the fundamental synchronization primitive in threaded perl. When threads are not enabled, it is currently a noop.

To minimize impact on source compatibility this keyword is "weak", i.e., any user-defined subroutine of the same name overrides it, unless a use Thread has been seen.

p5005-New qr// operator

The qr// operator, which is syntactically similar to the other quote-like operators, is used to create precompiled regular expressions. This compiled form can now be explicitly passed around in variables, and interpolated in other regular expressions. See perlop.

p5005-our is now a reserved word

Calling a subroutine with the name our will now provoke a warning when using the -w switch.

p5005-Tied arrays are now fully supported

See Tie::Array.

p5005-Tied handles support is better

Several missing hooks have been added. There is also a new base class for TIEARRAY implementations. See Tie::Array.

p5005-4th argument to substr

substr() can now both return and replace in one operation. The optional 4th argument is the replacement string. See "substr" in perlfunc.

p5005-Negative LENGTH argument to splice

splice() with a negative LENGTH argument now work similar to what the LENGTH did for substr(). Previously a negative LENGTH was treated as 0. See "splice" in perlfunc.

p5005-Magic lvalues are now more magical

When you say something like substr($x, 5) = "hi", the scalar returned by substr() is special, in that any modifications to it affect $x. (This is called a 'magic lvalue' because an 'lvalue' is something on the left side of an assignment.) Normally, this is exactly what you would expect to happen, but Perl uses the same magic if you use substr(), pos(), or vec() in a context where they might be modified, like taking a reference with \ or as an argument to a sub that modifies @_. In previous versions, this 'magic' only went one way, but now changes to the scalar the magic refers to ($x in the above example) affect the magic lvalue too. For instance, this code now acts differently:

    $x = "hello";
    sub printit {
        $x = "g'bye";
        print $_[0], "\n";
    }
    printit(substr($x, 0, 5));

In previous versions, this would print "hello", but it now prints "g'bye".

p5005-<> now reads in records

If $/ is a reference to an integer, or a scalar that holds an integer, <> will read in records instead of lines. For more info, see "$/" in perlvar.

p5005-Supported Platforms

Configure has many incremental improvements. Site-wide policy for building perl can now be made persistent, via Policy.sh. Configure also records the command-line arguments used in config.sh.

p5005-New Platforms

BeOS is now supported. See README.beos.

DOS is now supported under the DJGPP tools. See README.dos (installed as perldos on some systems).

MiNT is now supported. See README.mint.

MPE/iX is now supported. See README.mpeix.

MVS (aka OS390, aka Open Edition) is now supported. See README.os390 (installed as perlos390 on some systems).

Stratus VOS is now supported. See README.vos.

p5005-Changes in existing support

Win32 support has been vastly enhanced. Support for Perl Object, a C++ encapsulation of Perl. GCC and EGCS are now supported on Win32. See README.win32, aka perlwin32.

VMS configuration system has been rewritten. See README.vms (installed as README_vms on some systems).

The hints files for most Unix platforms have seen incremental improvements.

p5005-Modules and Pragmata

p5005-New Modules

p5005-B

Perl compiler and tools. See B.

p5005-Data::Dumper

A module to pretty print Perl data. See Data::Dumper.

p5005-Dumpvalue

A module to dump perl values to the screen. See Dumpvalue.

p5005-Errno

A module to look up errors more conveniently. See Errno.

p5005-File::Spec

A portable API for file operations.

p5005-ExtUtils::Installed

Query and manage installed modules.

p5005-ExtUtils::Packlist

Manipulate .packlist files.

p5005-Fatal

Make functions/builtins succeed or die.

p5005-IPC::SysV

Constants and other support infrastructure for System V IPC operations in perl.

p5005-Test

A framework for writing test suites.

p5005-Tie::Array

Base class for tied arrays.

p5005-Tie::Handle

Base class for tied handles.

p5005-Thread

Perl thread creation, manipulation, and support.

p5005-attrs

Set subroutine attributes.

p5005-fields

Compile-time class fields.

p5005-re

Various pragmata to control behavior of regular expressions.

p5005-Changes in existing modules

p5005-Benchmark

You can now run tests for x seconds instead of guessing the right number of tests to run.

Keeps better time.

p5005-Carp

Carp has a new function cluck(). cluck() warns, like carp(), but also adds a stack backtrace to the error message, like confess().

p5005-CGI

CGI has been updated to version 2.42.

p5005-Fcntl

More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for large (more than 4G) file access (the 64-bit support is not yet working, though, so no need to get overly excited), Free/Net/OpenBSD locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR.

p5005-Math::Complex

The accessors methods Re, Im, arg, abs, rho, theta, methods can ($z->Re()) now also act as mutators ($z->Re(3)).

p5005-Math::Trig

A little bit of radial trigonometry (cylindrical and spherical) added, for example the great circle distance.

p5005-POSIX

POSIX now has its own platform-specific hints files.

p5005-DB_File

DB_File supports version 2.x of Berkeley DB. See ext/DB_File/Changes.

p5005-MakeMaker

MakeMaker now supports writing empty makefiles, provides a way to specify that site umask() policy should be honored. There is also better support for manipulation of .packlist files, and getting information about installed modules.

Extensions that have both architecture-dependent and architecture-independent files are now always installed completely in the architecture-dependent locations. Previously, the shareable parts were shared both across architectures and across perl versions and were therefore liable to be overwritten with newer versions that might have subtle incompatibilities.

p5005-CPAN

See perlmodinstall and CPAN.

p5005-Cwd

Cwd::cwd is faster on most platforms.

p5005-Utility Changes

h2ph and related utilities have been vastly overhauled.

perlcc, a new experimental front end for the compiler is available.

The crude GNU configure emulator is now called configure.gnu to avoid trampling on Configure under case-insensitive filesystems.

perldoc used to be rather slow. The slower features are now optional. In particular, case-insensitive searches need the -i switch, and recursive searches need -r. You can set these switches in the PERLDOC environment variable to get the old behavior.

p5005-Documentation Changes

Config.pm now has a glossary of variables.

Porting/patching.pod has detailed instructions on how to create and submit patches for perl.

perlport specifies guidelines on how to write portably.

perlmodinstall describes how to fetch and install modules from CPAN sites.

Some more Perl traps are documented now. See perltrap.

perlopentut gives a tutorial on using open().

perlreftut gives a tutorial on references.

perlthrtut gives a tutorial on threads.

p5005-New Diagnostics

p5005-Ambiguous call resolved as CORE::%s(), qualify as such or use &

(W) A subroutine you have declared has the same name as a Perl keyword, and you have used the name without qualification for calling one or the other. Perl decided to call the builtin because the subroutine is not imported.

To force interpretation as a subroutine call, either put an ampersand before the subroutine name, or qualify the name with its package. Alternatively, you can import the subroutine (or pretend that it's imported with the use subs pragma).

To silently interpret it as the Perl operator, use the CORE:: prefix on the operator (e.g. CORE::log($x)) or by declaring the subroutine to be an object method (see attrs).

p5005-Bad index while coercing array into hash

(F) The index looked up in the hash found as the 0'th element of a pseudo-hash is not legal. Index values must be at 1 or greater. See perlref.

p5005-Bareword "%s" refers to nonexistent package

(W) You used a qualified bareword of the form Foo::, but the compiler saw no other uses of that namespace before that point. Perhaps you need to predeclare a package?

p5005-Can't call method "%s" on an undefined value

(F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error:

    $BADREF = 42;
    process $BADREF 1,2,3;
    $BADREF->process(1,2,3);
p5005-Can't check filesystem of script "%s" for nosuid

(P) For some reason you can't check the filesystem of the script for nosuid.

p5005-Can't coerce array into hash

(F) You used an array where a hash was expected, but the array has no information on how to map from keys to array indices. You can do that only with arrays that have a hash reference at index 0.

p5005-Can't goto subroutine from an eval-string

(F) The "goto subroutine" call can't be used to jump out of an eval "string". (You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)

p5005-Can't localize pseudo-hash element

(F) You said something like local $ar->{'key'}, where $ar is a reference to a pseudo-hash. That hasn't been implemented yet, but you can get a similar effect by localizing the corresponding array element directly: local $ar->[$ar->[0]{'key'}].

p5005-Can't use %%! because Errno.pm is not available

(F) The first time the %! hash is used, perl automatically loads the Errno.pm module. The Errno module is expected to tie the %! hash to provide symbolic names for $! errno values.

p5005-Cannot find an opnumber for "%s"

(F) A string of a form CORE::word was given to prototype(), but there is no builtin with the name word.

p5005-Character class syntax [. .] is reserved for future extensions

(W) Within regular expression character classes ([]) the syntax beginning with "[." and ending with ".]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[." and ".\]".

p5005-Character class syntax [: :] is reserved for future extensions

(W) Within regular expression character classes ([]) the syntax beginning with "[:" and ending with ":]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[:" and ":\]".

p5005-Character class syntax [= =] is reserved for future extensions

(W) Within regular expression character classes ([]) the syntax beginning with "[=" and ending with "=]" is reserved for future extensions. If you need to represent those character sequences inside a regular expression character class, just quote the square brackets with the backslash: "\[=" and "=\]".

p5005-%s: Eval-group in insecure regular expression

(F) Perl detected tainted data when trying to compile a regular expression that contains the (?{ ... }) zero-width assertion, which is unsafe. See "(?{ code })" in perlre, and perlsec.

p5005-%s: Eval-group not allowed, use re 'eval'

(F) A regular expression contained the (?{ ... }) zero-width assertion, but that construct is only allowed when the use re 'eval' pragma is in effect. See "(?{ code })" in perlre.

p5005-%s: Eval-group not allowed at run time

(F) Perl tried to compile a regular expression containing the (?{ ... }) zero-width assertion at run time, as it would when the pattern contains interpolated values. Since that is a security risk, it is not allowed. If you insist, you may still do this by explicitly building the pattern from an interpolated string at run time and using that in an eval(). See "(?{ code })" in perlre.

p5005-Explicit blessing to '' (assuming package main)

(W) You are blessing a reference to a zero length string. This has the effect of blessing the reference into the package main. This is usually not what you want. Consider providing a default target package, e.g. bless($ref, $p || 'MyPackage');

p5005-Illegal hex digit ignored

(W) You may have tried to use a character other than 0 - 9 or A - F in a hexadecimal number. Interpretation of the hexadecimal number stopped before the illegal character.

p5005-No such array field

(F) You tried to access an array as a hash, but the field name used is not defined. The hash at index 0 should map all valid field names to array indices for that to work.

p5005-No such field "%s" in variable %s of type %s

(F) You tried to access a field of a typed variable where the type does not know about the field name. The field names are looked up in the %FIELDS hash in the type package at compile time. The %FIELDS hash is usually set up with the 'fields' pragma.

p5005-Out of memory during ridiculously large request

(F) You can't allocate more than 2^31+"small amount" bytes. This error is most likely to be caused by a typo in the Perl program. e.g., $arr[time] instead of $arr[$time].

p5005-Range iterator outside integer range

(F) One (or both) of the numeric arguments to the range operator ".." are outside the range which can be represented by integers internally. One possible workaround is to force Perl to use magical string increment by prepending "0" to your numbers.

p5005-Recursive inheritance detected while looking for method '%s' %s

(F) More than 100 levels of inheritance were encountered while invoking a method. Probably indicates an unintended loop in your inheritance hierarchy.

p5005-Reference found where even-sized list expected

(W) You gave a single reference where Perl was expecting a list with an even number of elements (for assignment to a hash). This usually means that you used the anon hash constructor when you meant to use parens. In any case, a hash requires key/value pairs.

    %hash = { one => 1, two => 2, };   # WRONG
    %hash = [ qw/ an anon array / ];   # WRONG
    %hash = ( one => 1, two => 2, );   # right
    %hash = qw( one 1 two 2 );                 # also fine
p5005-Undefined value assigned to typeglob

(W) An undefined value was assigned to a typeglob, a la *foo = undef. This does nothing. It's possible that you really mean undef *foo.

p5005-Use of reserved word "%s" is deprecated

(D) The indicated bareword is a reserved word. Future versions of perl may use it as a keyword, so you're better off either explicitly quoting the word in a manner appropriate for its context of use, or using a different name altogether. The warning can be suppressed for subroutine names by either adding a & prefix, or using a package qualifier, e.g. &our(), or Foo::our().

p5005-perl: warning: Setting locale failed.

(S) The whole warning message will look something like:

       perl: warning: Setting locale failed.
       perl: warning: Please check that your locale settings:
               LC_ALL = "En_US",
               LANG = (unset)
           are supported and installed on your system.
       perl: warning: Falling back to the standard locale ("C").

Exactly what were the failed locale settings varies. In the above the settings were that the LC_ALL was "En_US" and the LANG had no value. This error means that Perl detected that you and/or your system administrator have set up the so-called variable system but Perl could not use those settings. This was not dead serious, fortunately: there is a "default locale" called "C" that Perl can and will use, the script will be run. Before you really fix the problem, however, you will get the same error message each time you run Perl. How to really fix the problem can be found in "LOCALE PROBLEMS" in perllocale.

p5005-Obsolete Diagnostics

p5005-Can't mktemp()

(F) The mktemp() routine failed for some reason while trying to process a -e switch. Maybe your /tmp partition is full, or clobbered.

Removed because -e doesn't use temporary files any more.

p5005-Can't write to temp file for -e: %s

(F) The write routine failed for some reason while trying to process a -e switch. Maybe your /tmp partition is full, or clobbered.

Removed because -e doesn't use temporary files any more.

p5005-Cannot open temporary file

(F) The create routine failed for some reason while trying to process a -e switch. Maybe your /tmp partition is full, or clobbered.

Removed because -e doesn't use temporary files any more.

p5005-regexp too big

(F) The current implementation of regular expressions uses shorts as address offsets within a string. Unfortunately this means that if the regular expression compiles to longer than 32767, it'll blow up. Usually when you want a regular expression this big, there is a better way to do it with multiple statements. See perlre.

p5005-Configuration Changes

You can use "Configure -Uinstallusrbinperl" which causes installperl to skip installing perl also as /usr/bin/perl. This is useful if you prefer not to modify /usr/bin for some reason or another but harmful because many scripts assume to find Perl in /usr/bin/perl.

p5005-BUGS

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

If you believe you have an unreported bug, please run the perlbug program included with your release. Make sure you 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.com> to be analysed by the Perl porting team.

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

p5005-HISTORY

Written by Gurusamy Sarathy <gsar@activestate.com>, with many contributions from The Perl Porters.

Send omissions or corrections to <perlbug@perl.com>.

p5004-NAME

perl5004delta - what's new for perl5.004

p5004-DESCRIPTION

This document describes differences between the 5.003 release (as documented in Programming Perl, second edition--the Camel Book) and this one.

p5004-Supported Environments

Perl5.004 builds out of the box on Unix, Plan 9, LynxOS, VMS, OS/2, QNX, AmigaOS, and Windows NT. Perl runs on Windows 95 as well, but it cannot be built there, for lack of a reasonable command interpreter.

p5004-Core Changes

Most importantly, many bugs were fixed, including several security problems. See the Changes file in the distribution for details.

p5004-List assignment to %ENV works

%ENV = () and %ENV = @list now work as expected (except on VMS where it generates a fatal error).

p5004-Change to "Can't locate Foo.pm in @INC" error

The error "Can't locate Foo.pm in @INC" now lists the contents of @INC for easier debugging.

p5004-Compilation option: Binary compatibility with 5.003

There is a new Configure question that asks if you want to maintain binary compatibility with Perl 5.003. If you choose binary compatibility, you do not have to recompile your extensions, but you might have symbol conflicts if you embed Perl in another application, just as in the 5.003 release. By default, binary compatibility is preserved at the expense of symbol table pollution.

p5004-$PERL5OPT environment variable

You may now put Perl options in the $PERL5OPT environment variable. Unless Perl is running with taint checks, it will interpret this variable as if its contents had appeared on a "#!perl" line at the beginning of your script, except that hyphens are optional. PERL5OPT may only be used to set the following switches: -[DIMUdmw].

p5004-Limitations on -M, -m, and -T options

The -M and -m options are no longer allowed on the #! line of a script. If a script needs a module, it should invoke it with the use pragma.

The -T option is also forbidden on the #! line of a script, unless it was present on the Perl command line. Due to the way #! works, this usually means that -T must be in the first argument. Thus:

    #!/usr/bin/perl -T -w

will probably work for an executable script invoked as scriptname, while:

    #!/usr/bin/perl -w -T

will probably fail under the same conditions. (Non-Unix systems will probably not follow this rule.) But perl scriptname is guaranteed to fail, since then there is no chance of -T being found on the command line before it is found on the #! line.

p5004-More precise warnings

If you removed the -w option from your Perl 5.003 scripts because it made Perl too verbose, we recommend that you try putting it back when you upgrade to Perl 5.004. Each new perl version tends to remove some undesirable warnings, while adding new warnings that may catch bugs in your scripts.

p5004-Deprecated: Inherited AUTOLOAD for non-methods

Before Perl 5.004, AUTOLOAD functions were looked up as methods (using the @ISA hierarchy), even when the function to be autoloaded was called as a plain function (e.g. Foo::bar()), not a method (e.g. Foo->bar() or $obj->bar()).

Perl 5.005 will use method lookup only for methods' AUTOLOADs. However, there is a significant base of existing code that may be using the old behavior. So, as an interim step, Perl 5.004 issues an optional warning when a non-method uses an inherited AUTOLOAD.

The simple rule is: Inheritance will not work when autoloading non-methods. The simple fix for old code is: In any module that used to depend on inheriting AUTOLOAD for non-methods from a base class named BaseClass, execute *AUTOLOAD = \&BaseClass::AUTOLOAD during startup.

p5004-Previously deprecated %OVERLOAD is no longer usable

Using %OVERLOAD to define overloading was deprecated in 5.003. Overloading is now defined using the overload pragma. %OVERLOAD is still used internally but should not be used by Perl scripts. See overload for more details.

p5004-Subroutine arguments created only when they're modified

In Perl 5.004, nonexistent array and hash elements used as subroutine parameters are brought into existence only if they are actually assigned to (via @_).

Earlier versions of Perl vary in their handling of such arguments. Perl versions 5.002 and 5.003 always brought them into existence. Perl versions 5.000 and 5.001 brought them into existence only if they were not the first argument (which was almost certainly a bug). Earlier versions of Perl never brought them into existence.

For example, given this code:

     undef @a; undef %a;
     sub show { print $_[0] };
     sub change { $_[0]++ };
     show($a[2]);
     change($a{b});

After this code executes in Perl 5.004, $a{b} exists but $a[2] does not. In Perl 5.002 and 5.003, both $a{b} and $a[2] would have existed (but $a[2]'s value would have been undefined).

p5004-Group vector changeable with $)

The $) special variable has always (well, in Perl 5, at least) reflected not only the current effective group, but also the group list as returned by the getgroups() C function (if there is one). However, until this release, there has not been a way to call the setgroups() C function from Perl.

In Perl 5.004, assigning to $) is exactly symmetrical with examining it: The first number in its string value is used as the effective gid; if there are any numbers after the first one, they are passed to the setgroups() C function (if there is one).

p5004-Fixed parsing of $$, &$, etc.

Perl versions before 5.004 misinterpreted any type marker followed by "$" and a digit. For example, "$$0" was incorrectly taken to mean "${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.

However, the developers of Perl 5.004 could not fix this bug completely, because at least two widely-used modules depend on the old meaning of "$$0" in a string. So Perl 5.004 still interprets "$$" in the old (broken) way inside strings; but it generates this message as a warning. And in Perl 5.005, this special treatment will cease.

p5004-Fixed localization of $, $&, etc.

Perl versions before 5.004 did not always properly localize the regex-related special variables. Perl 5.004 does localize them, as the documentation has always said it should. This may result in $1, $2, etc. no longer being set where existing programs use them.

p5004-No resetting of $. on implicit close

The documentation for Perl 5.0 has always stated that $. is not reset when an already-open file handle is reopened with no intervening call to close. Due to a bug, perl versions 5.000 through 5.003 did reset $. under that circumstance; Perl 5.004 does not.

p5004-wantarray may return undef

The wantarray operator returns true if a subroutine is expected to return a list, and false otherwise. In Perl 5.004, wantarray can also return the undefined value if a subroutine's return value will not be used at all, which allows subroutines to avoid a time-consuming calculation of a return value if it isn't going to be used.

p5004-eval EXPR determines value of EXPR in scalar context

Perl (version 5) used to determine the value of EXPR inconsistently, sometimes incorrectly using the surrounding context for the determination. Now, the value of EXPR (before being parsed by eval) is always determined in a scalar context. Once parsed, it is executed as before, by providing the context that the scope surrounding the eval provided. This change makes the behavior Perl4 compatible, besides fixing bugs resulting from the inconsistent behavior. This program:

    @a = qw(time now is time);
    print eval @a;
    print '|', scalar eval @a;

used to print something like "timenowis881399109|4", but now (and in perl4) prints "4|4".

p5004-Changes to tainting checks

A bug in previous versions may have failed to detect some insecure conditions when taint checks are turned on. (Taint checks are used in setuid or setgid scripts, or when explicitly turned on with the -T invocation option.) Although it's unlikely, this may cause a previously-working script to now fail, which should be construed as a blessing since that indicates a potentially-serious security hole was just plugged.

The new restrictions when tainting include:

p5004-No glob() or <*>

These operators may spawn the C shell (csh), which cannot be made safe. This restriction will be lifted in a future version of Perl when globbing is implemented without the use of an external program.

p5004-No spawning if tainted $CDPATH, $ENV, $BASH_ENV

These environment variables may alter the behavior of spawned programs (especially shells) in ways that subvert security. So now they are treated as dangerous, in the manner of $IFS and $PATH.

p5004-No spawning if tainted $TERM doesn't look like a terminal name

Some termcap libraries do unsafe things with $TERM. However, it would be unnecessarily harsh to treat all $TERM values as unsafe, since only shell metacharacters can cause trouble in $TERM. So a tainted $TERM is considered to be safe if it contains only alphanumerics, underscores, dashes, and colons, and unsafe if it contains other characters (including whitespace).

p5004-New Opcode module and revised Safe module

A new Opcode module supports the creation, manipulation and application of opcode masks. The revised Safe module has a new API and is implemented using the new Opcode module. Please read the new Opcode and Safe documentation.

p5004-Embedding improvements

In older versions of Perl it was not possible to create more than one Perl interpreter instance inside a single process without leaking like a sieve and/or crashing. The bugs that caused this behavior have all been fixed. However, you still must take care when embedding Perl in a C program. See the updated perlembed manpage for tips on how to manage your interpreters.

p5004-Internal change: FileHandle class based on IO::* classes

File handles are now stored internally as type IO::Handle. The FileHandle module is still supported for backwards compatibility, but it is now merely a front end to the IO::* modules, specifically IO::Handle, IO::Seekable, and IO::File. We suggest, but do not require, that you use the IO::* modules in new code.

In harmony with this change, *GLOB{FILEHANDLE} is now just a backward-compatible synonym for *GLOB{IO}.

p5004-Internal change: PerlIO abstraction interface

It is now possible to build Perl with AT&T's sfio IO package instead of stdio. See perlapio for more details, and the INSTALL file for how to use it.

p5004-New and changed syntax

p5004-$coderef->(PARAMS)

A subroutine reference may now be suffixed with an arrow and a (possibly empty) parameter list. This syntax denotes a call of the referenced subroutine, with the given parameters (if any).

This new syntax follows the pattern of $hashref->{FOO} and $aryref->[$foo]: You may now write &$subref($foo) as $subref->($foo). All these arrow terms may be chained; thus, &{$table->{FOO}}($bar) may now be written $table->{FOO}->($bar).

p5004-New and changed builtin constants

p5004-__PACKAGE__

The current package name at compile time, or the undefined value if there is no current package (due to a package; directive). Like __FILE__ and __LINE__, __PACKAGE__ does not interpolate into strings.

p5004-New and changed builtin variables

p5004-$^E

Extended error message on some platforms. (Also known as $EXTENDED_OS_ERROR if you use English).

p5004-$^H

The current set of syntax checks enabled by use strict. See the documentation of strict for more details. Not actually new, but newly documented. Because it is intended for internal use by Perl core components, there is no use English long name for this variable.

p5004-$^M

By default, running out of memory it is not trappable. However, if compiled for this, Perl may use the contents of $^M as an emergency pool after die()ing with this message. Suppose that your Perl were compiled with -DPERL_EMERGENCY_SBRK and used Perl's malloc. Then

    $^M = 'a' x (1<<16);

would allocate a 64K buffer for use when in emergency. See the INSTALL file for information on how to enable this option. As a disincentive to casual use of this advanced feature, there is no use English long name for this variable.

p5004-New and changed builtin functions

p5004-delete on slices

This now works. (e.g. delete @ENV{'PATH', 'MANPATH'})

p5004-flock

is now supported on more platforms, prefers fcntl to lockf when emulating, and always flushes before (un)locking.

p5004-printf and sprintf

Perl now implements these functions itself; it doesn't use the C library function sprintf() any more, except for floating-point numbers, and even then only known flags are allowed. As a result, it is now possible to know which conversions and flags will work, and what they will do.

The new conversions in Perl's sprintf() are:

   %i   a synonym for %d
   %p   a pointer (the address of the Perl value, in hexadecimal)
   %n   special: *stores* the number of characters output so far
        into the next variable in the parameter list 

The new flags that go between the % and the conversion are:

   #    prefix octal with "0", hex with "0x"
   h    interpret integer as C type "short" or "unsigned short"
   V    interpret integer as Perl's standard integer type

Also, where a number would appear in the flags, an asterisk ("*") may be used instead, in which case Perl uses the next item in the parameter list as the given number (that is, as the field width or precision). If a field width obtained through "*" is negative, it has the same effect as the '-' flag: left-justification.

See "sprintf" in perlfunc for a complete list of conversion and flags.

p5004-keys as an lvalue

As an lvalue, keys allows you to increase the number of hash buckets allocated for the given hash. This can gain you a measure of efficiency if you know the hash is going to get big. (This is similar to pre-extending an array by assigning a larger number to $#array.) If you say

    keys %hash = 200;

then %hash will have at least 200 buckets allocated for it. These buckets will be retained even if you do %hash = (); use undef %hash if you want to free the storage while %hash is still in scope. You can't shrink the number of buckets allocated for the hash using keys in this way (but you needn't worry about doing this by accident, as trying has no effect).

p5004-my() in Control Structures

You can now use my() (with or without the parentheses) in the control expressions of control structures such as:

    while (defined(my $line = <>)) {
        $line = lc $line;
    } continue {
        print $line;
    }

    if ((my $answer = ) =~ /^y(es)?$/i) {
        user_agrees();
    } elsif ($answer =~ /^n(o)?$/i) {
        user_disagrees();
    } else {
        chomp $answer;
        die "`$answer' is neither `yes' nor `no'";
    }

Also, you can declare a foreach loop control variable as lexical by preceding it with the word "my". For example, in:

    foreach my $i (1, 2, 3) {
        some_function();
    }

$i is a lexical variable, and the scope of $i extends to the end of the loop, but not beyond it.

Note that you still cannot use my() on global punctuation variables such as $_ and the like.

p5004-pack() and unpack()

A new format 'w' represents a BER compressed integer (as defined in ASN.1). Its format is a sequence of one or more bytes, each of which provides seven bits of the total value, with the most significant first. Bit eight of each byte is set, except for the last byte, in which bit eight is clear.

If 'p' or 'P' are given undef as values, they now generate a NULL pointer.

Both pack() and unpack() now fail when their templates contain invalid types. (Invalid types used to be ignored.)

p5004-sysseek()

The new sysseek() operator is a variant of seek() that sets and gets the file's system read/write position, using the lseek(2) system call. It is the only reliable way to seek before using sysread() or syswrite(). Its return value is the new position, or the undefined value on failure.

p5004-use VERSION

If the first argument to use is a number, it is treated as a version number instead of a module name. If the version of the Perl interpreter is less than VERSION, then an error message is printed and Perl exits immediately. Because use occurs at compile time, this check happens immediately during the compilation process, unlike require VERSION, which waits until runtime for the check. This is often useful if you need to check the current Perl version before useing library modules which have changed in incompatible ways from older versions of Perl. (We try not to do this more than we have to.)

p5004-use Module VERSION LIST

If the VERSION argument is present between Module and LIST, then the use will call the VERSION method in class Module with the given version as an argument. The default VERSION method, inherited from the UNIVERSAL class, croaks if the given version is larger than the value of the variable $Module::VERSION. (Note that there is not a comma after VERSION!)

This version-checking mechanism is similar to the one currently used in the Exporter module, but it is faster and can be used with modules that don't use the Exporter. It is the recommended method for new code.

p5004-prototype(FUNCTION)

Returns the prototype of a function as a string (or undef if the function has no prototype). FUNCTION is a reference to or the name of the function whose prototype you want to retrieve. (Not actually new; just never documented before.)

p5004-srand

The default seed for srand, which used to be time, has been changed. Now it's a heady mix of difficult-to-predict system-dependent values, which should be sufficient for most everyday purposes.

Previous to version 5.004, calling rand without first calling srand would yield the same sequence of random numbers on most or all machines. Now, when perl sees that you're calling rand and haven't yet called srand, it calls srand with the default seed. You should still call srand manually if your code might ever be run on a pre-5.004 system, of course, or if you want a seed other than the default.

p5004-$_ as Default

Functions documented in the Camel to default to $_ now in fact do, and all those that do are so documented in perlfunc.

p5004-m//gc does not reset search position on failure

The m//g match iteration construct has always reset its target string's search position (which is visible through the pos operator) when a match fails; as a result, the next m//g match after a failure starts again at the beginning of the string. With Perl 5.004, this reset may be disabled by adding the "c" (for "continue") modifier, i.e. m//gc. This feature, in conjunction with the \G zero-width assertion, makes it possible to chain matches together. See perlop and perlre.

p5004-m//x ignores whitespace before ?*+{}

The m//x construct has always been intended to ignore all unescaped whitespace. However, before Perl 5.004, whitespace had the effect of escaping repeat modifiers like "*" or "?"; for example, /a *b/x was (mis)interpreted as /a\*b/x. This bug has been fixed in 5.004.

p5004-nested sub{} closures work now

Prior to the 5.004 release, nested anonymous functions didn't work right. They do now.

p5004-formats work right on changing lexicals

Just like anonymous functions that contain lexical variables that change (like a lexical index variable for a foreach loop), formats now work properly. For example, this silently failed before (printed only zeros), but is fine now:

    my $i;
    foreach $i ( 1 .. 10 ) {
        write;
    }
    format =
        my i is @#
        $i
    .

However, it still fails (without a warning) if the foreach is within a subroutine:

    my $i;
    sub foo {
      foreach $i ( 1 .. 10 ) {
        write;
      }
    }
    foo;
    format =
        my i is @#
        $i
    .

p5004-New builtin methods

The UNIVERSAL package automatically contains the following methods that are inherited by all other classes:

p5004-isa(CLASS)

isa returns true if its object is blessed into a subclass of CLASS

isa is also exportable and can be called as a sub with two arguments. This allows the ability to check what a reference points to. Example:

    use UNIVERSAL qw(isa);

    if(isa($ref, 'ARRAY')) {
       ...
    }
p5004-can(METHOD)

can checks to see if its object has a method called METHOD, if it does then a reference to the sub is returned; if it does not then undef is returned.

p5004-VERSION( [NEED] )

VERSION returns the version number of the class (package). If the NEED argument is given then it will check that the current version (as defined by the $VERSION variable in the given package) not less than NEED; it will die if this is not the case. This method is normally called as a class method. This method is called automatically by the VERSION form of use.

    use A 1.2 qw(some imported subs);
    # implies:
    A->VERSION(1.2);

NOTE: can directly uses Perl's internal code for method lookup, and isa uses a very similar method and caching strategy. This may cause strange effects if the Perl code dynamically changes @ISA in any package.

You may add other methods to the UNIVERSAL class via Perl or XS code. You do not need to use UNIVERSAL in order to make these methods available to your program. This is necessary only if you wish to have isa available as a plain subroutine in the current package.

p5004-TIEHANDLE now supported

See perltie for other kinds of tie()s.

p5004-TIEHANDLE classname, LIST

This is the constructor for the class. That means it is expected to return an object of some sort. The reference can be used to hold some internal information.

    sub TIEHANDLE {
        print "\n";
        my $i;
        return bless \$i, shift;
    }
p5004-PRINT this, LIST

This method will be triggered every time the tied handle is printed to. Beyond its self reference it also expects the list that was passed to the print function.

    sub PRINT {
        $r = shift;
        $$r++;
        return print join( $, => map {uc} @_), $\;
    }
p5004-PRINTF this, LIST

This method will be triggered every time the tied handle is printed to with the printf() function. Beyond its self reference it also expects the format and list that was passed to the printf function.

    sub PRINTF {
        shift;
          my $fmt = shift;
        print sprintf($fmt, @_)."\n";
    }
p5004-READ this LIST

This method will be called when the handle is read from via the read or sysread functions.

    sub READ {
        $r = shift;
        my($buf,$len,$offset) = @_;
        print "READ called, \$buf=$buf, \$len=$len, \$offset=$offset";
    }
p5004-READLINE this

This method will be called when the handle is read from. The method should return undef when there is no more data.

    sub READLINE {
        $r = shift;
        return "PRINT called $$r times\n"
    }
p5004-GETC this

This method will be called when the getc function is called.

    sub GETC { print "Don't GETC, Get Perl"; return "a"; }
p5004-DESTROY this

As with the other types of ties, this method will be called when the tied handle is about to be destroyed. This is useful for debugging and possibly for cleaning up.

    sub DESTROY {
        print "\n";
    }

p5004-Malloc enhancements

If perl is compiled with the malloc included with the perl distribution (that is, if perl -V:d_mymalloc is 'define') then you can print memory statistics at runtime by running Perl thusly:

  env PERL_DEBUG_MSTATS=2 perl your_script_here

The value of 2 means to print statistics after compilation and on exit; with a value of 1, the statistics are printed only on exit. (If you want the statistics at an arbitrary time, you'll need to install the optional module Devel::Peek.)

Three new compilation flags are recognized by malloc.c. (They have no effect if perl is compiled with system malloc().)

p5004--DPERL_EMERGENCY_SBRK

If this macro is defined, running out of memory need not be a fatal error: a memory pool can allocated by assigning to the special variable $^M. See "p5004-$^M".

p5004--DPACK_MALLOC

Perl memory allocation is by bucket with sizes close to powers of two. Because of these malloc overhead may be big, especially for data of size exactly a power of two. If PACK_MALLOC is defined, perl uses a slightly different algorithm for small allocations (up to 64 bytes long), which makes it possible to have overhead down to 1 byte for allocations which are powers of two (and appear quite often).

Expected memory savings (with 8-byte alignment in alignbytes) is about 20% for typical Perl usage. Expected slowdown due to additional malloc overhead is in fractions of a percent (hard to measure, because of the effect of saved memory on speed).

p5004--DTWO_POT_OPTIMIZE

Similarly to PACK_MALLOC, this macro improves allocations of data with size close to a power of two; but this works for big allocations (starting with 16K by default). Such allocations are typical for big hashes and special-purpose scripts, especially image processing.

On recent systems, the fact that perl requires 2M from system for 1M allocation will not affect speed of execution, since the tail of such a chunk is not going to be touched (and thus will not require real memory). However, it may result in a premature out-of-memory error. So if you will be manipulating very large blocks with sizes close to powers of two, it would be wise to define this macro.

Expected saving of memory is 0-100% (100% in applications which require most memory in such 2**n chunks); expected slowdown is negligible.

p5004-Miscellaneous efficiency enhancements

Functions that have an empty prototype and that do nothing but return a fixed value are now inlined (e.g. sub PI () { 3.14159 }).

Each unique hash key is only allocated once, no matter how many hashes have an entry with that key. So even if you have 100 copies of the same hash, the hash keys never have to be reallocated.

p5004-Support for More Operating Systems

Support for the following operating systems is new in Perl 5.004.

p5004-Win32

Perl 5.004 now includes support for building a "native" perl under Windows NT, using the Microsoft Visual C++ compiler (versions 2.0 and above) or the Borland C++ compiler (versions 5.02 and above). The resulting perl can be used under Windows 95 (if it is installed in the same directory locations as it got installed in Windows NT). This port includes support for perl extension building tools like MakeMaker and h2xs, so that many extensions available on the Comprehensive Perl Archive Network (CPAN) can now be readily built under Windows NT. See http://www.perl.com/ for more information on CPAN and README.win32 in the perl distribution for more details on how to get started with building this port.

There is also support for building perl under the Cygwin32 environment. Cygwin32 is a set of GNU tools that make it possible to compile and run many Unix programs under Windows NT by providing a mostly Unix-like interface for compilation and execution. See README.cygwin32 in the perl distribution for more details on this port and how to obtain the Cygwin32 toolkit.

p5004-Plan 9

See README.plan9 in the perl distribution.

p5004-QNX

See README.qnx in the perl distribution.

p5004-AmigaOS

See README.amigaos in the perl distribution.

p5004-Pragmata

Six new pragmatic modules exist:

p5004-use autouse MODULE => qw(sub1 sub2 sub3)

Defers require MODULE until someone calls one of the specified subroutines (which must be exported by MODULE). This pragma should be used with caution, and only when necessary.

p5004-use blib
p5004-use blib 'dir'

Looks for MakeMaker-like 'blib' directory structure starting in dir (or current directory) and working back up to five levels of parent directories.

Intended for use on command line with -M option as a way of testing arbitrary scripts against an uninstalled version of a package.

p5004-use constant NAME => VALUE

Provides a convenient interface for creating compile-time constants, See "Constant Functions" in perlsub.

p5004-use locale

Tells the compiler to enable (or disable) the use of POSIX locales for builtin operations.

When use locale is in effect, the current LC_CTYPE locale is used for regular expressions and case mapping; LC_COLLATE for string ordering; and LC_NUMERIC for numeric formatting in printf and sprintf (but not in print). LC_NUMERIC is always used in write, since lexical scoping of formats is problematic at best.

Each use locale or no locale affects statements to the end of the enclosing BLOCK or, if not inside a BLOCK, to the end of the current file. Locales can be switched and queried with POSIX::setlocale().

See perllocale for more information.

p5004-use ops

Disable unsafe opcodes, or any named opcodes, when compiling Perl code.

p5004-use vmsish

Enable VMS-specific language features. Currently, there are three VMS-specific features available: 'status', which makes $? and system return genuine VMS status values instead of emulating POSIX; 'exit', which makes exit take a genuine VMS status value instead of assuming that exit 1 is an error; and 'time', which makes all times relative to the local time zone, in the VMS tradition.

p5004-Modules

p5004-Required Updates

Though Perl 5.004 is compatible with almost all modules that work with Perl 5.003, there are a few exceptions:

    Module   Required Version for Perl 5.004
    ------   -------------------------------
    Filter   Filter-1.12
    LWP      libwww-perl-5.08
    Tk       Tk400.202 (-w makes noise)

Also, the majordomo mailing list program, version 1.94.1, doesn't work with Perl 5.004 (nor with perl 4), because it executes an invalid regular expression. This bug is fixed in majordomo version 1.94.2.

p5004-Installation directories

The installperl script now places the Perl source files for extensions in the architecture-specific library directory, which is where the shared libraries for extensions have always been. This change is intended to allow administrators to keep the Perl 5.004 library directory unchanged from a previous version, without running the risk of binary incompatibility between extensions' Perl source and shared libraries.

p5004-Module information summary

Brand new modules, arranged by topic rather than strictly alphabetically:

    CGI.pm               Web server interface ("Common Gateway Interface")
    CGI/Apache.pm        Support for Apache's Perl module
    CGI/Carp.pm          Log server errors with helpful context
    CGI/Fast.pm          Support for FastCGI (persistent server process)
    CGI/Push.pm          Support for server push
    CGI/Switch.pm        Simple interface for multiple server types

    CPAN                 Interface to Comprehensive Perl Archive Network
    CPAN::FirstTime      Utility for creating CPAN configuration file
    CPAN::Nox            Runs CPAN while avoiding compiled extensions

    IO.pm                Top-level interface to IO::* classes
    IO/File.pm           IO::File extension Perl module
    IO/Handle.pm         IO::Handle extension Perl module
    IO/Pipe.pm           IO::Pipe extension Perl module
    IO/Seekable.pm       IO::Seekable extension Perl module
    IO/Select.pm         IO::Select extension Perl module
    IO/Socket.pm         IO::Socket extension Perl module

    Opcode.pm            Disable named opcodes when compiling Perl code

    ExtUtils/Embed.pm    Utilities for embedding Perl in C programs
    ExtUtils/testlib.pm  Fixes up @INC to use just-built extension

    FindBin.pm           Find path of currently executing program

    Class/Struct.pm      Declare struct-like datatypes as Perl classes
    File/stat.pm         By-name interface to Perl's builtin stat
    Net/hostent.pm       By-name interface to Perl's builtin gethost*
    Net/netent.pm        By-name interface to Perl's builtin getnet*
    Net/protoent.pm      By-name interface to Perl's builtin getproto*
    Net/servent.pm       By-name interface to Perl's builtin getserv*
    Time/gmtime.pm       By-name interface to Perl's builtin gmtime
    Time/localtime.pm    By-name interface to Perl's builtin localtime
    Time/tm.pm           Internal object for Time::{gm,local}time
    User/grent.pm        By-name interface to Perl's builtin getgr*
    User/pwent.pm        By-name interface to Perl's builtin getpw*

    Tie/RefHash.pm       Base class for tied hashes with references as keys

    UNIVERSAL.pm         Base class for *ALL* classes

p5004-Fcntl

New constants in the existing Fcntl modules are now supported, provided that your operating system happens to support them:

    F_GETOWN F_SETOWN
    O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC
    O_EXLOCK O_SHLOCK

These constants are intended for use with the Perl operators sysopen() and fcntl() and the basic database modules like SDBM_File. For the exact meaning of these and other Fcntl constants please refer to your operating system's documentation for fcntl() and open().

In addition, the Fcntl module now provides these constants for use with the Perl operator flock():

        LOCK_SH LOCK_EX LOCK_NB LOCK_UN

These constants are defined in all environments (because where there is no flock() system call, Perl emulates it). However, for historical reasons, these constants are not exported unless they are explicitly requested with the ":flock" tag (e.g. use Fcntl ':flock').

p5004-IO

The IO module provides a simple mechanism to load all the IO modules at one go. Currently this includes:

     IO::Handle
     IO::Seekable
     IO::File
     IO::Pipe
     IO::Socket

For more information on any of these modules, please see its respective documentation.

p5004-Math::Complex

The Math::Complex module has been totally rewritten, and now supports more operations. These are overloaded:

     + - * / ** <=> neg ~ abs sqrt exp log sin cos atan2 "" (stringify)

And these functions are now exported:

    pi i Re Im arg
    log10 logn ln cbrt root
    tan
    csc sec cot
    asin acos atan
    acsc asec acot
    sinh cosh tanh
    csch sech coth
    asinh acosh atanh
    acsch asech acoth
    cplx cplxe

p5004-Math::Trig

This new module provides a simpler interface to parts of Math::Complex for those who need trigonometric functions only for real numbers.

p5004-DB_File

There have been quite a few changes made to DB_File. Here are a few of the highlights:

Refer to the HISTORY section in DB_File.pm for a complete list of changes. Everything after DB_File 1.01 has been added since 5.003.

p5004-Net::Ping

Major rewrite - support added for both udp echo and real icmp pings.

p5004-Object-oriented overrides for builtin operators

Many of the Perl builtins returning lists now have object-oriented overrides. These are:

    File::stat
    Net::hostent
    Net::netent
    Net::protoent
    Net::servent
    Time::gmtime
    Time::localtime
    User::grent
    User::pwent

For example, you can now say

    use File::stat;
    use User::pwent;
    $his = (stat($filename)->st_uid == pwent($whoever)->pw_uid);

p5004-Utility Changes

p5004-pod2html

p5004-Sends converted HTML to standard output

The pod2html utility included with Perl 5.004 is entirely new. By default, it sends the converted HTML to its standard output, instead of writing it to a file like Perl 5.003's pod2html did. Use the --outfile=FILENAME option to write to a file.

p5004-xsubpp

p5004-void XSUBs now default to returning nothing

Due to a documentation/implementation bug in previous versions of Perl, XSUBs with a return type of void have actually been returning one value. Usually that value was the GV for the XSUB, but sometimes it was some already freed or reused value, which would sometimes lead to program failure.

In Perl 5.004, if an XSUB is declared as returning void, it actually returns no value, i.e. an empty list (though there is a backward-compatibility exception; see below). If your XSUB really does return an SV, you should give it a return type of SV *.

For backward compatibility, xsubpp tries to guess whether a void XSUB is really void or if it wants to return an SV *. It does so by examining the text of the XSUB: if xsubpp finds what looks like an assignment to ST(0), it assumes that the XSUB's return type is really SV *.

p5004-C Language API Changes

p5004-gv_fetchmethod and perl_call_sv

The gv_fetchmethod function finds a method for an object, just like in Perl 5.003. The GV it returns may be a method cache entry. However, in Perl 5.004, method cache entries are not visible to users; therefore, they can no longer be passed directly to perl_call_sv. Instead, you should use the GvCV macro on the GV to extract its CV, and pass the CV to perl_call_sv.

The most likely symptom of passing the result of gv_fetchmethod to perl_call_sv is Perl's producing an "Undefined subroutine called" error on the second call to a given method (since there is no cache on the first call).

p5004-perl_eval_pv

A new function handy for eval'ing strings of Perl code inside C code. This function returns the value from the eval statement, which can be used instead of fetching globals from the symbol table. See perlguts, perlembed and perlcall for details and examples.

p5004-Extended API for manipulating hashes

Internal handling of hash keys has changed. The old hashtable API is still fully supported, and will likely remain so. The additions to the API allow passing keys as SV*s, so that tied hashes can be given real scalars as keys rather than plain strings (nontied hashes still can only use strings as keys). New extensions must use the new hash access functions and macros if they wish to use SV* keys. These additions also make it feasible to manipulate HE*s (hash entries), which can be more efficient. See perlguts for details.

p5004-Documentation Changes

Many of the base and library pods were updated. These new pods are included in section 1:

p5004-perldelta

This document.

p5004-perlfaq

Frequently asked questions.

p5004-perllocale

Locale support (internationalization and localization).

p5004-perltoot

Tutorial on Perl OO programming.

p5004-perlapio

Perl internal IO abstraction interface.

p5004-perlmodlib

Perl module library and recommended practice for module creation. Extracted from perlmod (which is much smaller as a result).

p5004-perldebug

Although not new, this has been massively updated.

p5004-perlsec

Although not new, this has been massively updated.

p5004-New Diagnostics

Several new conditions will trigger warnings that were silent before. Some only affect certain platforms. The following new warnings and errors outline these. These messages are classified as follows (listed in increasing order of desperation):

   (W) A warning (optional).
   (D) A deprecation (optional).
   (S) A severe warning (mandatory).
   (F) A fatal error (trappable).
   (P) An internal error you should never see (trappable).
   (X) A very fatal error (nontrappable).
   (A) An alien error message (not generated by Perl).
p5004-"my" variable %s masks earlier declaration in same scope

(W) A lexical variable has been redeclared in the same scope, effectively eliminating all access to the previous instance. This is almost always a typographical error. Note that the earlier variable will still exist until the end of the scope or until all closure referents to it are destroyed.

p5004-%s argument is not a HASH element or slice

(F) The argument to delete() must be either a hash element, such as

    $foo{$bar}
    $ref->[12]->{"susie"}

or a hash slice, such as

    @foo{$bar, $baz, $xyzzy}
    @{$ref->[12]}{"susie", "queue"}
p5004-Allocation too large: %lx

(X) You can't allocate more than 64K on an MS-DOS machine.

p5004-Allocation too large

(F) You can't allocate more than 2^31+"small amount" bytes.

p5004-Applying %s to %s will act on scalar(%s)

(W) The pattern match (//), substitution (s///), and transliteration (tr///) operators work on scalar values. If you apply one of them to an array or a hash, it will convert the array or hash to a scalar value (the length of an array or the population info of a hash) and then work on that scalar value. This is probably not what you meant to do. See "grep" in perlfunc and "map" in perlfunc for alternatives.

p5004-Attempt to free nonexistent shared string

(P) Perl maintains a reference counted internal table of strings to optimize the storage and access of hash keys and other strings. This indicates someone tried to decrement the reference count of a string that can no longer be found in the table.

p5004-Attempt to use reference as lvalue in substr

(W) You supplied a reference as the first argument to substr() used as an lvalue, which is pretty strange. Perhaps you forgot to dereference it first. See "substr" in perlfunc.

p5004-Bareword "%s" refers to nonexistent package

(W) You used a qualified bareword of the form Foo::, but the compiler saw no other uses of that namespace before that point. Perhaps you need to predeclare a package?

p5004-Can't redefine active sort subroutine %s

(F) Perl optimizes the internal handling of sort subroutines and keeps pointers into them. You tried to redefine one such sort subroutine when it was currently active, which is not allowed. If you really want to do this, you should write sort { &func } @x instead of sort func @x.

p5004-Can't use bareword ("%s") as %s ref while "strict refs" in use

(F) Only hard references are allowed by "strict refs". Symbolic references are disallowed. See perlref.

p5004-Cannot resolve method `%s' overloading `%s' in package `%s'

(P) Internal error trying to resolve overloading specified by a method name (as opposed to a subroutine reference).

p5004-Constant subroutine %s redefined

(S) You redefined a subroutine which had previously been eligible for inlining. See "Constant Functions" in perlsub for commentary and workarounds.

p5004-Constant subroutine %s undefined

(S) You undefined a subroutine which had previously been eligible for inlining. See "Constant Functions" in perlsub for commentary and workarounds.

p5004-Copy method did not return a reference

(F) The method which overloads "=" is buggy. See "Copy Constructor" in overload.

p5004-Died

(F) You passed die() an empty string (the equivalent of die "") or you called it with no args and both $@ and $_ were empty.

p5004-Exiting pseudo-block via %s

(W) You are exiting a rather special block construct (like a sort block or subroutine) by unconventional means, such as a goto, or a loop control statement. See "sort" in perlfunc.

p5004-Identifier too long

(F) Perl limits identifiers (names for variables, functions, etc.) to 252 characters for simple names, somewhat more for compound names (like $A::B). You've exceeded Perl's limits. Future versions of Perl are likely to eliminate these arbitrary limitations.

p5004-Illegal character %s (carriage return)

(F) A carriage return character was found in the input. This is an error, and not a warning, because carriage return characters can break multi-line strings, including here documents (e.g., print <).

p5004-Illegal switch in PERL5OPT: %s

(X) The PERL5OPT environment variable may only be used to set the following switches: -[DIMUdmw].

p5004-Integer overflow in hex number

(S) The literal hex number you have specified is too big for your architecture. On a 32-bit architecture the largest hex literal is 0xFFFFFFFF.

p5004-Integer overflow in octal number

(S) The literal octal number you have specified is too big for your architecture. On a 32-bit architecture the largest octal literal is 037777777777.

p5004-internal error: glob failed

(P) Something went wrong with the external program(s) used for glob and <*.c>. This may mean that your csh (C shell) is broken. If so, you should change all of the csh-related variables in config.sh: If you have tcsh, make the variables refer to it as if it were csh (e.g. full_csh='/usr/bin/tcsh'); otherwise, make them all empty (except that d_csh should be 'undef') so that Perl will think csh is missing. In either case, after editing config.sh, run ./Configure -S and rebuild Perl.

p5004-Invalid conversion in %s: "%s"

(W) Perl does not understand the given format conversion. See "sprintf" in perlfunc.

p5004-Invalid type in pack: '%s'

(F) The given character is not a valid pack type. See "pack" in perlfunc.

p5004-Invalid type in unpack: '%s'

(F) The given character is not a valid unpack type. See "unpack" in perlfunc.

p5004-Name "%s::%s" used only once: possible typo

(W) Typographical errors often show up as unique variable names. If you had a good reason for having a unique name, then just mention it again somehow to suppress the message (the use vars pragma is provided for just this purpose).

p5004-Null picture in formline

(F) The first argument to formline must be a valid format picture specification. It was found to be empty, which probably means you supplied it an uninitialized value. See perlform.

p5004-Offset outside string

(F) You tried to do a read/write/send/recv operation with an offset pointing outside the buffer. This is difficult to imagine. The sole exception to this is that sysread()ing past the buffer will extend the buffer and zero pad the new area.

p5004-Out of memory!

(X|F) The malloc() function returned 0, indicating there was insufficient remaining memory (or virtual memory) to satisfy the request.

The request was judged to be small, so the possibility to trap it depends on the way Perl was compiled. By default it is not trappable. However, if compiled for this, Perl may use the contents of $^M as an emergency pool after die()ing with this message. In this case the error is trappable once.

p5004-Out of memory during request for %s

(F) The malloc() function returned 0, indicating there was insufficient remaining memory (or virtual memory) to satisfy the request. However, the request was judged large enough (compile-time default is 64K), so a possibility to shut down by trapping this error is granted.

p5004-panic: frexp

(P) The library function frexp() failed, making printf("%f") impossible.

p5004-Possible attempt to put comments in qw() list

(W) qw() lists contain items separated by whitespace; as with literal strings, comment characters are not ignored, but are instead treated as literal data. (You may have used different delimiters than the parentheses shown here; braces are also frequently used.)

You probably wrote something like this:

    @list = qw(
        a # a comment
        b # another comment
    );

when you should have written this:

    @list = qw(
        a
        b
    );

If you really want comments, build your list the old-fashioned way, with quotes and commas:

    @list = (
        'a',    # a comment
        'b',    # another comment
    );
p5004-Possible attempt to separate words with commas

(W) qw() lists contain items separated by whitespace; therefore commas aren't needed to separate the items. (You may have used different delimiters than the parentheses shown here; braces are also frequently used.)

You probably wrote something like this:

    qw! a, b, c !;

which puts literal commas into some of the list items. Write it without commas if you don't want them to appear in your data:

    qw! a b c !;
p5004-Scalar value @%s{%s} better written as $%s{%s}

(W) You've used a hash slice (indicated by @) to select a single element of a hash. Generally it's better to ask for a scalar value (indicated by $). The difference is that $foo{&bar} always behaves like a scalar, both when assigning to it and when evaluating its argument, while @foo{&bar} behaves like a list when you assign to it, and provides a list context to its subscript, which can do weird things if you're expecting only one subscript.

p5004-Stub found while resolving method `%s' overloading `%s' in %s

(P) Overloading resolution over @ISA tree may be broken by importing stubs. Stubs should never be implicitly created, but explicit calls to can may break this.

p5004-Too late for "-T" option

(X) The #! line (or local equivalent) in a Perl script contains the -T option, but Perl was not invoked with -T in its argument list. This is an error because, by the time Perl discovers a -T in a script, it's too late to properly taint everything from the environment. So Perl gives up.

p5004-untie attempted while %d inner references still exist

(W) A copy of the object returned from tie (or tied) was still valid when untie was called.

p5004-Unrecognized character %s

(F) The Perl parser has no idea what to do with the specified character in your Perl script (or eval). Perhaps you tried to run a compressed script, a binary program, or a directory as a Perl program.

p5004-Unsupported function fork

(F) Your version of executable does not support forking.

Note that under some systems, like OS/2, there may be different flavors of Perl executables, some of which may support fork, some not. Try changing the name you call Perl by to perl_, perl__, and so on.

"_to_mean_"${$}"_is_deprecated" >p5004-Use of "$$" to mean "${$}" is deprecated

(D) Perl versions before 5.004 misinterpreted any type marker followed by "$" and a digit. For example, "$$0" was incorrectly taken to mean "${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.

However, the developers of Perl 5.004 could not fix this bug completely, because at least two widely-used modules depend on the old meaning of "$$0" in a string. So Perl 5.004 still interprets "$$" in the old (broken) way inside strings; but it generates this message as a warning. And in Perl 5.005, this special treatment will cease.

p5004-Value of %s can be "0"; test with defined()

(W) In a conditional expression, you used , <*> (glob), each(), or readdir() as a boolean value. Each of these constructs can return a value of "0"; that would make the conditional expression false, which is probably not what you intended. When using these constructs in conditional expressions, test their values with the defined operator.

p5004-Variable "%s" may be unavailable

(W) An inner (nested) anonymous subroutine is inside a named subroutine, and outside that is another subroutine; and the anonymous (innermost) subroutine is referencing a lexical variable defined in the outermost subroutine. For example:

   sub outermost { my $a; sub middle { sub { $a } } }

If the anonymous subroutine is called or referenced (directly or indirectly) from the outermost subroutine, it will share the variable as you would expect. But if the anonymous subroutine is called or referenced when the outermost subroutine is not active, it will see the value of the shared variable as it was before and during the *first* call to the outermost subroutine, which is probably not what you want.

In these circumstances, it is usually best to make the middle subroutine anonymous, using the sub {} syntax. Perl has specific support for shared variables in nested anonymous subroutines; a named subroutine in between interferes with this feature.

p5004-Variable "%s" will not stay shared

(W) An inner (nested) named subroutine is referencing a lexical variable defined in an outer subroutine.

When the inner subroutine is called, it will probably see the value of the outer subroutine's variable as it was before and during the *first* call to the outer subroutine; in this case, after the first call to the outer subroutine is complete, the inner and outer subroutines will no longer share a common value for the variable. In other words, the variable will no longer be shared.

Furthermore, if the outer subroutine is anonymous and references a lexical variable outside itself, then the outer and inner subroutines will never share the given variable.

This problem can usually be solved by making the inner subroutine anonymous, using the sub {} syntax. When inner anonymous subs that reference variables in outer subroutines are called or referenced, they are automatically rebound to the current values of such variables.

p5004-Warning: something's wrong

(W) You passed warn() an empty string (the equivalent of warn "") or you called it with no args and $_ was empty.

p5004-Ill-formed logical name |%s| in prime_env_iter

(W) A warning peculiar to VMS. A logical name was encountered when preparing to iterate over %ENV which violates the syntactic rules governing logical names. Since it cannot be translated normally, it is skipped, and will not appear in %ENV. This may be a benign occurrence, as some software packages might directly modify logical name tables and introduce nonstandard names, or it may indicate that a logical name table has been corrupted.

p5004-Got an error from DosAllocMem

(P) An error peculiar to OS/2. Most probably you're using an obsolete version of Perl, and this should not happen anyway.

p5004-Malformed PERLLIB_PREFIX

(F) An error peculiar to OS/2. PERLLIB_PREFIX should be of the form

    prefix1;prefix2

or

    prefix1 prefix2

with nonempty prefix1 and prefix2. If prefix1 is indeed a prefix of a builtin library search path, prefix2 is substituted. The error may appear if components are not found, or are too long. See "PERLLIB_PREFIX" in README.os2.

p5004-PERL_SH_DIR too long

(F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the sh-shell in. See "PERL_SH_DIR" in README.os2.

p5004-Process terminated by SIG%s

(W) This is a standard message issued by OS/2 applications, while *nix applications die in silence. It is considered a feature of the OS/2 port. One can easily disable this by appropriate sighandlers, see "Signals" in perlipc. See also "Process terminated by SIGTERM/SIGINT" in README.os2.

p5004-BUGS

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

If you believe you have an unreported bug, please run the perlbug program included with your release. Make sure you 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.com> to be analysed by the Perl porting team.

p5004-SEE ALSO

The Changes file for exhaustive details on what changed.

The INSTALL file for how to build Perl. This file has been significantly updated for 5.004, so even veteran users should look through it.

The README file for general stuff.

The Copying file for copyright information.

p5004-HISTORY

Constructed by Tom Christiansen, grabbing material with permission from innumerable contributors, with kibitzing by more than a few Perl porters.

Last update: Wed May 14 11:14:09 EDT 1997