|
| 1 | +=encoding utf8 |
| 2 | + |
| 3 | +=head1 NAME |
| 4 | + |
| 5 | +perl54110delta - what is new for perl v5.41.10 |
| 6 | + |
| 7 | +=head1 DESCRIPTION |
| 8 | + |
| 9 | +This document describes differences between the 5.41.9 release and the 5.41.10 |
| 10 | +release. |
| 11 | + |
| 12 | +If you are upgrading from an earlier release such as 5.41.8, first read |
| 13 | +L<perl5419delta>, which describes differences between 5.41.8 and 5.41.9. |
| 14 | + |
| 15 | +=head1 Core Enhancements |
| 16 | + |
| 17 | +=head2 Renamed C<any> and C<all> features to C<keyword_any> and C<keyword_all> |
| 18 | + |
| 19 | +Perl release 5.41.7 introduced two new experimental features, called C<any> |
| 20 | +and C<all>, which enable keywords of the same names. Those keywords provide |
| 21 | +list-processing operators inspired by the ones from L<List::Util> of the same |
| 22 | +name. It was subsequently considered that the names of these two features |
| 23 | +are confusingly close to the ability of the C<feature> module to refer to all |
| 24 | +of its features by using the C<:all> export tag. |
| 25 | +[L<GH #23104|https://github.com/Perl/perl5/issues/23104>] |
| 26 | + |
| 27 | +As a consequence, these feature flags have now been renamed to C<keyword_any> |
| 28 | +and C<keyword_all> to avoid this confusion. Likewise, the related |
| 29 | +experimental warning flags are also renamed to C<experimental::keyword_any> |
| 30 | +and C<experimental::keyword_all>. Apart from these new flag names, the |
| 31 | +actual syntax and semantics of these two operators remain unchanged since |
| 32 | +their appearance in Perl release 5.41.7. |
| 33 | + |
| 34 | + use v5.40; |
| 35 | + use feature 'keyword_all'; |
| 36 | + no warnings 'experimental::keyword_all'; |
| 37 | + |
| 38 | + my @numbers = ... |
| 39 | + |
| 40 | + if(all { $_ % 2 == 0 } @numbers) { |
| 41 | + say "All the numbers are even"; |
| 42 | + } |
| 43 | + |
| 44 | +=head2 New C<SvVSTRING> API macro |
| 45 | + |
| 46 | +A new API macro has been added, which is used to obtain the second string |
| 47 | +buffer out of a "vstring" SV, in a manner similar to the C<SvPV> macro which |
| 48 | +obtains the regular string buffer out of a regular SV. |
| 49 | + |
| 50 | + STRLEN len; |
| 51 | + const char *vstr_pv = SvVSTRING(sv, vstr_len); |
| 52 | + |
| 53 | +See L<perlapi/C<SvVSTRING>>. |
| 54 | + |
| 55 | +=head1 Performance Enhancements |
| 56 | + |
| 57 | +=over 4 |
| 58 | + |
| 59 | +=item * |
| 60 | + |
| 61 | +String reversal from a single argument, when the string buffer is not |
| 62 | +"swiped", is now done in a single pass and is noticeably faster. |
| 63 | +The extent of the improvement is compiler & hardware dependent. |
| 64 | +[L<GH #23012|https://github.com/Perl/perl5/issues/23012>] |
| 65 | + |
| 66 | +=back |
| 67 | + |
| 68 | +=head1 Modules and Pragmata |
| 69 | + |
| 70 | +=head2 Updated Modules and Pragmata |
| 71 | + |
| 72 | +=over 4 |
| 73 | + |
| 74 | +=item * |
| 75 | + |
| 76 | +L<Archive::Tar> has been upgraded from version 3.02_001 to 3.04. |
| 77 | + |
| 78 | +=item * |
| 79 | + |
| 80 | +L<Benchmark> has been upgraded from version 1.26 to 1.27. |
| 81 | + |
| 82 | +=item * |
| 83 | + |
| 84 | +L<builtin> has been upgraded from version 0.017 to 0.018. |
| 85 | + |
| 86 | +On platforms that don't support Inf/NaN values in floating-point numbers (such |
| 87 | +as VAX), C<builtin::inf> and C<builtin::nan> now throw a runtime error (rather |
| 88 | +than breaking the perl build). [L<GH #22882|https://github.com/Perl/perl5/issues/22882>] |
| 89 | + |
| 90 | +=item * |
| 91 | + |
| 92 | +L<ExtUtils::MakeMaker> has been upgraded from version 7.70 to 7.72. |
| 93 | + |
| 94 | +=item * |
| 95 | + |
| 96 | +L<ExtUtils::ParseXS> has been extensively refactored internally and |
| 97 | +extensive tests have been added. Most of these changes shouldn't be |
| 98 | +visible externally with a few exceptions, the main ones being: |
| 99 | + |
| 100 | +The generated C code, especially for returning values, may have changed |
| 101 | +slightly, and in some cases be slightly more efficient (in particular, |
| 102 | +using C<TARG> more often to return a value rather than creating a new |
| 103 | +temporary). |
| 104 | + |
| 105 | +The parser is more likely to give warnings now on XS errors which |
| 106 | +previously would have just silently generated invalid C code. |
| 107 | + |
| 108 | +One XS bug has been fixed in a way that may be highly visible. Previously |
| 109 | +when parsing the parameters of an XS sub declaration, if a parameter |
| 110 | +couldn't be parsed, it was quietly ignored. This meant that it would still |
| 111 | +consume an argument, but wouldn't declare a C variable: a bit like the |
| 112 | +Perl-level C<my ($a, undef, $c) = @_>. Now, it gives a compile error. This |
| 113 | +will break XS code that does (for example): |
| 114 | + |
| 115 | + void |
| 116 | + foo(int a, /* skip arg */, int c) |
| 117 | + |
| 118 | +because C-comments aren't part of XS syntax, and so the parameter was a |
| 119 | +syntax error and was quietly skipped. This is better written as |
| 120 | + |
| 121 | + void |
| 122 | + foo(int a, b, int c) |
| 123 | + |
| 124 | +since parameters which are not assigned a type act as placeholders. |
| 125 | + |
| 126 | +=item * |
| 127 | + |
| 128 | +L<feature> has been upgraded from version 1.94 to 1.95. |
| 129 | + |
| 130 | +=item * |
| 131 | + |
| 132 | +L<fields> has been upgraded from version 2.26 to 2.27. |
| 133 | + |
| 134 | +=item * |
| 135 | + |
| 136 | +L<Math::BigInt> has been upgraded from version 2.003004 to 2.004001. |
| 137 | + |
| 138 | +=item * |
| 139 | + |
| 140 | +L<Math::BigInt::FastCalc> has been upgraded from version 0.5018 to 0.5019. |
| 141 | + |
| 142 | +=item * |
| 143 | + |
| 144 | +L<Module::CoreList> has been upgraded from version 5.20250220 to 5.20250321. |
| 145 | + |
| 146 | +=item * |
| 147 | + |
| 148 | +L<Safe> has been upgraded from version 2.46 to 2.47. |
| 149 | + |
| 150 | +=item * |
| 151 | + |
| 152 | +L<Search::Dict> has been upgraded from version 1.07 to 1.08. |
| 153 | + |
| 154 | +A missing parameter has been added to the sample code in the SYNOPSIS. |
| 155 | + |
| 156 | +=item * |
| 157 | + |
| 158 | +L<Storable> has been upgraded from version 3.35 to 3.36. |
| 159 | + |
| 160 | +=item * |
| 161 | + |
| 162 | +L<threads> has been upgraded from version 2.42 to 2.43. |
| 163 | + |
| 164 | +=item * |
| 165 | + |
| 166 | +L<VMS::Filespec> has been upgraded from version 1.14 to 1.15. |
| 167 | + |
| 168 | +=item * |
| 169 | + |
| 170 | +L<warnings> has been upgraded from version 1.73 to 1.74. |
| 171 | + |
| 172 | +=item * |
| 173 | + |
| 174 | +L<XS::APItest> has been upgraded from version 1.40 to 1.41. |
| 175 | + |
| 176 | +=back |
| 177 | + |
| 178 | +=head1 Documentation |
| 179 | + |
| 180 | +=head2 Changes to Existing Documentation |
| 181 | + |
| 182 | +We have attempted to update the documentation to reflect the changes |
| 183 | +listed in this document. If you find any we have missed, open an issue |
| 184 | +at L<https://github.com/Perl/perl5/issues>. |
| 185 | + |
| 186 | +Additionally, the following selected changes have been made: |
| 187 | + |
| 188 | +=head3 L<perldata> |
| 189 | + |
| 190 | +=over 4 |
| 191 | + |
| 192 | +=item * |
| 193 | + |
| 194 | +Binary and octal floating-point constants (such as C<012.345p-2> and |
| 195 | +C<0b101.11p-1>) are now documented. This feature was first introduced in perl |
| 196 | +5.22.0 together with hexadecimal floating-point constants and had a few bug |
| 197 | +fixes in perl 5.28.0, but it was never formally documented. |
| 198 | +[L<GH #18664|https://github.com/Perl/perl5/issues/18664>] |
| 199 | + |
| 200 | +=back |
| 201 | + |
| 202 | +=head1 Diagnostics |
| 203 | + |
| 204 | +The following additions or changes have been made to diagnostic output, |
| 205 | +including warnings and fatal error messages. For the complete list of |
| 206 | +diagnostic messages, see L<perldiag>. |
| 207 | + |
| 208 | +=head2 Changes to Existing Diagnostics |
| 209 | + |
| 210 | +=over 4 |
| 211 | + |
| 212 | +=item * |
| 213 | + |
| 214 | +L<Use of uninitialized value%s|perldiag/"Use of uninitialized value%s"> |
| 215 | + |
| 216 | +Prevent this warning when accessing a function parameter in C<@_> that |
| 217 | +is an lvalue reference to an untied hash element where the key was |
| 218 | +undefined. This warning is still produced at the point of call. |
| 219 | +[L<GH #22423|https://github.com/Perl/perl5/issues/22423>] |
| 220 | + |
| 221 | +=back |
| 222 | + |
| 223 | +=head1 Testing |
| 224 | + |
| 225 | +Tests were added and changed to reflect the other additions and changes |
| 226 | +in this release. |
| 227 | + |
| 228 | +=head1 Internal Changes |
| 229 | + |
| 230 | +=over 4 |
| 231 | + |
| 232 | +=item * |
| 233 | + |
| 234 | +Three new API functions have been added to interact with the regexp global |
| 235 | +match position stored in an SV. These are C<sv_regex_global_pos_get()>, |
| 236 | +C<sv_regex_global_pos_set()> and C<sv_regex_global_pos_clear()>. Using these |
| 237 | +API functions avoids XS modules needing to know about or interact directly |
| 238 | +with the way this position is currently stored, which involves the |
| 239 | +C<PERL_MAGIC_regex_global> magic type. |
| 240 | + |
| 241 | +=back |
| 242 | + |
| 243 | +=head1 Selected Bug Fixes |
| 244 | + |
| 245 | +=over 4 |
| 246 | + |
| 247 | +=item * |
| 248 | + |
| 249 | +In regexes, the contents of C<\g{...}> backreferences are now properly |
| 250 | +validated. Previously, C<\g{1 FOO}> was silently parsed as C<\g{1}>, ignoring |
| 251 | +everything after the first number. |
| 252 | +[L<GH #23050|https://github.com/Perl/perl5/issues/23050>] |
| 253 | + |
| 254 | +=item * |
| 255 | + |
| 256 | +A run-time pattern which contained a code block which recursed back to the |
| 257 | +same bit of code which ran that match, could cause a crash. |
| 258 | +[L<GH #22869|https://github.com/Perl/perl5/issues/22869>] |
| 259 | + |
| 260 | +For example: |
| 261 | + |
| 262 | + my $r = qr/... (?{ foo() if ... }) .../; |
| 263 | + sub foo { $string =~ $r } |
| 264 | + foo() |
| 265 | + |
| 266 | +=back |
| 267 | + |
| 268 | +=head1 Obituary |
| 269 | + |
| 270 | +Andrew Main (ZEFRAM) passed away on March 10, 2025. |
| 271 | + |
| 272 | +Zefram was a brilliant person, seemingly knowledgeable in everything |
| 273 | +and happy to impart his knowledge and share his striking insights with a |
| 274 | +gentle, technical demeanor that often failed to convey the genuine care |
| 275 | +with which he communicated. |
| 276 | + |
| 277 | +It would be impossible to overstate the impact that Zefram has had on |
| 278 | +both the language and culture of Perl over the years. From his countless |
| 279 | +contributions to the code-base, to his often quirky but always distinctive |
| 280 | +appearances at conferences and gatherings, his influence and memory are |
| 281 | +sure to endure long into the future. |
| 282 | + |
| 283 | +Zefram wished to have no designated memorial location in |
| 284 | +meatspace. His designated memorial location in cyberspace is |
| 285 | +L<http://www.fysh.org/~zefram/personal/>. |
| 286 | + |
| 287 | +=head1 Acknowledgements |
| 288 | + |
| 289 | +Perl 5.41.10 represents approximately 4 weeks of development since Perl |
| 290 | +5.41.9 and contains approximately 19,000 lines of changes across 340 files |
| 291 | +from 14 authors. |
| 292 | + |
| 293 | +Excluding auto-generated files, documentation and release tools, there were |
| 294 | +approximately 16,000 lines of changes to 270 .pm, .t, .c and .h files. |
| 295 | + |
| 296 | +Perl continues to flourish into its fourth decade thanks to a vibrant |
| 297 | +community of users and developers. The following people are known to have |
| 298 | +contributed the improvements that became Perl 5.41.10: |
| 299 | + |
| 300 | +brian d foy, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Daniel |
| 301 | +Dragan, David Mitchell, Graham Knop, Karl Williamson, Leon Timmermans, Lukas |
| 302 | +Mai, Paul Evans, Philippe Bruhat (BooK), Richard Leach, Tony Cook, Yves |
| 303 | +Orton. |
| 304 | + |
| 305 | +The list above is almost certainly incomplete as it is automatically |
| 306 | +generated from version control history. In particular, it does not include |
| 307 | +the names of the (very much appreciated) contributors who reported issues to |
| 308 | +the Perl bug tracker. |
| 309 | + |
| 310 | +Many of the changes included in this version originated in the CPAN modules |
| 311 | +included in Perl's core. We're grateful to the entire CPAN community for |
| 312 | +helping Perl to flourish. |
| 313 | + |
| 314 | +For a more complete list of all of Perl's historical contributors, please |
| 315 | +see the F<AUTHORS> file in the Perl source distribution. |
| 316 | + |
| 317 | +=head1 Reporting Bugs |
| 318 | + |
| 319 | +If you find what you think is a bug, you might check the perl bug database |
| 320 | +at L<https://github.com/Perl/perl5/issues>. There may also be information at |
| 321 | +L<https://www.perl.org/>, the Perl Home Page. |
| 322 | + |
| 323 | +If you believe you have an unreported bug, please open an issue at |
| 324 | +L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a |
| 325 | +tiny but sufficient test case. |
| 326 | + |
| 327 | +If the bug you are reporting has security implications which make it |
| 328 | +inappropriate to send to a public issue tracker, then see |
| 329 | +L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> |
| 330 | +for details of how to report the issue. |
| 331 | + |
| 332 | +=head1 Give Thanks |
| 333 | + |
| 334 | +If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, |
| 335 | +you can do so by running the C<perlthanks> program: |
| 336 | + |
| 337 | + perlthanks |
| 338 | + |
| 339 | +This will send an email to the Perl 5 Porters list with your show of thanks. |
| 340 | + |
| 341 | +=head1 SEE ALSO |
| 342 | + |
| 343 | +The F<Changes> file for an explanation of how to view exhaustive details on |
| 344 | +what changed. |
| 345 | + |
| 346 | +The F<INSTALL> file for how to build Perl. |
| 347 | + |
| 348 | +The F<README> file for general stuff. |
| 349 | + |
| 350 | +The F<Artistic> and F<Copying> files for copyright information. |
| 351 | + |
| 352 | +=cut |
0 commit comments