This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bareword sub lookups
[perl5.git] / pod / perl5112delta.pod
CommitLineData
d5114285
NC
1=head1 NAME
2
3[ Any text flagged as XXX needs to be processed before release. ]
4
5perldelta - what is new for perl v5.11.2
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.11.1 release and
10the 5.11.2 release.
11
12=head1 Notice
13
14XXX Unlikely to need this section.
15
16=head1 Incompatible Changes
17
d83f38d8 18=head2 Use of C<:=> to mean an empty attribute list is now deprecated.
d5114285 19
d83f38d8 20An accident of Perl's parser means that these constructions are all equivalent:
d5114285 21
d83f38d8
NC
22 my $pi := 4;
23 my $pi : = 4;
24 my $pi : = 4;
25
26with the C<:> being treated as the start of an attribute list, which ends
27before the C<=>. As whitespace is not significant here, all are parsed as an
28empty attribute list, hence all the above are equivalent to, and better written
29as
30
31 my $pi = 4;
32
33because no attribute processing is done for an empty list.
34
35As is, this means that C<:=> cannot be used as a new token, without silently
36changing the meaning of existing code. Hence that particular form is now
37deprecated, and will become a syntax error. If it is absolutely necessary to
38have empty attribute lists (for example, because of a code generator) the
39avoid the warning by adding a space before the C<=>.
d5114285
NC
40
41=head1 Core Enhancements
42
43XXX New core language features go here. Summarise user-visible core language
44enhancements. Particularly prominent performance optimisations could go
45here, but most should go in the L</Performance Enhancements> section.
46
97352077
RGS
47=head2 qr overloading
48
49It is now possible to overload the C<qr//> operator, that is, conversion
50to regexp, like it was already possible to overload conversion to
51boolean, string or number of objects. It is invoked when an object
52appears on the right hand side of the C<=~> operator, or when it is
53interpolated into a regexp. See L<overload>.
54
88e1f1a2
JV
55=head2 Pluggable keywords
56
57Extension modules can now cleanly hook into the Perl parser to define new
58kinds of keyword-headed expression and compound statement. The syntax
59following the keyword is defined entirely by the extension. This allow
60a completely non-Perl sublanguage to be parsed inline, with the right
61ops cleanly generated.
62
63This feature is currently considered experimental, and using it to do
64anything interesting is difficult. Many necessary supporting facilities,
65such as the lexer and the pad system, can only be accessed through
66unsupported internal interfaces. It is intended that the Perl 5.13
67development cycle will see the addition of clean, supported interfaces
68for many of these functions. In Perl 5.12 most uses of pluggable keywords
69will be via L<Devel::Declare>.
70
71See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core source
72distribution also includes a new module L<XS::APItest::KeywordRPN>, which
73implements reverse Polish notation arithmetic via pluggable keywords.
74This module is mainly used for test purposes, and is not normally
75installed, but also serves as an example of how to use the new mechanism.
76
f7461760
Z
77=head2 Overridable function lookup
78
79Where an extension module hooks the creation of rv2cv ops, to modify
80the subroutine lookup process, this now works correctly for bareword
81subroutine calls. This means that prototypes on subroutines referenced
82this way will be processed correctly. (Previously bareword subroutine
83names were initially looked up, for parsing purposes, by an unhookable
84mechanism, so extensions could only properly influence subroutine names
85that appeared with an C<&> sigil.)
86
d5114285
NC
87=head1 New Platforms
88
89XXX List any platforms that this version of perl compiles on, that previous
90versions did not. These will either be enabled by new files in the F<hints/>
91directories, or new subdirectories and F<README> files at the top level of the
92source tree.
93
94=head1 Modules and Pragmata
95
96XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
97go here, in a list ordered by distribution name. Minimally it should be the
98module version, but it's more useful to the end user to give a paragraph's
99summary of the module's changes. In an ideal world, dual-life modules would
100have a F<Changes> file that could be cribbed.
101
102=head2 New Modules and Pragmata
103
104=over 4
105
106=item C<XXX>
107
108XXX
109
110=back
111
112=head2 Pragmata Changes
113
114=over 4
115
116=item C<XXX>
117
118XXX
119
120=back
121
122=head2 Updated Modules
123
124=over 4
125
126=item C<XXX>
127
128XXX
129
130=back
131
132=head1 Utility Changes
133
134XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
135here. Most of these are built within the directories F<utils> and F<x2p>.
136
137=over 4
138
139=item F<XXX>
140
141XXX
142
143=back
144
145=head1 New Documentation
146
147XXX Changes which create B<new> files in F<pod/> go here.
148
149=over 4
150
151=item L<XXX>
152
153XXX
154
155=back
156
157=head1 Changes to Existing Documentation
158
159XXX Changes which significantly change existing files in F<pod/> go here.
160Any changes to F<pod/perldiag.pod> should go in L</New or Changed Diagnostics>.
161
162
163=head1 Performance Enhancements
164
165XXX Changes which enhance performance without changing behaviour go here. There
166may well be none in a stable release.
167
168=over 4
169
170=item *
171
172XXX
173
174=back
175
176=head1 Installation and Configuration Improvements
177
178XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
179go here.
180
181=head2 Configuration improvements
182
183XXX
184
185=head2 Compilation improvements
186
187XXX
188
189=head2 Platform Specific Changes
190
191=over 4
192
193=item XXX-some-platform
194
195XXX
196
197=back
198
199=head1 Selected Bug Fixes
200
201XXX Important bug fixes in the core language are summarised here.
202Bug fixes in files in F<ext/> and F<lib/> are best summarised in
203L</Modules and Pragmata>.
204
205=over 4
206
207=item *
208
209XXX
210
211=back
212
213=head1 New or Changed Diagnostics
214
215XXX New or changed warnings emitted by the core's C<C> code go here.
216
217=over 4
218
219=item C<XXX>
220
221XXX
222
223=back
224
225=head1 Changed Internals
226
d5114285
NC
227=over 4
228
229=item *
230
879d0c72
NC
231C<Perl_pmflag> has been removed from the public API. Calling it now generates
232a deprecation warning, and it will be removed in a future release. Although
233listed as part of the API, it was never documented, and only ever used in
234F<toke.c>, and prior to 5.10, F<regcomp.c>. In core, it has been replaced by a
235static function.
d5114285
NC
236
237=back
238
239=head1 New Tests
240
241XXX Changes which create B<new> files in F<t/> go here. Changes to
242existing files in F<t/> aren't worth summarising, although the bugs that
243they represent may be.
244
245=over 4
246
247=item F<XXX>
248
249XXX
250
251=back
252
253=head1 Known Problems
254
255XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
256tests that had to be C<TODO>ed for the release would be noted here, unless
257they were specific to a particular platform (see below).
258
259This is a list of some significant unfixed bugs, which are regressions
260from either 5.10.1 or 5.11.1.
261
262=over 4
263
264=item *
265
266XXX
267
268=back
269
270=head1 Deprecations
271
272XXX Add any new known deprecations here.
273
274The following items are now deprecated.
275
276=over 4
277
278=item *
279
280XXX
281
282=back
283
284=head1 Platform Specific Notes
285
286XXX Any changes specific to a particular platform. VMS and Win32 are the usual
287stars here. It's probably best to group changes under the same section layout
288as the main perldelta
289
290=head1 Obituary
291
292XXX If any significant core contributor has died, we've added a short obituary
293here.
294
295=head1 Acknowledgements
296
297XXX The list of people to thank goes here.
298
299
300=head1 Reporting Bugs
301
302If you find what you think is a bug, you might check the articles
303recently posted to the comp.lang.perl.misc newsgroup and the perl
304bug database at http://rt.perl.org/perlbug/ . There may also be
305information at http://www.perl.org/ , the Perl Home Page.
306
307If you believe you have an unreported bug, please run the B<perlbug>
308program included with your release. Be sure to trim your bug down
309to a tiny but sufficient test case. Your bug report, along with the
310output of C<perl -V>, will be sent off to perlbug@perl.org to be
311analysed by the Perl porting team.
312
313If the bug you are reporting has security implications, which make it
314inappropriate to send to a publicly archived mailing list, then please send
315it to perl5-security-report@perl.org. This points to a closed subscription
316unarchived mailing list, which includes all the core committers, who be able
317to help assess the impact of issues, figure out a resolution, and help
318co-ordinate the release of patches to mitigate or fix the problem across all
319platforms on which Perl is supported. Please only use this address for
320security issues in the Perl core, not for modules independently
321distributed on CPAN.
322
323=head1 SEE ALSO
324
325The F<Changes> file for an explanation of how to view exhaustive details
326on what changed.
327
328The F<INSTALL> file for how to build Perl.
329
330The F<README> file for general stuff.
331
332The F<Artistic> and F<Copying> files for copyright information.
333
334=cut