summaryrefslogtreecommitdiff
path: root/pod/perl594delta.pod
blob: 8d55104a81ed55be18f106e544094ecf5a68aa65 (plain)
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
=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.

=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.

=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.

=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.

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).

See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.

=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.)

C<threads>

=head2 New Core Modules

=over 4

=item *

C<Module::Build> has been added. It's an alternative to
C<ExtUtils::MakeMaker> to build and install perl modules.

=item *

C<Module::Load> has been added. It's used to load indistinctively modules
and files.

=item *

C<Hash::Util::FieldHash> 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<Win32API::File> 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.

=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

Constants (Nicholas)

Regular expressions (Yves)

=head1 Installation and Configuration Improvements

=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.

=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.

=head1 Selected Bug Fixes

=head2 PERL5SHELL and tainting

On Windows, PERL5SHELL is now checked for taintedness.

=head2 Using *FILE{IO}

C<stat()> and C<-X> filetests now treat *FILE{IO} filehandles like *FILE
filehandles.

=head1 New or Changed Diagnostics

=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.

=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://bugs.perl.org/ .  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