More perldelta entries
[p5sagit/p5-mst-13.2.git] / pod / perl594delta.pod
CommitLineData
6c7deadb 1=head1 NAME
2
3perldelta - what is new for perl v5.9.4
4
5=head1 DESCRIPTION
6
7This document describes differences between the 5.9.3 and the 5.9.4
8developement releases. See L<perl590delta>, L<perl591delta>, L<perl592delta>
9and L<perl593delta> for the differences between 5.8.0 and 5.9.3.
10
11=head1 Incompatible Changes
12
4db748fd 13=head2 chdir FOO
14
473aa102 15A bareword argument to chdir() is now recognized as a file handle.
4db748fd 16Earlier releases interpreted the bareword as a directory name.
17
ddc61b51 18=head2 Handling of pmc files
19
473aa102 20And old feature of perl is that before C<require> or C<use> look for a
21file with a F<.pm> extension, they will first look for a similar filename
22with a F<.pmc> extension. If this file is found, it will be loaded in
23place of any potentially existing file ending in a F<.pm> extension.
ddc61b51 24
473aa102 25Previously, F<.pmc> files were loaded only if more recent than the
26matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if
27they exist. (This trick is used by Pugs.)
ddc61b51 28
29=head2 @- and @+ in patterns
30
31The special arrays C<@-> and C<@+> are no longer interpolated in regular
32expressions.
33
5d121f7f 34=head2 $AUTOLOAD can now be tainted
35
36If you call a subroutine by a tainted name, and if it defers to an
37AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted.
38
6c7deadb 39=head1 Core Enhancements
40
6c20a8f9 41=head2 state() variables
42
3c1cb5e0 43A new class of variables has been introduced. State variables are similar
44to C<my> variables, but are declared with the C<state> keyword in place of
45C<my>. They're visible only in their lexical scope, but their value in
46persistent: unlike C<my> variables, they're not undefined at scope entry,
47and retain their previous value.
48
49To use state variables, one needs to enable them by using
50
51 use feature "state";
52
53or by using the C<-E> command-line switch in one-liners.
54
55See L<perlsub/"Persistent variables via state()">.
56
ddc61b51 57=head2 UNIVERSAL:DOES()
58
3c1cb5e0 59The C<UNIVERSAL> class has a new method, C<DOES()>. It has been added to
60solve semantic problems with the C<isa()> method. C<isa()> checks for
61inheritance, while C<DOES()> has been designed to be overriden when
62module authors use other types of relations between classes (in addition
63to inheritance).
64
65See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.
66
6c7deadb 67=head1 Modules and Pragmata
68
473aa102 69C<encoding::warnings> is now a lexical pragma. (Although on older perls,
70which don't have support for lexical pragmas, it keeps its global
71behaviour.)
6c20a8f9 72
ddc61b51 73C<threads>
74
6c20a8f9 75=head2 New Core Modules
76
77=over 4
78
79=item *
80
473aa102 81C<Module::Build> has been added. It's an alternative to
82C<ExtUtils::MakeMaker> to build and install perl modules.
83
84=item *
85
86C<Module::Load> has been added. It's used to load indistinctively modules
87and files.
6c20a8f9 88
89=item *
90
ddc61b51 91C<Hash::Util::FieldHash> has been added. This module provides support for
92I<field hashes>: hashes that maintain an association of a reference with a
93value, in a thread-safe garbage-collected way.
6c20a8f9 94
95=item *
96
ddc61b51 97C<Win32API::File> has been added (for Windows builds). This module
98provides low-level access to Win32 system API calls for files/dirs.
6c20a8f9 99
100=back
101
6c7deadb 102=head1 Utility Changes
103
3c1cb5e0 104=head2 config_data
105
106C<config_data> is a new utility that comes with C<Module::Build>. It
107provides a command-line interface to the configuration of Perl modules
108that use Module::Build's framework of configurability (that is,
109C<*::ConfigData> modules, that contain local configuration information for
110their parent modules.)
111
6c7deadb 112=head1 Documentation
113
6c20a8f9 114=head2 New manpage, perlpragma
115
473aa102 116The L<perlpragma> manpage documents how to write one's own lexical
117pragmas in pure Perl.
118
6c20a8f9 119=head2 New manpage, perlreguts
120
473aa102 121The L<perlreguts> manpage, due to Yves Orton, describes internals of the
122Perl regular expression engine.
123
6c20a8f9 124=head2 New manpage, perlunitut
125
473aa102 126The L<perlunitut> manpage is an tutorial for programming with Unicode and
127string encodings in Perl, due to Juerd Waalboer.
128
6c7deadb 129=head1 Performance Enhancements
130
6c20a8f9 131Constants (Nicholas)
132
133Regular expressions (Yves)
134
6c7deadb 135=head1 Installation and Configuration Improvements
136
ddc61b51 137=head2 Ports
138
473aa102 139Many improvements have been made towards making Perl work correctly on
140z/OS.
141
3c1cb5e0 142Perl has been reported to work on DragonFlyBSD.
143
ddc61b51 144=head2 Compilation improvements
145
146All F<ppport.h> files in the XS modules bundled with perl are now
147autogenerated at build time.
148
149=head2 New probes
150
3c1cb5e0 151The configuration process now detects whether strlcat() and strlcpy() are
ddc61b51 152available. When they are not available, perl's own version is used (from
153Russ Allbery's public domain implementation). Various places in the perl
154interpreter now uses them.
155
6c7deadb 156=head1 Selected Bug Fixes
157
473aa102 158=head2 PERL5SHELL and tainting
159
160On Windows, PERL5SHELL is now checked for taintedness.
161
162=head2 Using *FILE{IO}
163
164C<stat()> and C<-X> filetests now treat *FILE{IO} filehandles like *FILE
165filehandles.
166
6c7deadb 167=head1 New or Changed Diagnostics
168
169=head1 Changed Internals
170
3c1cb5e0 171A new file, F<mathoms.c>, contains functions that aren't used anymore in
172the perl core, but that remain around because modules out there might
173still use them. They come from a factorization effort: for example, many
174PP functions are now shared for several ops.
6c20a8f9 175
6c7deadb 176=head1 Known Problems
177
3c1cb5e0 178One warning test (number 263 in F<lib/warnings.t>) fails under UTF-8
179locales.
180
181Bytecode tests fails under several platforms. Support for byteloader and
182compiler is considered to be removed before the 5.10.0 release.
6c7deadb 183
184=head1 Reporting Bugs
185
186If you find what you think is a bug, you might check the articles
187recently posted to the comp.lang.perl.misc newsgroup and the perl
188bug database at http://bugs.perl.org/ . There may also be
189information at http://www.perl.org/ , the Perl Home Page.
190
191If you believe you have an unreported bug, please run the B<perlbug>
192program included with your release. Be sure to trim your bug down
193to a tiny but sufficient test case. Your bug report, along with the
194output of C<perl -V>, will be sent off to perlbug@perl.org to be
195analysed by the Perl porting team.
196
197=head1 SEE ALSO
198
199The F<Changes> file for exhaustive details on what changed.
200
201The F<INSTALL> file for how to build Perl.
202
203The F<README> file for general stuff.
204
205The F<Artistic> and F<Copying> files for copyright information.
206
207=cut