This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fixes to allow win32 Perl to properly handle PERL5LIB.
[perl5.git] / pod / perldelta.pod
index ebea453..e041408 100644 (file)
@@ -1,5 +1,9 @@
 =encoding utf8
 
+=for comment
+This has been completed up to aebc0cbe, except for:
+bb789b09de07edfb74477eb1603949c96d60927d (Dave Mitchell)
+
 =head1 NAME
 
 [ this is a template for a new perldelta file. Any text flagged as
@@ -42,6 +46,30 @@ the built-in C<read> and C<recv> functions (among others) parse their
 arguments. This means that one can override the built-in functions with
 custom subroutines that parse their arguments the same way.
 
+=head2 You can now C<study> more than one string
+
+The restriction that you can only have one C<study> active at a time has been
+removed. You can now usefully C<study> as many strings as you want (until you
+exhaust memory).
+
+=head2 The Unicode C<Script_Extensions> property is now supported.
+
+New in Unicode 6.0, this is an improved C<Script> property.  Details
+are in L<perlunicode/Scripts>.
+
+=head2 DTrace probes for interpreter phase change
+
+The C<phase-change> probes will fire when the interpreter's phase
+changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
+the new phase name; C<arg1> is the old one. This is useful mostly
+for limiting your instrumentation to one or more of: compile time,
+run time, destruct time.
+
+=head2 New Pad API
+
+Many new functions have been added to the API for manipulating lexical
+pads.  See L<perlapi/Pad Data Structures> for more information.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -78,13 +106,30 @@ may well be none in a stable release.
 
 =item *
 
-The implementation of C<s///r> makes one fewer copy of the scalar's value.
+The short-circuiting operators C<&&>, C<||>, and C<//> are now
+considerably faster in the short-circuiting case due to reduced
+OP-tree traversal.
+
+=item *
+
+The implementation of C<s///r> makes one less copy of the scalar's value.
 
 =item *
 
 If a studied scalar is C<split> with a regex, the engine will now take
 advantage of the C<study> data.
 
+=item *
+
+C<study> now uses considerably less memory for shorter strings. Strings shorter
+than 65535 characters use roughly half the memory than previously, strings
+shorter than 255 characters use roughly one quarter of the memory.
+
+=item *
+
+Recursive calls to lvalue subroutines in lvalue scalar context use less
+memory.
+
 =back
 
 =head1 Modules and Pragmata
@@ -105,7 +150,17 @@ cribbed.
 
 =item *
 
-XXX
+The logic for parsing, merging, and dumping XS typemaps has been extracted
+from C<ExtUtils::ParseXS> into a module of its own, L<ExtUtils::Typemaps>.
+C<ExtUtils::Typemaps> offers an interface to typemap handling outside of
+the scope of the XS compiler itself.
+
+As a first use case of the improved API and extensibility, typemaps can now
+be included inline in XS code with a HEREDOC-like syntax:
+
+  TYPEMAP: <<END_TYPEMAP
+  MyType       T_IV
+  END_TYPEMAP
 
 =back
 
@@ -115,6 +170,41 @@ XXX
 
 =item *
 
+L<B::Deparse> has been upgrade from version 1.05 to 1.06.
+
+It now correctly deparses interpolation of punctuation variables (like
+C<@*>) that do not interpolate without braces [perl #93990].
+
+=item *
+
+L<CGI> has been upgraded from version 3.54 to version 3.55
+
+[THINGS THAT MAY BREAK YOUR CODE]
+
+C<url()> was fixed to return C<PATH_INFO> when it is explicitly requested
+with either the path=>1 or path_info=>1 flag.
+
+If your code is running under mod_rewrite (or compatible) and you are calling C<self_url()> or
+you are calling C<url()> and passing path_info=>1, These methods will actually be
+returning C<PATH_INFO> now, as you have explicitly requested, or has C<self_url()>
+has requested on your behalf.
+
+The C<PATH_INFO> has been omitted in such URLs since the issue was introduced
+in the 3.12 release in December, 2005.
+
+This bug is so old your application may have come to depend on it or
+workaround it. Check for application before upgrading to this release.
+
+Examples of affected method calls:
+
+  $q->url(-absolute => 1, -query => 1, -path_info => 1 )
+  $q->url(-path=>1)
+  $q->url(-full=>1,-path=>1)
+  $q->url(-rewrite=>1,-path=>1)
+  $q->self_url();
+
+=item *
+
 L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.037
 
 =item *
@@ -134,6 +224,43 @@ IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
 
 =item *
 
+L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9108
+
+=item *
+
+L<Cwd> has been upgraded from version 3.36 to 3.37, to address an
+incompatibility with the EPIC debugger.
+
+=item *
+
+L<diagnostics> has been upgraded from version 1.22 to 1.23.
+
+It now knows how to find descriptions for diagnostic messages ending with a
+dot, instead getting confused by it.
+
+=item *
+
+L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58
+
+=item *
+
+L<ExtUtils::ParseXS> has been upgraded from version 2.2210 to 3.00_01.
+
+Much of L<ExtUtils::ParseXS>, the module behind the XS compiler C<xsubpp>,
+was rewritten and cleaned up. It has been made somewhat more extensible
+and now finally uses strictures.
+
+The typemap logic has been moved into a separate module,
+L<ExtUtils::Typemaps>.  See L</New Modules and Pragmata>, above.
+
+=item *
+
+L<HTTP::Tiny> has been upgraded from version 0.012 to version 0.013.
+
+Added support for using C<$ENV{http_proxy}> to set the default proxy host.
+
+=item *
+
 L<IPC::Cmd> has been upgraded from version 0.70 to version 0.72
 
 Capturing of command output (both C<STDOUT> and C<STDERR>) is now supported
@@ -172,6 +299,44 @@ L<Math::BigInt::FastCalc> has been upgraded from version 0.28 to version 0.29.
 The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid
 performance under ithreads.
 
+=item *
+
+L<Module::CoreList> has been upgraded from version 2.51 to 2.53.
+
+Some extraneous (and erroneous) entries have been removed
+[rt.cpan.org #69108].
+
+The C<corelist> utility now understands the C<-r> option for
+displaying Perl release dates.
+
+=item *
+
+L<Pod::Perldoc> has been upgraded from version 3.15_05 to 3.15_06.
+
+The B<-v> option now fetches the right section for C<$0>.
+
+=item *
+
+L<Pod::Simple> has been upgraded from version 3.16 to version 3.18
+
+=item *
+
+L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77
+
+Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
+
+=item *
+
+L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
+
+Added SetStdHandle and GetStdHandle functions
+
+=item *
+
+L<threads> has been upgraded from version 1.83 to 1.84
+
+An unused variable was removed from the XS code.
+
 =back
 
 =head2 Removed Modules and Pragmata
@@ -180,7 +345,12 @@ performance under ithreads.
 
 =item *
 
-XXX
+Perl 4-era .pl libraries
+
+Perl used to bundle a handful of library files that predate Perl 5. Most of
+these files, which have been deprecated since version 5.14.0, have now been
+removed. If your code still relies on these libraries, you can install them
+again from C<Perl4::CoreLibs> on CPAN.
 
 =back
 
@@ -193,9 +363,14 @@ file and be sure to link to the appropriate page, e.g. L<perlfunc>.
 
 XXX Changes which create B<new> files in F<pod/> go here.
 
-=head3 L<XXX>
+=head3 L<perldtrace>
+
+L<perldtrace> describes Perl's DTrace support, listing the provided probes
+and gives examples of their use.
 
-XXX Description of the purpose of the new file here
+=head3 L<perl5141delta>
+
+The delta file for Perl 5.14.1 has been copied to blead.
 
 =head2 Changes to Existing Documentation
 
@@ -211,6 +386,22 @@ section.
 
 XXX Description of the change here
 
+=item *
+
+L<perlxs> was extended with documentation on inline typemaps.
+
+=item *
+
+L<perlref> has a new L<Circular References|perlref/Circular References>
+section explaining how circularities may not be freed and how to solve that
+with weak references.
+
+=item *
+
+The documentation for smart match in L<perlsyn> has been corrected for the
+case of C<undef> on the left-hand side.  The list of different smart match
+behaviours had an item in the wrong place.
+
 =back
 
 =head1 Diagnostics
@@ -262,7 +453,26 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+The L<Invalid version format|perldiag/"Invalid version format (%s)">
+error message now says "negative version number" within the parentheses,
+rather than "non-numeric data", for negative numbers.
+
+=item *
+
+The two warnings
+L<Possible attempt to put comments in qw() list|perldiag/"Possible attempt to put comments in qw() list">
+and
+L<Possible attempt to separate words with commas|perldiag/"Possible attempt to separate words with commas">
+are no longer mutually exclusive: the same C<qw> construct may produce
+both.
+
+=item *
+
+Warnings that mention the names of lexical (C<my>) variables with Unicode
+characters in them now respect the presence or absence of the C<:utf8>
+layer on the output handle, instead of outputting UTF8 regardless.  Also,
+the correct names are included in the strings passed to C<$SIG{__WARN__}>
+handlers, rather than the raw UTF8 bytes.
 
 =back
 
@@ -316,7 +526,17 @@ that they represent may be covered elsewhere.
 
 =item *
 
-XXX
+F<t/run/dtrace.t> was added to test Perl's DTrace support. This
+test will only be run if your Perl was built with C<-Dusedtrace>
+and if calling C<dtrace> actually lets you instrument code. This
+generally requires being run as root, so this test file is primarily
+intended for use by the dtrace subcommittee of p5p.
+
+=item *
+
+F<t/win32/runenv.t> was added to test aspects of Perl's environment
+variable handling on MSWin32 platforms.  Previously, such tests were
+skipped on MSWin32 platforms.
 
 =back
 
@@ -361,9 +581,26 @@ 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.
 
-=over 4
+=head3 Windows
 
-=item XXX-some-platform
+=over
+
+=item *
+
+On Windows 7, 2008 and Vista, C<@INC> is now always properly populated
+based on the value of PERL5LIB set in the environment.  Previously,
+values of PERL5LIB longer than 32766 bytes were skipped when C<@INC>
+was being populated.  Tests for environment handling were
+also added (see L</Testing> section).  Fixes
+L<RT #87322|https://rt.perl.org/rt3/Public/Bug/Display.html?id=87322>.
+
+=back
+
+=head3 XXX-some-platform
+
+=over
+
+=item *
 
 XXX
 
@@ -381,7 +618,13 @@ be noted as well.
 
 =item *
 
-XXX
+The expermental C<fetch_cop_label> function has been renamed to
+C<cop_fetch_label>.
+
+=item *
+
+The C<cop_store_label> function has been added to the API, but is
+experimental.
 
 =back
 
@@ -444,6 +687,69 @@ A minor memory leak, introduced in 5.15.0, has been fixed.  It would occur
 when a hash is freed that has had its current iterator deleted
 [perl #93454].
 
+=item *
+
+The C<prototype> function now returns a prototype (the empty string) for
+the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of
+dying, as they are indistinguishable syntactically from nullary functions
+like C<time>.
+
+=item *
+
+A bug affecting lvalue context propagation through nested lvalue subroutine
+calls has been fixed.  Previously, returning a value in nested rvalue
+context would be treated as lvalue context by the inner subroutine call,
+resulting in some values (such as read-only values) being rejected.
+
+=item *
+
+Some core bugs affecting L<Hash::Util> have been fixed: locking a hash
+element that is a glob copy no longer causes subsequent assignment to it to
+corrupt the glob, and unlocking a hash element that holds a copy-on-write
+scalar no longer causes modifications to that scalar to modify other
+scalars that were sharing the same string buffer.
+
+=item *
+
+C<when> blocks are now capable of returning variables declared inside the
+enclosing C<given> block [perl #93548].
+
+=item *
+
+A problem with context propagation when a C<do> block is an argument to
+C<return> has been fixed.  It used to cause undefined to be returned in
+some cases of a C<return> inside an C<if> block which itself is followed by
+another C<return>.
+
+=item *
+
+Calling C<index> with a tainted constant no longer causes constants in
+subsequently compiled code to become tainted [perl #64804].
+
+=item *
+
+The peephole optimiser uses less recursion than before, making it possible
+to evaluate code like C<eval ("{\$x = 1 }\n" x 100000)> without a crash.
+
+=item *
+
+Use of lexical (C<my>) variables in code blocks embedded in regular
+expressions will no longer result in memory corruption or crashes.
+
+Nevertheless, these code blocks are still experimental, as there are still
+problems with the wrong variables being closed over (in loops for instance)
+and with abnormal exiting (e.g., C<die>) causing memory corruption.
+
+=item *
+
+The C<SvIsCOW> C macro now returns false for read-only copies of typeglobs,
+such as those created by:
+
+  $hash{elem} = *foo;
+  Hash::Util::lock_value %hash, 'elem';
+
+It used to return true.
+
 =back
 
 =head1 Known Problems
@@ -472,7 +778,9 @@ here.
 
 =head1 Acknowledgements
 
-XXX The list of people to thank goes here.
+Generate this with:
+
+  perl Porting/acknowledgements.pl v5.15.0..HEAD
 
 =head1 Reporting Bugs