.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERL594DELTA 1" .TH PERL594DELTA 1 "2011-09-26" "perl v5.14.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" perl594delta \- what is new for perl v5.9.4 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes differences between the 5.9.3 and the 5.9.4 development releases. See perl590delta, perl591delta, perl592delta and perl593delta for the differences between 5.8.0 and 5.9.3. .SH "Incompatible Changes" .IX Header "Incompatible Changes" .SS "chdir \s-1FOO\s0" .IX Subsection "chdir FOO" A bareword argument to \fIchdir()\fR is now recognized as a file handle. Earlier releases interpreted the bareword as a directory name. (Gisle Aas) .SS "Handling of pmc files" .IX Subsection "Handling of pmc files" An old feature of perl was that before \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`use\*(C'\fR look for a file with a \fI.pm\fR extension, they will first look for a similar filename with a \fI.pmc\fR extension. If this file is found, it will be loaded in place of any potentially existing file ending in a \fI.pm\fR extension. .PP Previously, \fI.pmc\fR files were loaded only if more recent than the matching \fI.pm\fR file. Starting with 5.9.4, they'll be always loaded if they exist. (This trick is used by Pugs.) .SS "@\- and @+ in patterns" .IX Subsection "@- and @+ in patterns" The special arrays \f(CW\*(C`@\-\*(C'\fR and \f(CW\*(C`@+\*(C'\fR are no longer interpolated in regular expressions. (Sadahiro Tomoyuki) .ie n .SS "$AUTOLOAD can now be tainted" .el .SS "\f(CW$AUTOLOAD\fP can now be tainted" .IX Subsection "$AUTOLOAD can now be tainted" If you call a subroutine by a tainted name, and if it defers to an \&\s-1AUTOLOAD\s0 function, then \f(CW$AUTOLOAD\fR will be (correctly) tainted. (Rick Delaney) .SH "Core Enhancements" .IX Header "Core Enhancements" .SS "\fIstate()\fP variables" .IX Subsection "state() variables" A new class of variables has been introduced. State variables are similar to \f(CW\*(C`my\*(C'\fR variables, but are declared with the \f(CW\*(C`state\*(C'\fR keyword in place of \&\f(CW\*(C`my\*(C'\fR. They're visible only in their lexical scope, but their value is persistent: unlike \f(CW\*(C`my\*(C'\fR variables, they're not undefined at scope entry, but retain their previous value. (Rafael Garcia-Suarez) .PP To use state variables, one needs to enable them by using .PP .Vb 1 \& use feature "state"; .Ve .PP or by using the \f(CW\*(C`\-E\*(C'\fR command-line switch in one-liners. .PP See \*(L"Persistent variables via \fIstate()\fR\*(R" in perlsub. .SS "\s-1\fIUNIVERSAL::DOES\s0()\fP" .IX Subsection "UNIVERSAL::DOES()" The \f(CW\*(C`UNIVERSAL\*(C'\fR class has a new method, \f(CW\*(C`DOES()\*(C'\fR. It has been added to solve semantic problems with the \f(CW\*(C`isa()\*(C'\fR method. \f(CW\*(C`isa()\*(C'\fR checks for inheritance, while \f(CW\*(C`DOES()\*(C'\fR has been designed to be overridden when module authors use other types of relations between classes (in addition to inheritance). (chromatic) .PP See \*(L"$obj\->\s-1DOES\s0( \s-1ROLE\s0 )\*(R" in \s-1UNIVERSAL\s0. .SS "Exceptions in constant folding" .IX Subsection "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) .ie n .SS "Source filters in @INC" .el .SS "Source filters in \f(CW@INC\fP" .IX Subsection "Source filters in @INC" It's possible to enhance the mechanism of subroutine hooks in \f(CW@INC\fR 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 \*(L"require\*(R" in perlfunc for details. (Nicholas Clark) .SS "\s-1MAD\s0" .IX Subsection "MAD" \&\s-1MAD\s0, which stands for \fIMisc Attribute Decoration\fR, 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 \f(CW\*(C`\-Dmad\*(C'\fR 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) .SH "Modules and Pragmas" .IX Header "Modules and Pragmas" .IP "\(bu" 4 \&\f(CW\*(C`encoding::warnings\*(C'\fR is now a lexical pragma. (Although on older perls, which don't have support for lexical pragmas, it keeps its global behaviour.) (Audrey Tang) .IP "\(bu" 4 \&\f(CW\*(C`threads\*(C'\fR is now a dual-life module, also available on \s-1CPAN\s0. It has been expanded in many ways. A \fIkill()\fR method is available for thread signalling. One can get thread status, or the list of running or joinable threads. .Sp A new \f(CW\*(C`threads\->exit()\*(C'\fR 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 \fIexit()\fR built-in now always causes the whole application to terminate. (Jerry D. Hedden) .SS "New Core Modules" .IX Subsection "New Core Modules" .IP "\(bu" 4 \&\f(CW\*(C`Hash::Util::FieldHash\*(C'\fR, by Anno Siegel, has been added. This module provides support for \fIfield hashes\fR: hashes that maintain an association of a reference with a value, in a thread-safe garbage-collected way. Such hashes are useful to implement inside-out objects. .IP "\(bu" 4 \&\f(CW\*(C`Module::Build\*(C'\fR, by Ken Williams, has been added. It's an alternative to \&\f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR to build and install perl modules. .IP "\(bu" 4 \&\f(CW\*(C`Module::Load\*(C'\fR, by Jos Boumans, has been added. It provides a single interface to load Perl modules and \fI.pl\fR files. .IP "\(bu" 4 \&\f(CW\*(C`Module::Loaded\*(C'\fR, by Jos Boumans, has been added. It's used to mark modules as loaded or unloaded. .IP "\(bu" 4 \&\f(CW\*(C`Package::Constants\*(C'\fR, by Jos Boumans, has been added. It's a simple helper to list all constants declared in a given package. .IP "\(bu" 4 \&\f(CW\*(C`Win32API::File\*(C'\fR, by Tye McQueen, has been added (for Windows builds). This module provides low-level access to Win32 system \s-1API\s0 calls for files/dirs. .SH "Utility Changes" .IX Header "Utility Changes" .SS "config_data" .IX Subsection "config_data" \&\f(CW\*(C`config_data\*(C'\fR is a new utility that comes with \f(CW\*(C`Module::Build\*(C'\fR. It provides a command-line interface to the configuration of Perl modules that use Module::Build's framework of configurability (that is, \&\f(CW*::ConfigData\fR modules that contain local configuration information for their parent modules.) .SH "Documentation" .IX Header "Documentation" .SS "New manpage, perlpragma" .IX Subsection "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). .SS "New manpage, perlreguts" .IX Subsection "New manpage, perlreguts" The perlreguts manpage, courtesy of Yves Orton, describes internals of the Perl regular expression engine. .SS "New manpage, perlunitut" .IX Subsection "New manpage, perlunitut" The perlunitut manpage is an tutorial for programming with Unicode and string encodings in Perl, courtesy of Juerd Waalboer. .SH "Performance Enhancements" .IX Header "Performance Enhancements" .SS "Memory optimisations" .IX Subsection "Memory optimisations" Several internal data structures (typeglobs, GVs, CVs, formats) have been restructured to use less memory. (Nicholas Clark) .SS "\s-1UTF\-8\s0 cache optimisation" .IX Subsection "UTF-8 cache optimisation" The \s-1UTF\-8\s0 caching code is now more efficient, and used more often. (Nicholas Clark) .SS "Regular expressions" .IX Subsection "Regular expressions" .IP "Engine de-recursivised" 4 .IX Item "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) .IP "Single char char-classes treated as literals" 4 .IX Item "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) .IP "Trie optimisation of literal string alternations" 4 .IX Item "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) .Sp \&\fBNote:\fR 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. .IP "Aho-Corasick start-point optimisation" 4 .IX Item "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) .SS "Sloppy stat on Windows" .IX Subsection "Sloppy stat on Windows" On Windows, perl's \fIstat()\fR 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 \&\fIstat()\fR by not performing this operation. (Jan Dubois) .SH "Installation and Configuration Improvements" .IX Header "Installation and Configuration Improvements" .SS "Relocatable installations" .IX Subsection "Relocatable installations" There is now Configure support for creating a relocatable perl tree. If you Configure with \f(CW\*(C`\-Duserelocatableinc\*(C'\fR, then the paths in \f(CW@INC\fR (and everything else in \f(CW%Config\fR) can be optionally located via the path of the perl executable. .PP That means that, if the string \f(CW".../"\fR 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 \&\f(CW\*(C`\-Duserelocatableinc\*(C'\fR is that everything is relocated. The initial install is done to the original configured prefix. .SS "Ports" .IX Subsection "Ports" Many improvements have been made towards making Perl work correctly on z/OS. .PP Perl has been reported to work on DragonFlyBSD. .SS "Compilation improvements" .IX Subsection "Compilation improvements" All \fIppport.h\fR files in the \s-1XS\s0 modules bundled with perl are now autogenerated at build time. (Marcus Holland-Moritz) .SS "New probes" .IX Subsection "New probes" The configuration process now detects whether \fIstrlcat()\fR and \fIstrlcpy()\fR 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) .SS "Windows build improvements" .IX Subsection "Windows build improvements" .IP "Building \s-1XS\s0 extensions" 4 .IX Item "Building XS extensions" Support for building \s-1XS\s0 extension modules with the free MinGW compiler has been improved in the case where perl itself was built with the Microsoft \&\s-1VC++\s0 compiler. (ActiveState) .IP "Support for 64\-bit compiler" 4 .IX Item "Support for 64-bit compiler" Support for building perl with Microsoft's 64\-bit compiler has been improved. (ActiveState) .SH "Selected Bug Fixes" .IX Header "Selected Bug Fixes" .SS "\s-1PERL5SHELL\s0 and tainting" .IX Subsection "PERL5SHELL and tainting" On Windows, the \s-1PERL5SHELL\s0 environment variable is now checked for taintedness. (Rafael Garcia-Suarez) .SS "Using *FILE{\s-1IO\s0}" .IX Subsection "Using *FILE{IO}" \&\f(CW\*(C`stat()\*(C'\fR and \f(CW\*(C`\-X\*(C'\fR filetests now treat *FILE{\s-1IO\s0} filehandles like *FILE filehandles. (Steve Peters) .SS "Overloading and reblessing" .IX Subsection "Overloading and reblessing" Overloading now works when references are reblessed into another class. Internally, this has been implemented by moving the flag for \*(L"overloading\*(R" from the reference to the referent, which logically is where it should always have been. (Nicholas Clark) .SS "Overloading and \s-1UTF\-8\s0" .IX Subsection "Overloading and UTF-8" A few bugs related to \s-1UTF\-8\s0 handling with objects that have stringification overloaded have been fixed. (Nicholas Clark) .SS "eval memory leaks fixed" .IX Subsection "eval memory leaks fixed" Traditionally, \f(CW\*(C`eval \*(Aqsyntax error\*(Aq\*(C'\fR has leaked badly. Many (but not all) of these leaks have now been eliminated or reduced. (Dave Mitchell) .SS "Random device on Windows" .IX Subsection "Random device on Windows" In previous versions, perl would read the file \fI/dev/urandom\fR 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) .SH "New or Changed Diagnostics" .IX Header "New or Changed Diagnostics" .ie n .IP "State variable %s will be reinitialized" 4 .el .IP "State variable \f(CW%s\fR will be reinitialized" 4 .IX Item "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. .SH "Changed Internals" .IX Header "Changed Internals" A new file, \fImathoms.c\fR, 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 \&\s-1PP\s0 functions are now shared for several ops. .PP The implementation of the special variables $^H and %^H has changed, to allow implementing lexical pragmas in pure perl. .SH "Known Problems" .IX Header "Known Problems" One warning test (number 263 in \fIlib/warnings.t\fR) fails under \s-1UTF\-8\s0 locales. .PP Bytecode tests fail under several platforms. We are considering removing support for byteloader and compiler before the 5.10.0 release. .SH "Reporting Bugs" .IX Header "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. .PP If you believe you have an unreported bug, please run the \fBperlbug\fR 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 \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. .SH "SEE ALSO" .IX Header "SEE ALSO" The \fIChanges\fR file for exhaustive details on what changed. .PP The \fI\s-1INSTALL\s0\fR file for how to build Perl. .PP The \fI\s-1README\s0\fR file for general stuff. .PP The \fIArtistic\fR and \fICopying\fR files for copyright information.