Commit | Line | Data |
---|---|---|
cf73ceda MH |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | perl5231delta - what is new for perl v5.23.1 | |
6 | ||
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.23.0 release and the 5.23.1 | |
10 | release. | |
11 | ||
12 | If you are upgrading from an earlier release such as 5.22.0, first read | |
13 | L<perl5230delta>, which describes differences between 5.22.0 and 5.23.0. | |
14 | ||
15 | =head1 Core Enhancements | |
16 | ||
17 | =head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined | |
18 | ||
19 | Negative shifts are reverse shifts: left shift becomes right shift, | |
20 | and right shift becomes left shift. | |
21 | ||
22 | Shifting by the number of bits in a native integer (or more) is zero, | |
23 | except when the "overshift" is right shifting a negative value under | |
24 | C<use integer>, in which case the result is -1 (arithmetic shift). | |
25 | ||
26 | Until now negative shifting and overshifting have been undefined | |
27 | because they have relied on whatever the C implementation happens | |
28 | to do. For example, for the overshift a common C behavior is | |
29 | "modulo shift": | |
30 | ||
31 | 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior. | |
32 | ||
33 | # And the same for <<, while Perl now produces 0 for both. | |
34 | ||
35 | Now these behaviors are well-defined under Perl, regardless of what | |
36 | the underlying C implementation does. Note, however, that you cannot | |
37 | escape the native integer width, you need to know how far left you | |
38 | can go. You can use for example: | |
39 | ||
40 | use Config; | |
41 | my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3. | |
42 | ||
43 | If you need a more bits on the left shift, you can use for example | |
44 | the C<bigint> pragma, or the C<Bit::Vector> module from CPAN. | |
45 | ||
46 | =head2 Postfix dereferencing is no longer experimental | |
47 | ||
48 | Using the C<postderef> and C<postderef_qq> features no longer emits a | |
49 | warning. Existing code that disables the C<experimental::postderef> warning | |
50 | category that they previously used will continue to work. The C<postderef> | |
51 | feature has no effect; all Perl code can use postfix dereferencing, | |
52 | regardless of what feature declarations are in scope. The C<5.24> feature | |
53 | bundle now includes the C<postderef_qq> feature. | |
54 | ||
55 | =head2 printf and sprintf now allow reordered precision arguments | |
56 | ||
57 | That is, C<< sprintf '|%.*2$|', 2, 3 >> now returns C<|002|>. This extends | |
58 | the existing reordering mechanism (which allows reordering for arguments | |
59 | that are used as format fields, widths, and vector separators). | |
60 | ||
61 | =head1 Incompatible Changes | |
62 | ||
63 | =head2 ASCII characters in variable names must now be all visible | |
64 | ||
65 | It was legal until now on ASCII platforms for variable names to contain | |
66 | non-graphical ASCII control characters (ordinals 0 through 31, and 127, | |
67 | which are the C0 controls and C<DELETE>). This usage has been | |
68 | deprecated since v5.20, and as of now causes a syntax error. The | |
69 | variables these names referred to are special, reserved by Perl for | |
70 | whatever use it may choose, now, or in the future. Each such variable | |
71 | has an alternative way of spelling it. Instead of the single | |
72 | non-graphic control character, a two character sequence beginning with a | |
73 | caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at | |
74 | L<perlvar>. It remains legal, though unwise and deprecated (raising a | |
75 | deprecation warning), to use certain non-graphic non-ASCII characters in | |
76 | variables names when not under S<C<use utf8>>. No code should do this, | |
77 | as all such variables are reserved by Perl, and Perl doesn't currently | |
78 | define any of them (but could at any time, without notice). | |
79 | ||
80 | =head2 The C<autoderef> feature has been removed | |
81 | ||
82 | The experimental C<autoderef> feature (which allowed calling C<push>, | |
83 | C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on | |
84 | a scalar argument) has been deemed unsuccessful. It has now been removed; | |
85 | trying to use the feature (or to disable the C<experimental::autoderef> | |
86 | warning it previously triggered) now yields an exception. | |
87 | ||
88 | =head1 Modules and Pragmata | |
89 | ||
90 | =head2 Updated Modules and Pragmata | |
91 | ||
92 | =over 4 | |
93 | ||
94 | =item * | |
95 | ||
96 | The libnet distribution has been upgraded from version 3.06 to 3.07. | |
97 | ||
98 | =item * | |
99 | ||
100 | L<autodie> has been upgraded from version 2.27 to 2.29. | |
101 | ||
102 | =item * | |
103 | ||
104 | L<DynaLoader> has been upgraded from version 1.32 to 1.33. | |
105 | ||
106 | =item * | |
107 | ||
108 | L<Encode> has been upgraded from version 2.73 to 2.75. | |
109 | ||
110 | =item * | |
111 | ||
112 | L<encoding> has been upgraded from version 2.15 to 2.16. | |
113 | ||
114 | =item * | |
115 | ||
116 | L<feature> has been upgraded from version 1.41 to 1.42. | |
117 | ||
118 | =item * | |
119 | ||
120 | L<File::Path> has been upgraded from version 2.09 to 2.11. | |
121 | ||
122 | =item * | |
123 | ||
124 | L<Getopt::Long> has been upgraded from version 2.46 to 2.47. | |
125 | ||
126 | =item * | |
127 | ||
128 | L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13. | |
129 | ||
130 | =item * | |
131 | ||
132 | L<IPC::Open3> has been upgraded from version 1.18 to 1.19. | |
133 | ||
134 | If a Perl exception was thrown from inside this module, the exception | |
135 | C<IPC::Open3> threw to the callers of C<open3> would have an irrelevant | |
136 | message derived from C<$!> which was in an undefined state, instead of the | |
137 | C<$@> message which triggers the failure path inside C<open3>. | |
138 | ||
139 | =item * | |
140 | ||
141 | L<Module::CoreList> has been upgraded from version 5.20150620 to 5.20150720. | |
142 | ||
143 | =item * | |
144 | ||
145 | L<Opcode> has been upgraded from version 1.32 to 1.33. | |
146 | ||
147 | =item * | |
148 | ||
149 | L<PerlIO::scalar> has been upgraded from version 0.22 to 0.23. | |
150 | ||
151 | =item * | |
152 | ||
153 | L<POSIX> has been upgraded from version 1.54 to 1.55. | |
154 | ||
155 | =item * | |
156 | ||
157 | L<Socket> has been upgraded from version 2.019 to 2.020. | |
158 | ||
159 | =item * | |
160 | ||
161 | L<Storable> has been upgraded from version 2.53 to 2.54. | |
162 | ||
163 | =item * | |
164 | ||
165 | L<Unicode::Collate> has been upgraded from version 1.12 to 1.14. | |
166 | ||
167 | =item * | |
168 | ||
169 | L<Unicode::Normalize> has been upgraded from version 1.18 to 1.19. | |
170 | ||
171 | =item * | |
172 | ||
173 | L<warnings> has been upgraded from version 1.32 to 1.33. | |
174 | ||
175 | =item * | |
176 | ||
177 | L<XS::Typemap> has been upgraded from version 0.13 to 0.14. | |
178 | ||
179 | =back | |
180 | ||
181 | =head1 Diagnostics | |
182 | ||
183 | The following additions or changes have been made to diagnostic output, | |
184 | including warnings and fatal error messages. For the complete list of | |
185 | diagnostic messages, see L<perldiag>. | |
186 | ||
187 | =head2 Changes to Existing Diagnostics | |
188 | ||
189 | =over 4 | |
190 | ||
191 | =item * | |
192 | ||
193 | The C<printf> and C<sprintf> builtins are now more careful about the | |
194 | warnings they emit: argument reordering now disables the "redundant | |
195 | argument" warning in all cases; and invalid format strings are no longer | |
196 | treated as absorbing arguments (so "redundant argument" warnings can | |
197 | correctly be emitted by such code). | |
198 | ||
199 | =back | |
200 | ||
201 | =head1 Platform Support | |
202 | ||
203 | =head2 Platform-Specific Notes | |
204 | ||
205 | =over 4 | |
206 | ||
207 | =item VMS | |
208 | ||
209 | =over | |
210 | ||
211 | =item * | |
212 | ||
213 | The minimum supported version of VMS is now v7.3-2, released in 2003. As a | |
214 | side effect of this change, VAX is no longer supported as the terminal | |
215 | release of OpenVMS VAX was v7.3 in 2001. | |
216 | ||
217 | =back | |
218 | ||
219 | =back | |
220 | ||
221 | =head1 Internal Changes | |
222 | ||
223 | =over 4 | |
224 | ||
225 | =item * | |
226 | ||
227 | C<sv_catpvf> and related functions (including C<sv_vcatpvfn_flags> when | |
228 | called with a C<va_list> rather than an array of SV pointers) have never | |
229 | handled argument reordering. Attempts to reorder arguments now yield an | |
230 | exception, rather than being silently ignored. | |
231 | ||
232 | =back | |
233 | ||
234 | =head1 Selected Bug Fixes | |
235 | ||
236 | =over 4 | |
237 | ||
238 | =item * | |
239 | ||
240 | A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *> | |
241 | or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These | |
242 | particular typemap entries are thought to be extremely rarely used by XS | |
243 | modules. [perl #124181] | |
244 | ||
245 | =item * | |
246 | ||
247 | C<alarm()> and C<sleep()> will now warn if the argument is a negative number | |
248 | and return undef. Previously they would pass the negative value to the | |
249 | underlying C function which may have set up a timer with a surprising value. | |
250 | ||
251 | =back | |
252 | ||
253 | =head1 Acknowledgements | |
254 | ||
255 | Perl 5.23.1 represents approximately 4 weeks of development since Perl 5.23.0 | |
256 | and contains approximately 8,400 lines of changes across 320 files from 22 | |
257 | authors. | |
258 | ||
259 | Excluding auto-generated files, documentation and release tools, there were | |
260 | approximately 5,000 lines of changes to 140 .pm, .t, .c and .h files. | |
261 | ||
262 | Perl continues to flourish into its third decade thanks to a vibrant community | |
263 | of users and developers. The following people are known to have contributed the | |
264 | improvements that became Perl 5.23.1: | |
265 | ||
266 | Aaron Crane, Aristotle Pagaltzis, Chas. Owens, Chris 'BinGOs' Williams, Craig | |
267 | A. Berry, Daniel Dragan, David Mitchell, Father Chrysostomos, Herbert Breunung, | |
268 | H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl | |
269 | Williamson, Leon Timmermans, Matthew Horsfall, Max Maischein, Rafael | |
270 | Garcia-Suarez, Ricardo Signes, Stanislaw Pusep, Steve Hay, Tony Cook. | |
271 | ||
272 | The list above is almost certainly incomplete as it is automatically generated | |
273 | from version control history. In particular, it does not include the names of | |
274 | the (very much appreciated) contributors who reported issues to the Perl bug | |
275 | tracker. | |
276 | ||
277 | Many of the changes included in this version originated in the CPAN modules | |
278 | included in Perl's core. We're grateful to the entire CPAN community for | |
279 | helping Perl to flourish. | |
280 | ||
281 | For a more complete list of all of Perl's historical contributors, please see | |
282 | the F<AUTHORS> file in the Perl source distribution. | |
283 | ||
284 | =head1 Reporting Bugs | |
285 | ||
286 | If you find what you think is a bug, you might check the articles recently | |
287 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
288 | L<https://rt.perl.org/> . There may also be information at | |
289 | L<http://www.perl.org/> , the Perl Home Page. | |
290 | ||
291 | If you believe you have an unreported bug, please run the L<perlbug> program | |
292 | included with your release. Be sure to trim your bug down to a tiny but | |
293 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
294 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
295 | ||
296 | If the bug you are reporting has security implications, which make it | |
297 | inappropriate to send to a publicly archived mailing list, then please send it | |
298 | to perl5-security-report@perl.org. This points to a closed subscription | |
299 | unarchived mailing list, which includes all the core committers, who will be | |
300 | able to help assess the impact of issues, figure out a resolution, and help | |
301 | co-ordinate the release of patches to mitigate or fix the problem across all | |
302 | platforms on which Perl is supported. Please only use this address for | |
303 | security issues in the Perl core, not for modules independently distributed on | |
304 | CPAN. | |
305 | ||
306 | =head1 SEE ALSO | |
307 | ||
308 | The F<Changes> file for an explanation of how to view exhaustive details on | |
309 | what changed. | |
310 | ||
311 | The F<INSTALL> file for how to build Perl. | |
312 | ||
313 | The F<README> file for general stuff. | |
314 | ||
315 | The F<Artistic> and F<Copying> files for copyright information. | |
316 | ||
317 | =cut |