3 perldelta - what is new for perl v5.9.4
7 This document describes differences between the 5.9.3 and the 5.9.4
8 developement releases. See L<perl590delta>, L<perl591delta>, L<perl592delta>
9 and L<perl593delta> for the differences between 5.8.0 and 5.9.3.
11 =head1 Incompatible Changes
15 A bareword argument to chdir() is now recognized as a file handle.
16 Earlier releases interpreted the bareword as a directory name.
18 =head2 Handling of pmc files
20 And old feature of perl is that before C<require> or C<use> look for a
21 file with a F<.pm> extension, they will first look for a similar filename
22 with a F<.pmc> extension. If this file is found, it will be loaded in
23 place of any potentially existing file ending in a F<.pm> extension.
25 Previously, F<.pmc> files were loaded only if more recent than the
26 matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if
27 they exist. (This trick is used by Pugs.)
29 =head2 @- and @+ in patterns
31 The special arrays C<@-> and C<@+> are no longer interpolated in regular
34 =head2 $AUTOLOAD can now be tainted
36 If you call a subroutine by a tainted name, and if it defers to an
37 AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted.
39 =head1 Core Enhancements
41 =head2 state() variables
43 A new class of variables has been introduced. State variables are similar
44 to C<my> variables, but are declared with the C<state> keyword in place of
45 C<my>. They're visible only in their lexical scope, but their value in
46 persistent: unlike C<my> variables, they're not undefined at scope entry,
47 and retain their previous value.
49 To use state variables, one needs to enable them by using
53 or by using the C<-E> command-line switch in one-liners.
55 See L<perlsub/"Persistent variables via state()">.
57 =head2 UNIVERSAL::DOES()
59 The C<UNIVERSAL> class has a new method, C<DOES()>. It has been added to
60 solve semantic problems with the C<isa()> method. C<isa()> checks for
61 inheritance, while C<DOES()> has been designed to be overriden when
62 module authors use other types of relations between classes (in addition
65 See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.
67 =head1 Modules and Pragmata
69 C<encoding::warnings> is now a lexical pragma. (Although on older perls,
70 which don't have support for lexical pragmas, it keeps its global
75 =head2 New Core Modules
81 C<Hash::Util::FieldHash> has been added. This module provides support for
82 I<field hashes>: hashes that maintain an association of a reference with a
83 value, in a thread-safe garbage-collected way.
87 C<Module::Build> has been added. It's an alternative to
88 C<ExtUtils::MakeMaker> to build and install perl modules.
92 C<Module::Load> has been added. It's used to load indistinctively modules
97 C<Module::Loaded> has been added. It's used to mark modules as loaded or
102 C<Package::Constants> has been added. It's a simple helper to list all
103 constants declared in a given package.
107 C<Win32API::File> has been added (for Windows builds). This module
108 provides low-level access to Win32 system API calls for files/dirs.
112 =head1 Utility Changes
116 C<config_data> is a new utility that comes with C<Module::Build>. It
117 provides a command-line interface to the configuration of Perl modules
118 that use Module::Build's framework of configurability (that is,
119 C<*::ConfigData> modules, that contain local configuration information for
120 their parent modules.)
124 =head2 New manpage, perlpragma
126 The L<perlpragma> manpage documents how to write one's own lexical
127 pragmas in pure Perl (something that is possible only starting with
130 =head2 New manpage, perlreguts
132 The L<perlreguts> manpage, due to Yves Orton, describes internals of the
133 Perl regular expression engine.
135 =head2 New manpage, perlunitut
137 The L<perlunitut> manpage is an tutorial for programming with Unicode and
138 string encodings in Perl, due to Juerd Waalboer.
140 =head1 Performance Enhancements
142 Regular expressions (Yves)
144 =head1 Installation and Configuration Improvements
148 Many improvements have been made towards making Perl work correctly on
151 Perl has been reported to work on DragonFlyBSD.
153 =head2 Compilation improvements
155 All F<ppport.h> files in the XS modules bundled with perl are now
156 autogenerated at build time.
160 The configuration process now detects whether strlcat() and strlcpy() are
161 available. When they are not available, perl's own version is used (from
162 Russ Allbery's public domain implementation). Various places in the perl
163 interpreter now uses them.
165 =head1 Selected Bug Fixes
167 =head2 PERL5SHELL and tainting
169 On Windows, PERL5SHELL is now checked for taintedness.
171 =head2 Using *FILE{IO}
173 C<stat()> and C<-X> filetests now treat *FILE{IO} filehandles like *FILE
176 =head1 New or Changed Diagnostics
178 =head1 Changed Internals
180 A new file, F<mathoms.c>, contains functions that aren't used anymore in
181 the perl core, but that remain around because modules out there might
182 still use them. They come from a factorization effort: for example, many
183 PP functions are now shared for several ops.
185 =head1 Known Problems
187 One warning test (number 263 in F<lib/warnings.t>) fails under UTF-8
190 Bytecode tests fails under several platforms. Support for byteloader and
191 compiler is considered to be removed before the 5.10.0 release.
193 =head2 Platform-specific Problems
195 The test F<ext/Socket/t/socketpair.t> crashes after completing all tests
196 successfully when built with USE_ITHREADS and PERL_IMPLICIT_SYS on Win32.
198 =head1 Reporting Bugs
200 If you find what you think is a bug, you might check the articles
201 recently posted to the comp.lang.perl.misc newsgroup and the perl
202 bug database at http://rt.perl.org/rt3/ . There may also be
203 information at http://www.perl.org/ , the Perl Home Page.
205 If you believe you have an unreported bug, please run the B<perlbug>
206 program included with your release. Be sure to trim your bug down
207 to a tiny but sufficient test case. Your bug report, along with the
208 output of C<perl -V>, will be sent off to perlbug@perl.org to be
209 analysed by the Perl porting team.
213 The F<Changes> file for exhaustive details on what changed.
215 The F<INSTALL> file for how to build Perl.
217 The F<README> file for general stuff.
219 The F<Artistic> and F<Copying> files for copyright information.