This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove most references to USENET from docs
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perldelta - what is new for perl v5.25.2
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.25.1 release and the 5.25.2
10 release.
11
12 If you are upgrading from an earlier release such as 5.25.0, first read
13 L<perl5251delta>, which describes differences between 5.25.0 and 5.25.1.
14
15 =head1 Core Enhancements
16
17 =head2 Perl can now do default collation in UTF-8 locales on platforms
18 that support it
19
20 Some platforms natively do a reasonable job of collating and sorting in
21 UTF-8 locales.  Perl now works with those.  For portability and full
22 control, L<Unicode::Collate> is still recommended, but now you may
23 not need to do anything special to get good-enough results, depending on
24 your application.  See
25 L<perllocale/Category C<LC_COLLATE>: Collation: Text Comparisons and Sorting>
26
27 =head2 Better locale collation of strings containing embedded C<NUL>
28 characters
29
30 In locales that have multi-level character weights, these are now
31 ignored at the higher priority ones.  There are still some gotchas in
32 some strings, though.  See
33 L<perllocale/Collation of strings containing embedded C<NUL> characters>.
34
35 =head2 Lexical subroutines are no longer experimental
36
37 Using the C<lexical_subs> feature no longer emits a warning.  Existing code that disables the C<experimental::lexical_subs> warning category that the
38 feature previously used will continue to work.  The C<lexical_subs> feature
39 has no effect; all Perl code can use lexical subroutines, regardless of
40 what feature declarations are in scope.
41
42 =head2 C<CORE> subroutines for hash and array functions callable via
43 reference
44
45 The hash and array functions in the C<CORE> namespace--C<keys>, C<each>,
46 C<values>, C<push>, C<pop>, C<shift>, C<unshift> and C<splice>--, can now
47 be called with ampersand syntax (C<&CORE::keys(\%hash>) and via reference
48 (C<<my $k = \&CORE::keys; $k->(\%hash) >>).  Previously they could only be
49 used when inlined.
50
51 =head1 Security
52
53 =head2 C<-Di> switch is now required for PerlIO debugging output
54
55 Previously PerlIO debugging output would be sent to the file specified
56 by the C<PERLIO_DEBUG> environment variable if perl wasn't running
57 setuid and the C<-T> or C<-t> switches hadn't been parsed yet.
58
59 If perl performed output at a point where it hadn't yet parsed its
60 switches this could result in perl creating or overwriting the file
61 named by C<PERLIO_DEBUG> even when the C<-T> switch had been supplied.
62
63 Perl now requires the C<-Di> switch to produce PerlIO debugging
64 output.  By default this is written to C<stderr>, but can optionally
65 be redirected to a file by setting the C<PERLIO_DEBUG> environment
66 variable.
67
68 If perl is running setuid or the C<-T> switch has supplied
69 C<PERLIO_DEBUG> is ignored and the debugging output is sent to
70 C<stderr> as for any other C<-D> switch.
71
72 =head1 Incompatible Changes
73
74 =head2 C<keys> returned from an lvalue subroutine
75
76 C<keys> returned from an lvalue subroutine can no longer be assigned
77 to in list context.
78
79     sub foo : lvalue { keys(%INC) }
80     (foo) = 3; # death
81     sub bar : lvalue { keys(@_) }
82     (bar) = 3; # also an error
83
84 This makes the lvalue sub case consistent with C<(keys %hash) = ...> and
85 C<(keys @_) = ...>, which are also errors.  [perl #128187]
86
87 =head1 Modules and Pragmata
88
89 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
90 go here.  If Module::CoreList is updated, generate an initial draft of the
91 following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
92 for important changes should then be added by hand.  In an ideal world,
93 dual-life modules would have a F<Changes> file that could be cribbed.
94
95 [ Within each section, list entries as a =item entry ]
96
97 =head2 New Modules and Pragmata
98
99 =over 4
100
101 =item *
102
103 XXX
104
105 =back
106
107 =head2 Updated Modules and Pragmata
108
109 =over 4
110
111 =item *
112
113 L<XXX> has been upgraded from version A.xx to B.yy.
114
115 =item *
116
117 L<Module::CoreList> has been upgraded from 5.20160520 to 5.20160620.
118
119 =back
120
121 =head2 Removed Modules and Pragmata
122
123 =over 4
124
125 =item *
126
127 XXX
128
129 =back
130
131 =head1 Documentation
132
133 =head2 Changes to Existing Documentation
134
135 =head3 L<perllocale>
136
137 =over 4
138
139 =item *
140
141 Document NUL collation handling.
142
143 =back
144
145 =head3 L<perlmodlib>
146
147 =over 4
148
149 =item *
150
151 Updated the mirror list.
152
153 =back
154
155 =head1 Diagnostics
156
157 The following additions or changes have been made to diagnostic output,
158 including warnings and fatal error messages.  For the complete list of
159 diagnostic messages, see L<perldiag>.
160
161 =head2 New Diagnostics
162
163 =head3 New Errors
164
165 =over 4
166
167 =item *
168
169 L<Version control conflict marker|perldiag/"Version control conflict marker">
170
171 (F) The parser found a line starting with C<E<lt><<<<<<>,
172 C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>. These may be left by a
173 version control system to mark conflicts after a failed merge operation.
174
175 =item *
176
177 L<%s: command not found|perldiag/"%s: command not found">
178
179 (A) You've accidentally run your script through B<bash> or another shell
180 instead of Perl.  Check the #! line, or manually feed your script into
181 Perl yourself.  The #! line at the top of your file could look like
182
183   #!/usr/bin/perl
184
185 =item *
186
187 L<%s: command not found: %s|perldiag/"%s: command not found: %s">
188
189 (A) You've accidentally run your script through B<zsh> or another shell
190 instead of Perl.  Check the #! line, or manually feed your script into
191 Perl yourself.  The #! line at the top of your file could look like
192
193   #!/usr/bin/perl
194
195 =item *
196
197 L<Unescaped left brace in regex is deprecated here, passed through in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated here, passed through in regex; marked by S<<-- HERE> in m/%s/">
198
199 Unescaped left braces are already illegal in some contexts in regular
200 expression patterns, but, due to an oversight, no deprecation warning
201 was raised in other contexts where they are intended to become illegal.
202 This warning is now raised in these contexts.
203
204 =back
205
206 =head2 Changes to Existing Diagnostics
207
208 =over 4
209
210 =item *
211
212 L<Unescaped left brace in regex is illegal here in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is illegal here in regex; marked by S<<-- HERE> in m/%s/">
213
214 The word "here" has been added to the message that was raised in
215 v5.25.1.  This is to indicate that there are contexts in which unescaped
216 left braces are not (yet) illegal.
217
218 =back
219
220 =head1 Configuration and Compilation
221
222 =over 4
223
224 =item *
225
226 F<make_ext.pl> no longer updates a module's F<pm_to_blib> file when no
227 files require updates.  This could cause dependencies, F<perlmain.c>
228 in particular, to be rebuilt unnecessarily.  [perl #126710]
229
230 =item *
231
232 The output of C<perl -V> has been reformatted so that each configuration
233 and compile-time option is now listed one per line, to improve
234 readability.
235
236 =back
237
238 =head1 Testing
239
240 =over 4
241
242 =item *
243
244 F<t/harness> now tries really hard not to run tests outside of the Perl
245 source tree. [perl #124050]
246
247 =back
248
249 =head1 Internal Changes
250
251 =over 4
252
253 =item *
254
255 Perl no longer panics when switching into some locales on machines with
256 buggy C<strxfrm()> implementations in their libc. [perl #121734]
257
258 =back
259
260 =head1 Selected Bug Fixes
261
262 =over 4
263
264 =item *
265
266 C< until ($x = 1) { ... } > and C< ... until $x = 1 > now properly
267 warn when syntax warnings are enabled.  [perl #127333]
268
269 =item *
270
271 socket() now leaves the error code returned by the system in C<$!> on
272 failure.  [perl #128316]
273
274 =item *
275
276 Assignment variants of any bitwise ops under the C<bitwise> feature would
277 crash if the left-hand side was an array or hash.  [perl #128204]
278
279 =item *
280
281 C<require> followed by a single colon (as in C<foo() ? require : ...> is
282 now parsed correctly as C<require> with implicit $_, rather than
283 C<require "">.  [perl #128307]
284
285 =item *
286
287 Scalar C<keys %hash> can now be assigned to consistently in all scalar
288 lvalue contexts.  Previously it worked for some contexts but not others.
289
290 =item *
291
292 List assignment to C<vec> or C<substr> with an array or hash for its first
293 argument used to result in crashes or "Can't coerce" error messages at run
294 time, unlike scalar assignment, which would give an error at compile time.
295 List assignment now gives a compile-time error, too.  [perl #128260]
296
297 =back
298
299 =head1 Acknowledgements
300
301 XXX Generate this with:
302
303   perl Porting/acknowledgements.pl v5.25.1..HEAD
304
305 =head1 Reporting Bugs
306
307 If you find what you think is a bug, you might check the perl bug database
308 at L<https://rt.perl.org/> .  There may also be information at
309 L<http://www.perl.org/> , the Perl Home Page.
310
311 If you believe you have an unreported bug, please run the L<perlbug> program
312 included with your release.  Be sure to trim your bug down to a tiny but
313 sufficient test case.  Your bug report, along with the output of C<perl -V>,
314 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
315
316 If the bug you are reporting has security implications which make it
317 inappropriate to send to a publicly archived mailing list, then see
318 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
319 for details of how to report the issue.
320
321 =head1 SEE ALSO
322
323 The F<Changes> file for an explanation of how to view exhaustive details on
324 what changed.
325
326 The F<INSTALL> file for how to build Perl.
327
328 The F<README> file for general stuff.
329
330 The F<Artistic> and F<Copying> files for copyright information.
331
332 =cut