Add details of module updates
[p5sagit/p5-mst-13.2.git] / pod / perl5112delta.pod
CommitLineData
d5114285 1=head1 NAME
2
d5114285 3perldelta - what is new for perl v5.11.2
4
5=head1 DESCRIPTION
6
7This document describes differences between the 5.11.1 release and
8the 5.11.2 release.
9
d5114285 10=head1 Core Enhancements
11
97352077 12=head2 qr overloading
13
14It is now possible to overload the C<qr//> operator, that is, conversion
15to regexp, like it was already possible to overload conversion to
16boolean, string or number of objects. It is invoked when an object
17appears on the right hand side of the C<=~> operator, or when it is
18interpolated into a regexp. See L<overload>.
19
88e1f1a2 20=head2 Pluggable keywords
21
22Extension modules can now cleanly hook into the Perl parser to define new
c54f4355 23kinds of keyword-headed expression and compound statement. The syntax
24following the keyword is defined entirely by the extension. This allow
88e1f1a2 25a completely non-Perl sublanguage to be parsed inline, with the right
c54f4355 26ops cleanly generated. This feature is currently considered experimental.
88e1f1a2 27
c54f4355 28See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core source
88e1f1a2 29distribution also includes a new module L<XS::APItest::KeywordRPN>, which
30implements reverse Polish notation arithmetic via pluggable keywords.
31This module is mainly used for test purposes, and is not normally
32installed, but also serves as an example of how to use the new mechanism.
33
72343ccb 34=head2 Lexer API
35
36We have added a public API for the lowest layers of lexing. This is meant
37to provide a solid foundation for the parsing that Devel::Declare and
38similar modules do, and it complements the pluggable keyword mechanism.
39The API consists of some existing variables combined with some new functions,
40all marked as experimental (which making them public certainly is).
41
580561a3 42=head2 APIs for more internals
43
44The lowest layers of the lexer and parts of the pad system now have C
c54f4355 45APIs available to XS extensions. These are necessary to support proper
46use of pluggable keywords, but have other uses too. The new APIs are
580561a3 47experimental, and only cover a small proportion of what would be necessary
c54f4355 48to take full advantage of the core's facilities in these areas. It is
580561a3 49intended that the Perl 5.13 development cycle will see the addition of
50a full range of clean, supported interfaces.
51
f7461760 52=head2 Overridable function lookup
53
c54f4355 54Where an extension module hooks the creation of rv2cv ops to modify
f7461760 55the subroutine lookup process, this now works correctly for bareword
c54f4355 56subroutine calls. This means that prototypes on subroutines referenced
57this way will be processed correctly. (Previously bareword subroutine
f7461760 58names were initially looked up, for parsing purposes, by an unhookable
59mechanism, so extensions could only properly influence subroutine names
60that appeared with an C<&> sigil.)
61
d5114285 62=head1 Modules and Pragmata
63
d5114285 64=head2 New Modules and Pragmata
65
66=over 4
67
1fc7262d 68=item C<legacy>
d5114285 69
1fc7262d 70Preserves legacy behaviors or enable new non-default behaviors.
71Currently the only behaviour concerns semantics for the 128 characters
72on ASCII systems that have the 8th bit set.
d5114285 73
74=back
75
76=head2 Pragmata Changes
77
78=over 4
79
1fc7262d 80=item C<diagnostics>
d5114285 81
1fc7262d 82Supports %.0f formatting internally.
83
84=item C<overload>
85
86Allow overloading of 'qr'.
d5114285 87
88=back
89
90=head2 Updated Modules
91
92=over 4
93
1fc7262d 94=item C<B::Concise>
d5114285 95
d44d5874 96Optimize reversing an array in-place, avoid using defined %hash in core code and tests.
97
1fc7262d 98=item C<B::Deparse>
99
d44d5874 100Teach B::Deparse about in-place reverse.
101
1fc7262d 102=item C<Carp>
103
d44d5874 104Refine Carp caller() fix and add tests.
105
1fc7262d 106=item C<Compress::Zlib>
107
d44d5874 108Updated to 2.022.
109
1fc7262d 110=item C<CPANPLUS>
111
d44d5874 112Updated to 0.89_09.
1fc7262d 113
114=item C<Encode>
115
d44d5874 116Updated to 2.38.
117
1fc7262d 118=item C<ExtUtils::CBuilder>
119
d44d5874 120Updated to 0.27.
121
1fc7262d 122=item C<Env>
123
d44d5874 124Add EXISTS and DELETE methods to Env.pm.
1fc7262d 125
126=item C<File::Fetch>
127
d44d5874 128Updated to 0.22.
129
1fc7262d 130=item C<I8N::Langinfo>
131
d44d5874 132Correctly document export of I18N::Langinfo.
133
1fc7262d 134=item C<I8N::LangTags>
135
d44d5874 136In I18N::LangTags::Detect, avoid using defined @array and defined %hash.
137
1fc7262d 138=item C<IO::Compress>
139
d44d5874 140Updated to 2.022.
141
1fc7262d 142=item C<IPC::Cmd>
143
d44d5874 144Updated to 0.54.
145
1fc7262d 146=item C<List::Util>
147
d44d5874 148Updated to 1.22.
149
1fc7262d 150=item C<Locale::Maketext>
151
d44d5874 152In Locale::Maketext, avoid using defined @array and defined %hash.
153Convert the odd Locale::Maketext test out from Test to Test::More.
154
1fc7262d 155=item C<Module::Build>
156
72343ccb 157Updated to 0.35_08.
158
1fc7262d 159=item C<Module::CoreList>
160
d44d5874 161Implemented is_deprecated().
1fc7262d 162
163=item C<Pod::Simple>
164
d44d5874 165Updated to 3.10.
166
1fc7262d 167=item C<Scalar::Util>
168
d44d5874 169Updated to 1.22.
170
1fc7262d 171=item C<Switch>
172
d44d5874 173Updated to 2.16.
d5114285 174
175=back
176
177=head1 Utility Changes
178
d5114285 179=over 4
180
72343ccb 181=item F<a2p>
d5114285 182
72343ccb 183Fixed bugs with the match() operator in list context, remove mention
184of $[.
d5114285 185
186=back
187
d5114285 188=head1 Performance Enhancements
189
d5114285 190=over 4
191
192=item *
193
437d4214 194Reversing an array to itself (as in C<@a = reverse @a>) in void context now
195happens in-place and is several orders of magnitude faster than it used to be.
196It will also preserve non-existent elements whenever possible, i.e. for non
197magical arrays or tied arrays with C<EXISTS> and C<DELETE> methods.
d5114285 198
199=back
200
d5114285 201=head1 New or Changed Diagnostics
202
72343ccb 203Several new diagnostics, see L<perldiag> for details.
d5114285 204
205=over 4
206
72343ccb 207=item C<Bad plugin affecting keyword '%s'>
d5114285 208
72343ccb 209=item C<gmtime(%.0f) too large>
210
211=item C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input>
212
213=item C<Lexing code internal error (%s)>
214
215=item C<localtime(%.0f) too large>
216
217=item C<Overloaded dereference did not return a reference>
218
219=item C<Overloaded qr did not return a REGEXP>
220
221=item C<Perl_pmflag() is deprecated, and will be removed from the XS API>
222
223=back
224
225One diagnostic has been removed:
226
227=over 4
228
229=item C<Runaway format>
d5114285 230
231=back
232
233=head1 Changed Internals
234
d5114285 235=over 4
236
237=item *
238
879d0c72 239C<Perl_pmflag> has been removed from the public API. Calling it now generates
240a deprecation warning, and it will be removed in a future release. Although
241listed as part of the API, it was never documented, and only ever used in
242F<toke.c>, and prior to 5.10, F<regcomp.c>. In core, it has been replaced by a
243static function.
d5114285 244
245=back
246
247=head1 New Tests
248
d5114285 249=over 4
250
72343ccb 251=item F<t/op/while_readdir.t>
d5114285 252
72343ccb 253Test that a bare readdir in while loop sets $_.
d5114285 254
255=back
256
257=head1 Known Problems
258
d5114285 259=over 4
260
72343ccb 261=item Known test failures on VMS
d5114285 262
72343ccb 263Perl 5.11.2 fails a small set of core and CPAN tests as of this release.
264With luck, that'll be sorted out for 5.11.3.
d5114285 265
266=back
267
268=head1 Deprecations
269
d5114285 270The following items are now deprecated.
271
72343ccb 272=head2 Use of C<:=> to mean an empty attribute list is now deprecated.
d5114285 273
72343ccb 274An accident of Perl's parser meant that these constructions were all equivalent:
d5114285 275
72343ccb 276 my $pi := 4;
277 my $pi : = 4;
278 my $pi : = 4;
d5114285 279
72343ccb 280with the C<:> being treated as the start of an attribute list, which ends
281before the C<=>. As whitespace is not significant here, all are parsed as an
282empty attribute list, hence all the above are equivalent to, and better written
283as
284
285 my $pi = 4;
286
287because no attribute processing is done for an empty list.
288
289As is, this meant that C<:=> cannot be used as a new token, without silently
290changing the meaning of existing code. Hence that particular form is now
291deprecated, and will become a syntax error. If it is absolutely necessary to
292have empty attribute lists (for example, because of a code generator) then
293avoid the warning by adding a space before the C<=>.
d5114285 294
d5114285 295=head1 Acknowledgements
296
72343ccb 297Perl 5.11.2 represents approximately 3 weeks development since Perl 5.11.1
298contains 29,992 lines of changes across 458 files from 38 authors and committers:
299
300Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert, Bram,
301Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave Rolsky,
302David E. Wheeler, David Golden, Eric Brine, Father Chrysostomos,
303Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr, Harmen, H.Merijn Brand,
304Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson, Kevin Ryde,
305Leon Brocard, Nicholas Clark, Paul Marquess, Philippe Bruhat,
306Rafael Garcia-Suarez, Sisyphus, Steffen Mueller, Steve Hay, Steve Peters,
307Vincent Pit, Yuval Kogman, Yves Orton, and Zefram.
d5114285 308
72343ccb 309Many of the changes included in this version originated in the CPAN
310modules included in Perl's core. We're grateful to the entire CPAN
311community for helping Perl to flourish.
d5114285 312
313=head1 Reporting Bugs
314
315If you find what you think is a bug, you might check the articles
316recently posted to the comp.lang.perl.misc newsgroup and the perl
72343ccb 317bug database at http://rt.perl.org/perlbug/ . There may also be
d5114285 318information at http://www.perl.org/ , the Perl Home Page.
319
320If you believe you have an unreported bug, please run the B<perlbug>
72343ccb 321program included with your release. Be sure to trim your bug down
322to a tiny but sufficient test case. Your bug report, along with the
d5114285 323output of C<perl -V>, will be sent off to perlbug@perl.org to be
324analysed by the Perl porting team.
325
326If the bug you are reporting has security implications, which make it
327inappropriate to send to a publicly archived mailing list, then please send
328it to perl5-security-report@perl.org. This points to a closed subscription
329unarchived mailing list, which includes all the core committers, who be able
330to help assess the impact of issues, figure out a resolution, and help
331co-ordinate the release of patches to mitigate or fix the problem across all
332platforms on which Perl is supported. Please only use this address for
333security issues in the Perl core, not for modules independently
334distributed on CPAN.
335
336=head1 SEE ALSO
337
338The F<Changes> file for an explanation of how to view exhaustive details
339on what changed.
340
341The F<INSTALL> file for how to build Perl.
342
343The F<README> file for general stuff.
344
345The F<Artistic> and F<Copying> files for copyright information.
346
347=cut