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