1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
=head1 NAME
perldelta - what is new for perl v5.9.4
=head1 DESCRIPTION
This document describes differences between the 5.9.3 and the 5.9.4
developement releases. See L<perl590delta>, L<perl591delta>, L<perl592delta>
and L<perl593delta> for the differences between 5.8.0 and 5.9.3.
=head1 Incompatible Changes
=head2 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)
=head2 Handling of pmc files
And old feature of perl is that before C<require> or C<use> look for a
file with a F<.pm> extension, they will first look for a similar filename
with a F<.pmc> extension. If this file is found, it will be loaded in
place of any potentially existing file ending in a F<.pm> extension.
Previously, F<.pmc> files were loaded only if more recent than the
matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if
they exist. (This trick is used by Pugs.)
=head2 @- and @+ in patterns
The special arrays C<@-> and C<@+> are no longer interpolated in regular
expressions. (Sadahiro Tomoyuki)
=head2 $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)
=head1 Core Enhancements
=head2 state() variables
A new class of variables has been introduced. State variables are similar
to C<my> variables, but are declared with the C<state> keyword in place of
C<my>. They're visible only in their lexical scope, but their value in
persistent: unlike C<my> variables, they're not undefined at scope entry,
and 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 C<-E> command-line switch in one-liners.
See L<perlsub/"Persistent variables via state()">.
=head2 UNIVERSAL::DOES()
The C<UNIVERSAL> class has a new method, C<DOES()>. It has been added to
solve semantic problems with the C<isa()> method. C<isa()> checks for
inheritance, while C<DOES()> has been designed to be overriden when
module authors use other types of relations between classes (in addition
to inheritance). (chromatic)
See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.
=head2 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)
=head1 Modules and Pragmata
C<encoding::warnings> is now a lexical pragma. (Although on older perls,
which don't have support for lexical pragmas, it keeps its global
behaviour.) (Audrey Tang)
C<threads>
=head2 New Core Modules
=over 4
=item *
C<Hash::Util::FieldHash>, by Anno Siegel, has been added. This module
provides support for I<field hashes>: hashes that maintain an association
of a reference with a value, in a thread-safe garbage-collected way.
=item *
C<Module::Build>, by Ken Williams, has been added. It's an alternative to
C<ExtUtils::MakeMaker> to build and install perl modules.
=item *
C<Module::Load>, by Jos Boumans, has been added. It's used to load
indistinctively modules and files.
=item *
C<Module::Loaded>, by Jos Boumans, has been added. It's used to mark
modules as loaded or unloaded.
=item *
C<Package::Constants>, by Jos Boumans, has been added. It's a simple
helper to list all constants declared in a given package.
=item *
C<Win32API::File>, by Tye McQueen, has been added (for Windows builds).
This module provides low-level access to Win32 system API calls for
files/dirs.
=back
=head1 Utility Changes
=head2 config_data
C<config_data> is a new utility that comes with C<Module::Build>. It
provides a command-line interface to the configuration of Perl modules
that use Module::Build's framework of configurability (that is,
C<*::ConfigData> modules, that contain local configuration information for
their parent modules.)
=head1 Documentation
=head2 New manpage, perlpragma
The L<perlpragma> manpage documents how to write one's own lexical
pragmas in pure Perl (something that is possible only starting with
5.9.4).
=head2 New manpage, perlreguts
The L<perlreguts> manpage, due to Yves Orton, describes internals of the
Perl regular expression engine.
=head2 New manpage, perlunitut
The L<perlunitut> manpage is an tutorial for programming with Unicode and
string encodings in Perl, due to Juerd Waalboer.
=head1 Performance Enhancements
=head2 Memory optimisations
Several internal data structures (typeglobs, GVs, CVs, formats) have been
restructured to use less memory. (Nicholas Clark)
=head2 UTF-8 cache optimisation
The UTF-8 caching code is now more efficient, and used more often.
(Nicholas Clark)
=head2 Regular expressions
=over 4
=item Engine de-recursiveized
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.
=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.
=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.
B<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.
=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.
=back
=head1 Installation and Configuration Improvements
=head2 Relocatable installations
TODO
=head2 Ports
Many improvements have been made towards making Perl work correctly on
z/OS.
Perl has been reported to work on DragonFlyBSD.
=head2 Compilation improvements
All F<ppport.h> files in the XS modules bundled with perl are now
autogenerated at build time. (Marcus Holland-Moritz)
=head2 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 uses them. (Steve Peters)
=head1 Selected Bug Fixes
=head2 PERL5SHELL and tainting
On Windows, PERL5SHELL is now checked for taintedness. (Rafael
Garcia-Suarez)
=head2 Using *FILE{IO}
C<stat()> and C<-X> filetests now treat *FILE{IO} filehandles like *FILE
filehandles. (Steve Peters)
=head2 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)
=head2 Overloading and UTF-8
A few bugs related to UTF-8 handling with objects that have
stringification overloaded have been fixed. (Nicholas Clark)
=head1 New or Changed Diagnostics
=over 4
=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 L<perldiag>.
=back
=head1 Changed Internals
A new file, F<mathoms.c>, contains functions that aren't used anymore in
the perl core, but that 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.
=head1 Known Problems
One warning test (number 263 in F<lib/warnings.t>) fails under UTF-8
locales.
Bytecode tests fails under several platforms. Support for byteloader and
compiler is considered to be removed before the 5.10.0 release.
=head2 Platform-specific Problems
The test F<ext/Socket/t/socketpair.t> crashes after completing all tests
successfully when built with USE_ITHREADS and PERL_IMPLICIT_SYS on Win32.
=head1 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 B<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 C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut
|