1PERL5112DELTA(1)       Perl Programmers Reference Guide       PERL5112DELTA(1)
2
3
4

NAME

6       perl5112delta - what is new for perl v5.11.2
7

DESCRIPTION

9       This document describes differences between the 5.11.1 release and the
10       5.11.2 release.
11

Core Enhancements

13   qr overloading
14       It is now possible to overload the "qr//" operator, that is, conversion
15       to regexp, like it was already possible to overload conversion to
16       boolean, string or number of objects. It is invoked when an object
17       appears on the right hand side of the "=~" operator, or when it is
18       interpolated into a regexp. See overload.
19
20   Pluggable keywords
21       Extension modules can now cleanly hook into the Perl parser to define
22       new kinds of keyword-headed expression and compound statement. The
23       syntax following the keyword is defined entirely by the extension. This
24       allow a completely non-Perl sublanguage to be parsed inline, with the
25       right ops cleanly generated. This feature is currently considered
26       experimental.
27
28       See "PL_keyword_plugin" in perlapi for the mechanism. The Perl core
29       source distribution also includes a new module XS::APItest::KeywordRPN,
30       which implements reverse Polish notation arithmetic via pluggable
31       keywords. This module is mainly used for test purposes, and is not
32       normally installed, but also serves as an example of how to use the new
33       mechanism.
34
35   APIs for more internals
36       The lowest layers of the lexer and parts of the pad system now have C
37       APIs available to XS extensions. These are necessary to support proper
38       use of pluggable keywords, but have other uses too. The new APIs are
39       experimental, and only cover a small proportion of what would be
40       necessary to take full advantage of the core's facilities in these
41       areas. It is intended that the Perl 5.13 development cycle will see the
42       addition of a full range of clean, supported interfaces.
43
44   Overridable function lookup
45       Where an extension module hooks the creation of rv2cv ops to modify the
46       subroutine lookup process, this now works correctly for bareword
47       subroutine calls. This means that prototypes on subroutines referenced
48       this way will be processed correctly. (Previously bareword subroutine
49       names were initially looked up, for parsing purposes, by an unhookable
50       mechanism, so extensions could only properly influence subroutine names
51       that appeared with an "&" sigil.)
52

Modules and Pragmata

54   New Modules and Pragmata
55       "legacy"
56           Preserves legacy behaviors or enable new non-default behaviors.
57           Currently the only behaviour concerns semantics for the 128
58           characters on ASCII systems that have the 8th bit set.
59
60   Pragmata Changes
61       "diagnostics"
62           Supports %.0f formatting internally.
63
64       "overload"
65           Allow overloading of 'qr'.
66
67   Updated Modules
68       "B::Concise"
69           Optimize reversing an array in-place, avoid using defined %hash in
70           core code and tests.
71
72       "B::Deparse"
73           Teach B::Deparse about in-place reverse.
74
75       "Carp"
76           Refine Carp caller() fix and add tests.
77
78       "Compress::Zlib"
79           Updated to 2.022.
80
81       "CPANPLUS"
82           Updated to 0.89_09.
83
84       "Encode"
85           Updated to 2.38.
86
87       "ExtUtils::CBuilder"
88           Updated to 0.27.
89
90       "Env"
91           Add EXISTS and DELETE methods to Env.pm.
92
93       "File::Fetch"
94           Updated to 0.22.
95
96       "I8N::Langinfo"
97           Correctly document export of I18N::Langinfo.
98
99       "I8N::LangTags"
100           In I18N::LangTags::Detect, avoid using defined @array and defined
101           %hash.
102
103       "IO::Compress"
104           Updated to 2.022.
105
106       "IPC::Cmd"
107           Updated to 0.54.
108
109       "List::Util"
110           Updated to 1.22.
111
112       "Locale::Maketext"
113           In Locale::Maketext, avoid using defined @array and defined %hash.
114           Convert the odd Locale::Maketext test out from Test to Test::More.
115
116       "Module::Build"
117           Updated to 0.35_08.
118
119       "Module::CoreList"
120           Implemented is_deprecated().
121
122       "Pod::Simple"
123           Updated to 3.10.
124
125       "Scalar::Util"
126           Updated to 1.22.
127
128       "Switch"
129           Updated to 2.16.
130

Utility Changes

132       a2p Fixed bugs with the match() operator in list context, remove
133           mention of $[.
134

Performance Enhancements

136       ·   Reversing an array to itself (as in "@a = reverse @a") in void
137           context now happens in-place and is several orders of magnitude
138           faster than it used to be. It will also preserve non-existent
139           elements whenever possible, i.e. for non magical arrays or tied
140           arrays with "EXISTS" and "DELETE" methods.
141

New or Changed Diagnostics

143       Several new diagnostics, see perldiag for details.
144
145       "Bad plugin affecting keyword '%s'"
146       "gmtime(%.0f) too large"
147       "Lexing code attempted to stuff non-Latin-1 character into Latin-1
148       input"
149       "Lexing code internal error (%s)"
150       "localtime(%.0f) too large"
151       "Overloaded dereference did not return a reference"
152       "Overloaded qr did not return a REGEXP"
153       "Perl_pmflag() is deprecated, and will be removed from the XS API"
154
155       One diagnostic has been removed:
156
157       "Runaway format"
158

Changed Internals

160       ·   "Perl_pmflag" has been removed from the public API. Calling it now
161           generates a deprecation warning, and it will be removed in a future
162           release. Although listed as part of the API, it was never
163           documented, and only ever used in toke.c, and prior to 5.10,
164           regcomp.c. In core, it has been replaced by a static function.
165

New Tests

167       t/op/while_readdir.t
168           Test that a bare readdir in while loop sets $_.
169

Known Problems

171       Known test failures on VMS
172           Perl 5.11.2 fails a small set of core and CPAN tests as of this
173           release. With luck, that'll be sorted out for 5.11.3.
174

Deprecations

176       The following items are now deprecated.
177
178   Use of ":=" to mean an empty attribute list is now deprecated.
179       An accident of Perl's parser meant that these constructions were all
180       equivalent:
181
182           my $pi := 4;
183           my $pi : = 4;
184           my $pi :  = 4;
185
186       with the ":" being treated as the start of an attribute list, which
187       ends before the "=". As whitespace is not significant here, all are
188       parsed as an empty attribute list, hence all the above are equivalent
189       to, and better written as
190
191           my $pi = 4;
192
193       because no attribute processing is done for an empty list.
194
195       As is, this meant that ":=" cannot be used as a new token, without
196       silently changing the meaning of existing code. Hence that particular
197       form is now deprecated, and will become a syntax error. If it is
198       absolutely necessary to have empty attribute lists (for example,
199       because of a code generator) then avoid the warning by adding a space
200       before the "=".
201

Acknowledgements

203       Perl 5.11.2 represents approximately 3 weeks development since Perl
204       5.11.1 and contains 29,992 lines of changes across 458 files from 38
205       authors and committers:
206
207       Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert,
208       Bram, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave
209       Rolsky, David E. Wheeler, David Golden, Eric Brine, Father
210       Chrysostomos, Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr,
211       Harmen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent,
212       Karl Williamson, Kevin Ryde, Leon Brocard, Nicholas Clark, Paul
213       Marquess, Philippe Bruhat, Rafael Garcia-Suarez, Sisyphus, Steffen
214       Mueller, Steve Hay, Steve Peters, Vincent Pit, Yuval Kogman, Yves
215       Orton, and Zefram.
216
217       Many of the changes included in this version originated in the CPAN
218       modules included in Perl's core. We're grateful to the entire CPAN
219       community for helping Perl to flourish.
220

Reporting Bugs

222       If you find what you think is a bug, you might check the articles
223       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
224       database at http://rt.perl.org/perlbug/ . There may also be information
225       at http://www.perl.org/ , the Perl Home Page.
226
227       If you believe you have an unreported bug, please run the perlbug
228       program included with your release. Be sure to trim your bug down to a
229       tiny but sufficient test case. Your bug report, along with the output
230       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
231       the Perl porting team.
232
233       If the bug you are reporting has security implications, which make it
234       inappropriate to send to a publicly archived mailing list, then please
235       send it to perl5-security-report@perl.org. This points to a closed
236       subscription unarchived mailing list, which includes all the core
237       committers, who be able to help assess the impact of issues, figure out
238       a resolution, and help co-ordinate the release of patches to mitigate
239       or fix the problem across all platforms on which Perl is supported.
240       Please only use this address for security issues in the Perl core, not
241       for modules independently distributed on CPAN.
242

SEE ALSO

244       The Changes file for an explanation of how to view exhaustive details
245       on what changed.
246
247       The INSTALL file for how to build Perl.
248
249       The README file for general stuff.
250
251       The Artistic and Copying files for copyright information.
252
253
254
255perl v5.12.4                      2011-06-01                  PERL5112DELTA(1)
Impressum