=encoding utf8
-=for comment
-This has been completed up to 527d644b124fe.
-
=head1 NAME
-[ this is a template for a new perldelta file. Any text flagged as
-XXX needs to be processed before release. ]
-
-perldelta - what is new for perl v5.15.3
+perldelta - what is new for perl v5.15.4
=head1 DESCRIPTION
-This document describes differences between the 5.15.2 release and
-the 5.15.3 release.
-
-If you are upgrading from an earlier release such as 5.15.1, first read
-L<perl5152delta>, which describes differences between 5.15.1 and
-5.15.2.
-
-=head1 Notice
+This document describes differences between the 5.15.3 release and
+the 5.15.4 release.
-XXX Any important notices here
+If you are upgrading from an earlier release such as 5.15.3, first read
+L<perl5153delta>, which describes differences between 5.15.3 and
+5.15.4.
=head1 Core Enhancements
-XXX New core language features go here. Summarise user-visible core language
-enhancements. Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
+=head2 $^X converted to an absolute path on FreeBSD, OS X and Solaris
-[ List each enhancement as a =head2 entry ]
+C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
+needing F</proc> mounted) and Solaris 10 and 11. This augments the
+previous approach of using F</proc> on Linux, FreeBSD and NetBSD
+(in all cases, where mounted).
-=head2 More CORE subs are callable through references
+This makes relocatable perl installations more useful on these platforms.
+(See "Relocatable @INC" in F<INSTALL>)
-Perl 5.15., introduced subroutines in the CORE namespace. Most of them
-could only be called as barewords; i.e., they could be aliased at compile
-time and then inlined under new names.
+=head2 Unicode Symbol Names
-Many more of these functions can now be called through references and via
-C<&foo()> syntax, bypassing the prototype.
+Perl now has proper support for Unicode in symbol names. It used to be
+that C<*{$foo}> would ignore the internal UTF8 flag and use the bytes of
+the underlying representation to look up the symbol. That meant that
+C<*{"\x{100}"}> and C<*{"\xc4\x80"}> would return the same thing. All
+these parts of Perl have been fixed to account for Unicode:
-XXX This is too vague, but the exact list of them will likely change before
-5.15.3. It's currently functions whose prototypes match /^[\$_]+;?\z/.
+=over
-=head1 Security
-
-XXX Any security-related notices go here. In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
+=item *
-[ List each security issue as a =head2 entry ]
+Method names (including those passed to C<use overload>)
-=head1 Incompatible Changes
+=item *
-=head2 User-defined case changing operations.
+Typeglob names (including names of variables, subroutines and filehandles)
-This feature was deprecated in Perl 5.14, and has now been removed.
-The CPAN module L<Unicode::Casing> provides better functionality without
-the drawbacks that this feature had, as are detailed in the 5.14
-documentation:
-L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
+=item *
-=head2 XSUBs are now 'static'
+Package names
-XSUB C functions are now 'static', that is, they are not visible from
-outside the compilation unit. For the exceedingly rare case where
-this is not desired, a new public macro C<XS_EXTERNAL(name)> can be
-used in place of C<XS(name)>. C<ExtUtils::ParseXS> (C<xsubpp>)
-can be made to declare XSUBs with C<XS_EXTERNAL> using the
-C<EXPORT_XSUB_SYMBOLS> keyword, see L<perlxs> for details.
+=item *
-=head1 Deprecations
+Constant subroutine names (not null-clean yet)
-XXX Any deprecated features, syntax, modules etc. should be listed here.
-In particular, deprecated modules should be listed here even if they are
-listed as an updated module in the L</Modules and Pragmata> section.
+=item *
-[ List each deprecation as a =head2 entry ]
+C<goto>
-=head1 Performance Enhancements
+=item *
-XXX Changes which enhance performance without changing behaviour go here. There
-may well be none in a stable release.
+Symbolic dereferencing
-[ List each enhancement as a =item entry ]
+=item *
-=over 4
+Second argument to C<bless()> and C<tie()>
=item *
-XXX
+Return value of C<ref()>
-=back
+=item *
-=head1 Modules and Pragmata
+Package names returned by C<caller()>
-XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
-go here. If Module::CoreList is updated, generate an initial draft of the
-following sections using F<Porting/corelist-perldelta.pl>, which prints stub
-entries to STDOUT. Results can be pasted in place of the '=head2' entries
-below. A paragraph summary for important changes should then be added by hand.
-In an ideal world, dual-life modules would have a F<Changes> file that could be
-cribbed.
+=item *
-[ Within each section, list entries as a =item entry ]
+Subroutine prototypes
-=head2 New Modules and Pragmata
+=item *
-=over 4
+Attributes
=item *
-XXX
+Various warnings and error messages that mention variable names or values,
+methods, etc.
=back
-=head2 Updated Modules and Pragmata
-
-=over 4
+In addition, a parsing bug has been fixed that prevented C<*{é}> from
+implicitly quoting the name, but instead interpreted it as C<*{+é}>, which
+would cause a strict violation.
-=item *
+C<*{"*a::b"}> automatically strips off the * if it is followed by an ASCII
+letter. That has been extended to all Unicode identifier characters.
-L<Archive::Extract> has been upgraded from version 0.52 to version 0.56
+C<$é> is now subject to "Used only once" warnings. It used to be exempt,
+as it was treated as a punctuation variable.
-Resolved an issue where C<unzip> executable was present in C<PATH> on MSWin32
+Also, single-character Unicode punctuation variables (like $‰) are now
+supported [perl #69032]. They are also supported with C<our> and C<my>,
+but that is a mistake that will be fixed before 5.16.
-=item *
+=head2 Support for Embedded Nulls
-L<diagnostics> has been upgraded from version 1.24 to 1.25.
+Some parts of Perl did not work correctly with nulls (C<chr 0>) embedded in
+strings. That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
+call the "a" method, instead of the actual method name contained in $m.
+These parts of perl have been fixed to support nulls:
-It now strips out C<SZ<><...>> formatting codes before displaying
-descriptions [perl #94488].
+=over
=item *
-L<Math::BigRat> has been upgraded from version 0.2602 to 0.2603.
-
-C<int()> on a Math::BigRat object containing -1/2 now creates a
-Math::BigInt containing 0, rather than -0. L<Math::BigInt> does not even
-support negative zero, so the resulting object was actually malformed
-[perl #95530].
+Method names
=item *
-L<Pod::Simple> has been upgraded from version 3.18 to 3.19.
-
-=back
+Typeglob names (including filehandle names)
-=head2 Removed Modules and Pragmata
+=item *
-=over 4
+Package names
=item *
-XXX
-
-=back
+Autoloading
-=head1 Documentation
+=item *
-XXX Changes to files in F<pod/> go here. Consider grouping entries by
-file and be sure to link to the appropriate page, e.g. L<perlfunc>.
+Return value of C<ref()>
-=head2 New Documentation
+=item *
-XXX Changes which create B<new> files in F<pod/> go here.
+Package names returned by C<caller()>
-=head3 L<XXX>
+=item *
-XXX Description of the purpose of the new file here
+Filehandle warnings
-=head2 Changes to Existing Documentation
+=item *
-XXX Changes which significantly change existing files in F<pod/> go here.
-However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
-section.
+Typeglob elements (C<*foo{"THING\0stuff"}>)
-=head3 L<XXX>
+=item *
-=over 4
+Signal names
=item *
-XXX Description of the change here
+Various warnings and error messages that mention variable names or values,
+methods, etc.
=back
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
+One side effect of these changes is that blessing into "\0" no longer
+causes C<ref()> to return false.
-XXX New or changed warnings emitted by the core's C<C> code go here. Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
+=head2 Autoloaded sort Subroutines
-[ Within each section, list entries as a =item entry that links to perldiag,
- e.g.
+Custom sort subroutines can now be autoloaded [perl #30661]:
- =item *
+ sub AUTOLOAD { ... }
+ @sorted = sort foo @list; # uses AUTOLOAD
- L<Invalid version object|perldiag/"Invalid version object">
-]
+=head2 Improved typemaps for Some Builtin Types
-=head2 New Diagnostics
+Most XS authors will be aware that there is a longstanding bug
+in the OUTPUT typemap for T_AVREF (C<AV*>), T_HVREF (C<HV*>),
+T_CVREF (C<CV*>), and T_SVREF (C<SVREF> or C<\$foo>) that requires
+manually decrementing the reference count of the return value
+instead of the typemap taking care of this. For
+backwards-compatibility, this cannot be changed in the default
+typemaps. But we now provide additional typemaps
+C<T_AVREF_REFCOUNT_FIXED>, etc. that do not exhibit this bug.
+Using them in your extension is as simple as having one line
+in your C<TYPEMAP> section:
-XXX Newly added diagnostic messages go here
+ HV* T_HVREF_REFCOUNT_FIXED
-=head3 New Errors
+=head1 Performance Enhancements
=over 4
=item *
-XXX L<message|perldiag/"message">
+C<substr> no longer calculates a value to return when called in void
+context.
=back
-=head3 New Warnings
+=head1 Modules and Pragmata
+
+=head2 Updated Modules and Pragmata
=over 4
=item *
-XXX L<message|perldiag/"message">
+L<Archive::Tar> has been upgraded from version 1.78 to version 1.80.
-=back
+=item *
-=head2 Changes to Existing Diagnostics
+L<base> has been upgraded from version 2.17 to version 2.18.
-XXX Changes (i.e. rewording) of diagnostic messages go here
+C<base> no longer sets a module's C<$VERSION> to "-1" when a module it loads
+does not define a C<$VERSION>. This change has been made because "-1" is not
+a valid version number under the new "lax" criteria used internally by
+C<UNIVERSAL::VERSION>. (See L<version> for more on "lax" version criteria.)
-=over 4
+C<base> no longer internally skips loading modules it has already loaded and
+instead relies on C<require> to inspect C<%INC>. This fixes a bug when C<base>
+is used with code that clear C<%INC> to force a module to be reloaded.
=item *
-XXX Describe change here
+L<Digest> has been upgraded from version 1.16 to version 1.17.
-=back
-
-=head1 Utility Changes
+=item *
-XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
-here. Most of these are built within the directories F<utils> and F<x2p>.
+L<DynaLoader> has been upgraded from version 1.13 to 1.14.
-[ List utility changes as a =head3 entry for each utility and =item
-entries for each change
-Use L<XXX> with program names to get proper documentation linking. ]
+It stopped exporting its symbols with the ExtUtils::ParseXS changes in
+5.15.2. Now it exports them once more.
-=head3 L<XXX>
+=item *
-=over 4
+L<ExtUtils::MakeMaker> has been upgraded from version 6.59 to version 6.61_01.
=item *
-XXX
+L<ExtUtils::ParseXS> has been upgraded from version 3.04_04 to version 3.05.
-=back
+=item *
-=head1 Configuration and Compilation
+L<Module::Load> has been upgraded from version 0.20 to version 0.22.
-XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
-go here. Any other changes to the Perl build process should be listed here.
-However, any platform-specific changes should be listed in the
-L</Platform Support> section, instead.
+Resolve possible security problem [http://goo.gl/YzHRU] where a '::' prefixed
+module can 'jump' out of @INC
-[ List changes as a =item entry ].
+=item *
-=over 4
+L<perlfaq> has been upgraded from version 5.0150034 to version 5.0150035.
=item *
-The file F<global.sym> is no longer needed, and has been removed. It
-contained a list of all exported functions, one of the files generated by
-F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
-has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
-now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
-store the list of exported functions in an intermediate file.
+L<Unicode::Collate> has been upgraded from version 0.78 to version 0.80.
-As F<global.sym> was never installed, this change will not be visible
-outside the build process.
+Locales updated to CLDR 2.0: ar, be, bg, ha, hr, kk, lt.
+Newly supported locales: as, fi__phonebook, gu, hi, kn, kok and ln.
=back
-=head1 Testing
+=head1 Documentation
-XXX Any significant changes to the testing of a freshly built perl should be
-listed here. Changes which create B<new> files in F<t/> go here as do any
-large changes to the testing harness (e.g. when parallel testing was added).
-Changes to existing files in F<t/> aren't worth summarising, although the bugs
-that they represent may be covered elsewhere.
+=head2 Changes to Existing Documentation
-[ List each test improvement as a =item entry ]
+=head3 L<perlfunc>, L<open>
=over 4
=item *
-F<t/porting/globvar.t> has been added, to run a sanity check on F<globar.sym>.
-F<globar.sym> is not needed on most *nix platforms, but is for Win32, hence
-previously was it was possible to inadvertently commit changes that worked
-perfectly locally, but broke the build on Win32.
+As an accident of history, C<open $fh, "<:", ...> applies the default
+layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
+whatever is declared by L<open.pm|open>. This seems such a useful feature
+it has been documented in L<perlfunc|perlfunc/open> and L<open>.
-=item *
+=back
-F<t/op/unlink.t> has been added to test the C<unlink> function.
+=head3 L<perlapi>
-=back
+=over 4
+
+=item *
-=head1 Platform Support
+The HV API has long accepted negative lengths to indicate that the key is
+in UTF8. Now this is documented.
-XXX Any changes to platform support should be listed in the sections below.
+=item *
-[ Within the sections, list each platform as a =item entry with specific
-changes as paragraphs below it. ]
+The C<boolSV()> macro is now documented.
-=head2 New Platforms
+=back
-XXX List any platforms that this version of perl compiles on, that previous
-versions did not. These will either be enabled by new files in the F<hints/>
-directories, or new subdirectories and F<README> files at the top level of the
-source tree.
+=head3 L<perlguts>
=over 4
-=item XXX-some-platform
+=item *
-XXX
+A new section, L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs>,
+has been added, which explains the two APIs for accessing the name of the
+autoloaded sub.
=back
-=head2 Discontinued Platforms
+=head1 Diagnostics
+
+The following additions or changes have been made to diagnostic output,
+including warnings and fatal error messages. For the complete list of
+diagnostic messages, see L<perldiag>.
-XXX List any platforms that this version of perl no longer compiles on.
+=head2 Changes to Existing Diagnostics
=over 4
-=item XXX-some-platform
+=item *
-XXX
+The message,
+"Code point 0x%X is not Unicode, no properties match it; all inverse
+prop erties do" has been changed to "Code point 0x%X is not Unicode, all
+\p{} matches fail; all \P{} matches succeed"
=back
-=head2 Platform-Specific Notes
-
-XXX List any changes for specific platforms. This could include configuration
-and compilation changes or changes in portability/compatibility. However,
-changes within modules for platforms should generally be listed in the
-L</Modules and Pragmata> section.
+=head1 Testing
=over 4
-=item XXX-some-platform
+=item *
-XXX
+F<t/porting/checkcfgvar.t> now tests that all config.sh-style files are
+complete. These are used by the various non-*nix to generate their
+F<config.h>, and an incomplete input file will generate invalid output.
=back
=head1 Internal Changes
-XXX Changes which affect the interface available to C<XS> code go here.
-Other significant internal changes for future core maintainers should
-be noted as well.
+=over 4
+
+=item *
-[ List each change as a =item entry ]
+These new functions have been added as part of the work on Unicode symbols:
+
+ HvNAMELEN
+ HvNAMEUTF8
+ HvENAMELEN
+ HvENAMEUTF8
+ gv_init_pv
+ gv_init_pvn
+ gv_init_pvsv
+ gv_fetchmeth_pv
+ gv_fetchmeth_pvn
+ gv_fetchmeth_sv
+ gv_fetchmeth_pv_autoload
+ gv_fetchmeth_pvn_autoload
+ gv_fetchmeth_sv_autoload
+ gv_fetchmethod_pv_flags
+ gv_fetchmethod_pvn_flags
+ gv_fetchmethod_sv_flags
+ gv_autoload_pv
+ gv_autoload_pvn
+ gv_autoload_sv
+ newGVgen_flags
+ sv_derived_from_pv
+ sv_derived_from_pvn
+ sv_derived_from_sv
+ sv_does_pv
+ sv_does_pvn
+ sv_does_sv
+ whichsig_pv
+ whichsig_pvn
+ whichsig_sv
+
+The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are
+experimental and may change in a future release.
-=over 4
+=item *
+
+The following functions were added. These are I<not> part of the API:
+
+ GvNAMEUTF8
+ GvENAMELEN
+ GvENAME_HEK
+ CopSTASH_flags
+ CopSTASH_flags_set
+ PmopSTASH_flags
+ PmopSTASH_flags_set
+ sv_sethek
+ HEKfARG
+
+There is also a C<HEKf> macro corresponding to C<SVf>, for
+interpolating HEKs in formatted strings.
+
+=item *
+
+C<sv_catpvn_flags> takes a couple of new internal-only flags,
+C<SV_CATBYTES> and C<SV_CATUTF8>, which tell it whether the char array to
+be concatenated is UTF8. This allows for more efficient concatenation than
+creating temporary SVs to pass to C<sv_catsv>.
+
+=item *
+
+For XS AUTOLOAD subs, $AUTOLOAD is set once more, as it was in 5.6.0. This
+is in addition to setting C<SvPVX(cv)>, for compatibility with 5.8 to 5.14.
+See L<perlguts/Autoloading with XSUBs>.
=item *
-XXX
+Perl now checks whether the array (the linearised isa) returned by a MRO
+plugin begins with the name of the class itself, for which the array was
+created, instead of assuming that it does. This prevents the first element
+from being skipped during method lookup. It also means that
+C<mro::get_linear_isa> may return an array with one more element than the
+MRO plugin provided [perl #94306].
=back
=head1 Selected Bug Fixes
-XXX Important bug fixes in the core language are summarised here.
-Bug fixes in files in F<ext/> and F<lib/> are best summarised in
-L</Modules and Pragmata>.
+=over 4
-[ List each fix as a =item entry ]
+=item *
-=over 4
+In Perl 5.14.0, C<$tainted ~~ @array> stopped working properly. Sometimes
+it would erroneously fail (when C<$tainted> contained a string that occurs
+in the array I<after> the first element) or erroneously succeed (when
+C<undef> occurred after the first element) [perl #93590].
=item *
-In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
-variable had not been used yet. This has been fixed.
+Perl 5.15.0 introduced a minor regression, in that an object referenced by
+a deleted hash element would be able to access the freed element from its
+DESTROY method, causing panic errors [perl #99660].
=item *
-Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
-represents the name of a built-in global variable used to return false if
-the variable had never been used before, but only on the I<first> call.
-This, too, has been fixed.
+Functions in the CORE package can now be called as methods. That used to
+work only when they had been called or referenced already. So
+C<< "foo"->CORE::ucfirst >> returns Foo.
=item *
-Various functions that take a filehandle argument in rvalue context
-(C<close>, C<readline>, etc.) used to call C<FETCH> multiple times, if it
-was a tied variable, and warn twice, if it was C<undef> [perl #97482].
+C<use> and C<require> are no longer affected by the I/O layers active in
+the caller's scope (enabled by L<open.pm|open>) [perl #96008].
=item *
-C<close> and similar filehandle functions, when called on built-in global
-variables (like C<$+>), used to die if the variable happened to hold the
-undefined value, instead of producing the usual "Use of uninitialized
-value" warning.
+Errors that occur when methods cannot be found during overloading now
+mention the correct package name, as they did in 5.8.x, instead of
+erroneously mentioning the "overload" package, as they have since 5.10.0.
=item *
-When autovivified file handles were introduced in Perl 5.6.0, C<readline>
-was inadvertently made to autovivify when called as C<readline($foo)> (but
-not as C<< <$foo> >>). It has now been fixed never to autovivify.
+Undefining C<%overload::> no longer causes a crash.
=item *
-C<defined ${ $tied_variable }> used to call C<FETCH> multiple times, but
-now calls it just once.
+C<our $::é; $é> (which is invalid) no longer produces the "Compilation
+error at lib/utf8_heavy.pl..." error message, which it started emitting in
+5.10.0 [perl #99984].
=item *
-Some cases of dereferencing a complex expression, such as
-C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
-it once.
+A minor regression, introduced Perl 5.15.0, has been fixed in which some
+regular expression Unicode property matches (C<\p{...}>) matched
+non-Unicode code points.
=item *
-For a tied variable returning a package name, C<< $tied->method >> used to
-call C<FETCH> multiple times (even up to six!), and sometimes would
-fail to call the method, due to memory corruption.
+In case-insensitive regular expression pattern matching, no longer on
+UTF-8 encoded strings does the scan for the start of match only look at
+the first possible position. This caused matches such as
+C<"f\x{FB00}" =~ /ff/i> to fail.
=item *
-Calling an undefined anonymous subroutine (e.g., what $x holds after
-C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
-has been corrected to "Undefined subroutine called" [perl #71154].
+On 64-bit systems, C<read()> now understands large string offsets beyond
+the 32-bit range.
=item *
-Causing C<@DB::args> to be freed between uses of C<caller> no longer
-results in a crash [perl #93320].
+Errors that occur when processing subroutine attributes no longer cause the
+subroutine's op tree to leak.
-=back
+=item *
+
+C<sort> now works once more with custom sort routines that are XSUBs. It
+stopped working in 5.10.0.
+
+=item *
-=head1 Known Problems
+C<sort> with a constant for a custom sort routine, although it produces
+unsorted results, no longer crashes. It started crashing in 5.10.0.
-XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
-tests that had to be C<TODO>ed for the release would be noted here, unless
-they were specific to a particular platform (see below).
+=item *
-This is a list of some significant unfixed bugs, which are regressions
-from either 5.XXX.XXX or 5.XXX.XXX.
+Warnings produced when a custom sort routine returns a non-numeric value
+now contain "in sort"; e.g., "Use of uninitialized value in sort".
-[ List each fix as a =item entry ]
+=item *
-=over 4
+C<< sort { $a <=> $b } >>, which is optimised internally, now produces
+"uninitialized" warnings for NaNs (not-a-number values), since C<< <=> >>
+returns C<undef> for those. This brings it in line with
+S<C<< sort { 1; $a <=> $b } >>> and other more complex cases, which are not
+optimised [perl #94390].
=item *
-XXX
+C<..> and C<...> in list context now call FETCH only once on tied
+arguments, instead of three or four times [perl #53554].
-=back
+=item *
-=head1 Obituary
+C<..> and C<...> in list context now mention the name of the variable in
+"uninitialized" warnings for string (as opposed to numeric) ranges.
-XXX If any significant core contributor has died, we've added a short obituary
-here.
+=back
=head1 Acknowledgements
XXX Generate this with:
- perl Porting/acknowledgements.pl v5.15.2..HEAD
+ perl Porting/acknowledgements.pl v5.15.3..HEAD
=head1 Reporting Bugs