This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta up to c60dbbc38
[perl5.git] / pod / perldelta.pod
index bb5907f..a28070f 100644 (file)
@@ -1,23 +1,31 @@
 =encoding utf8
 
 =for comment
-This has been completed up to 527d644b124fe.
+This has been completed up to c60dbbc38, except for:
+d9018cbe5b480ba29cc6151aba8f5102a7e009c4 (Eric Brine)
+    -- while I (use git blame to find out who) see how this change within
+       lex_read_unichar is correct, I cannot tell at a glance what visible
+       effects this bug has at the Perl level or through the lexer API.
+a04eb69c733e84250299f12df200f10b76b0a45c (David Golden)
+7a799f6bb3cac2e1bf9bede83579324cffa59c16 (David Golden)
+be48bbe8d671b6841c3ec7cb734b98071afe3cd9 (Chip)
+0bda3001dd6310abfca950134ed78f6192d3d8a7 (Karl Williamson)
 
 =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.
+This document describes differences between the 5.15.3 release and
+the 5.15.4 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.
+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 Notice
 
@@ -25,193 +33,241 @@ XXX Any important notices here
 
 =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.2 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
 
-Almost all of these functions can now be called through references and via
-C<&foo()> syntax, bypassing the prototype.  See L<CORE> for a list of the
-exceptions.
+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:
 
-=head1 Security
+=over
 
-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>)
 
-=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
+=item *
 
-Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would 
-cause an access violation / segfault.  A Perl program that accepts a flags value from
-an external source could expose itself to denial of service or arbitrary code
-execution attacks.  There are no known exploits in the wild.  The problem has been
-corrected by explicitly disabling all unsupported flags and setting unused function
-pointers to null.  Bug reported by Clément Lecigne.
+Typeglob names (including names of variables, subroutines and filehandles)
 
-=head1 Incompatible Changes
+=item *
 
-=head2 User-defined case changing operations.
+Package names
 
-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'
+Constant subroutine names (not nul-clean yet)
 
-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
+C<goto>
 
-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 ]
+Symbolic dereferencing
 
-=head1 Performance Enhancements
+=item *
 
-XXX Changes which enhance performance without changing behaviour go here. There
-may well be none in a stable release.
+Second argument to C<bless()> and C<tie()>
 
-[ List each enhancement as a =item entry ]
+=item *
 
-=over 4
+Return value of C<ref()>
 
 =item *
 
-XXX
+Package names returned by C<caller()>
+
+=item *
+
+Subroutine prototypes
+
+=item *
+
+Attributes
+
+=item *
+
+Various warnings and error messages that mention variable names or values,
+methods, etc.
 
 =back
 
-=head1 Modules and Pragmata
+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.
 
-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.
+C<*{"*a::b"}> automatically strips off the * if it is followed by an ASCII
+letter.  That has been extended to all Unicode identifier characters.
 
-[ Within each section, list entries as a =item entry ]
+C<$é> is now subject to "Used only once" warnings.  It used to be exempt,
+as it was treated as a punctuation variable.
 
-=head2 New Modules and Pragmata
+=head2 Support for Embedded Nuls
 
-=over 4
+Some parts of Perl did not work correctly with nuls (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 nuls:
+
+=over
 
 =item *
 
-XXX
+Method names
 
-=back
+=item *
 
-=head2 Updated Modules and Pragmata
+Typeglob names (including filehandle names)
 
-=over 4
+=item *
+
+Package names
 
 =item *
 
-L<AnyDBM_File> has been upgraded from version 1.00 to version 1.01.
+Autoloading
+
+=item *
 
-This is only a minor documentation update.
+Return value of C<ref()>
 
 =item *
 
-L<Archive::Extract> has been upgraded from version 0.52 to version 0.56.
+Package names returned by C<caller()>
 
-Resolved an issue where C<unzip> executable was present in C<PATH> on MSWin32
+=item *
+
+Filehandle warnings
 
 =item *
 
-L<CPANPLUS> has been upgraded from version 0.9109 to version 0.9110.
+Typeglob elements (C<*foo{"THING\0stuff"}>)
 
 =item *
 
-L<CPANPLUS::Dist::Build> has been upgraded from version 0.56 to version 0.58.
+Signal names
 
 =item *
 
-L<diagnostics> has been upgraded from version 1.24 to version 1.25.
+Various warnings and error messages that mention variable names or values,
+methods, etc.
 
-It now strips out C<SZ<><...>> formatting codes before displaying
-descriptions [perl #94488].
+=back
 
-=item *
+One side effect of these changes is that blessing into "\0" no longer
+causes C<ref()> to return false.
 
-L<Data::Dumper> has been upgraded from version 2.133 to version 2.134.
+=head1 Security
 
-The XS code for sorting hash keys has been simplified slightly.
+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 ]
+
+=head1 Incompatible Changes
+
+XXX For a release on a stable branch, this section aspires to be:
+
+    There are no changes intentionally incompatible with 5.XXX.XXX
+    If any exist, they are bugs and reports are welcome.
+
+[ List each incompatible change as a =head2 entry ]
+
+=head1 Deprecations
+
+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.
+
+[ List each deprecation as a =head2 entry ]
+
+=head1 Performance Enhancements
 
-L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
+XXX Changes which enhance performance without changing behaviour go here. There
+may well be none in a stable release.
 
-The CIA world added non-standard values, so this is no longer used as a source
-of data.
+[ List each enhancement as a =item entry ]
+
+=over 4
 
 =item *
 
-L<File::Glob> has been upgraded from version 1.12 to version 1.13.
+XXX
 
-See L</Security>.
+=back
+
+=head1 Modules and Pragmata
+
+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.
+
+[ Within each section, list entries as a =item entry ]
+
+=head2 New Modules and Pragmata
+
+=over 4
 
 =item *
 
-L<Math::BigRat> has been upgraded from version 0.2602 to version 0.2603.
+XXX
 
-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].
+=back
+
+=head2 Updated Modules and Pragmata
+
+=over 4
 
 =item *
 
-L<Module::Metadata> has been upgraded from version 1.000005_01 to version 1.000007.
+L<perlfaq> has been upgraded from version 5.0150034 to version 5.0150035.
 
 =item *
 
-L<Module::Load::Conditional> has been upgraded from version 0.44 to version 0.46.
+L<Digest> has been upgraded from version 1.16 to version 1.17.
 
 =item *
 
-L<ODBM_File> has been upgraded from version 1.11 to version 1.12.
+L<DynaLoader> has been upgraded from version 1.13 to 1.14.
 
-This is only a minor refactoring of the XS code to bring it closer to the
-other C<?DBM_File> modules.
+It stopped exporting its symbols with the ExtUtils::ParseXS changes in
+5.15.2.  Now it exports them once more.  
 
 =item *
 
-L<perlfaq> has been upgraded from version 5.01500302 to version 5.0150033.
+L<ExtUtils::MakeMaker> has been upgraded from version 6.59 to version 6.61_01.
 
 =item *
 
-L<Pod::Simple> has been upgraded from version 3.18 to version 3.19.
+L<ExtUtils::ParseXS> has been upgraded from version 3.04_04 to version 3.05.
 
 =item *
 
-L<POSIX> has been upgraded from version 1.24 to version 1.25.
+L<Module::Load> has been upgraded from version 0.20 to version 0.22.
+
+Resolve possible security problem [http://goo.gl/YzHRU] where a '::' prefixed
+module can 'jump' out of @INC
+
+=item *
 
-L<POSIX> no longer uses L<AutoLoader>. Any code which was relying on this
-implementation detail was buggy, and may fail as a result of this change.
-The module's Perl code has been considerably simplified, roughly halving
-the number of lines, with no change in functionality.
+L<Unicode::Collate> has been upgraded from version 0.78 to version 0.79.
 
 =back
 
@@ -244,13 +300,16 @@ 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.
 
-=head3 L<XXX>
+=head3 L<perlfunc>, L<open>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+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>.
 
 =back
 
@@ -303,7 +362,11 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+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
 
@@ -339,15 +402,7 @@ L</Platform Support> section, instead.
 
 =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.
-
-As F<global.sym> was never installed, this change will not be visible
-outside the build process.
+XXX
 
 =back
 
@@ -365,14 +420,9 @@ that they represent may be covered elsewhere.
 
 =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.
-
-=item *
-
-F<t/op/unlink.t> has been added to test the C<unlink> function.
+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
 
@@ -437,7 +487,60 @@ be noted as well.
 
 =item *
 
-XXX
+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.
+
+=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
+
+=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>.
 
 =back
 
@@ -453,105 +556,43 @@ L</Modules and Pragmata>.
 
 =item *
 
-In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
-variable had not been used yet.  This has been fixed.
+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 *
 
-C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
-return true for most, but not all built-in variables, if
-they had not been used yet.  Many times that new built-in
-variables were added in past versions, this construct was
-not taken into account, so this affected C<${^GLOBAL_PHASE}> and
-C<${^UTF8CACHE}>, among others.  It also used to return false if the
-package name was given as well (C<${"::!"}>) and for subroutines in the
-CORE package [perl #97978] [perl #97492] [perl #97484].
+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.
-
-=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.
-
-=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.
-
-=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].
-
-=item *
-
-Causing C<@DB::args> to be freed between uses of C<caller> no longer
-results in a crash [perl #93320].
-
-=item *
-
-Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
-values.  It would die in strict mode or lvalue context for most undefined
-values, but would be treated as the empty string (with a warning) for the
-specific scalar return by C<undef()> (C<&PL_sv_undef> internally).  This
-has been corrected.  C<undef()> is now treated like other undefined
-scalars, as in Perl 5.005.
-
-=item *
-
-It used to be possible to free the typeglob of a localised array or hash
-(e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
-
-=item *
-
-C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
-C<setpgrp> was ignoring its argument if there was just one.  Now it is
-equivalent to C<setpgrp($foo,0)>.
-
-=item *
-
-Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH
-only once.
-
-=item *
-
-C<chdir>, C<chmod> and C<chown> now always call FETCH if passed a tied
-variable as the last argument.  They used to ignore tiedness if the last
-thing return from or assigned to the variable was a typeglob or reference
-to a typeglob.
+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].
 
 =back
 
@@ -570,7 +611,8 @@ from either 5.XXX.XXX or 5.XXX.XXX.
 
 =item *
 
-XXX
+XXX A couple of modules were broken by stdbool.h changes, or was that in
+5.15.3?
 
 =back
 
@@ -583,7 +625,7 @@ here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.15.2..HEAD
+  perl Porting/acknowledgements.pl v5.15.3..HEAD
 
 =head1 Reporting Bugs