This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document the ExtUtils::ParseXS changes in perldelta
[perl5.git] / pod / perldelta.pod
index b8f4cc2..69677bb 100644 (file)
@@ -33,6 +33,34 @@ here, but most should go in the L</Performance Enhancements> section.
 You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
 worrying about warnings.
 
+=head2 The C<\$> prototype accepts any scalar lvalue
+
+The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
+argument.  Previously they only accepted scalars beginning with C<$> and
+hash and array elements.  This change makes them consistent with the way
+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.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -45,8 +73,8 @@ L</Selected Bug Fixes> section.
 
 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.
+    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 ]
 
@@ -69,7 +97,23 @@ may well be none in a stable release.
 
 =item *
 
-XXX
+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
 
@@ -101,7 +145,140 @@ XXX
 
 =item *
 
-L<XXX> has been upgraded from version 0.69 to version 0.70.
+L<ExtUtils::ParseXS> has been upgraded from version XXX to version XXX.
+
+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 logic for parsing, merging, and dumping XS typemaps was 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 an extensibility, typemaps can now
+be included inline into XS code with a HEREDOC-like syntax:
+
+  TYPEMAP: <<END_TYPEMAP
+  MyType       T_IV
+  END_TYPEMAP
+
+=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 *
+
+L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.037
+
+Added offset parameter to CRC32
+
+=item *
+
+L<Compress::Zlib> has been upgraded from version 2.035 to version 2.037
+
+IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14).
+There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed
+Stored context now. And fixed a Zip64 issue in
+IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
+
+=item *
+
+L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9107
+
+=item *
+
+L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58
+
+=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
+using L<IPC::Open3> on MSWin32 without requiring L<IPC::Run>.
+
+=item *
+
+L<Locale::Codes> has been upgraded from version 3.16 to version 3.17
+
+Added Language Extension codes (langext) and Language Variation codes
+(langvar) as defined in the IANA language registry.
+
+Added language codes from ISO 639-5
+
+Added language/script codes from the IANA language subtag
+registry
+
+Fixed an uninitialized value warning.  RT 67438
+
+Fixed the return value for the all_XXX_codes and all_XXX_names functions.  RT 69100
+
+Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to
+allow for cleaner future additions.  The original four modules (Locale::Language,
+Locale::Currency, Locale::Country, Locale::Script) will continue to work, but
+all new sets of codes will be added in the Locale::Codes namespace.
+
+=item *
+
+L<attributes> has been upgraded from version 0.14 to 0.15, as part of the
+lvalue attribute warnings fix.  See L</Selected Bug Fixes>, below.
+
+=item *
+
+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<Pod::Simple> has been upgraded from version 3.16 to version 3.17
+
+=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
 
@@ -111,7 +288,12 @@ L<XXX> has been upgraded from version 0.69 to version 0.70.
 
 =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
 
@@ -124,9 +306,10 @@ 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>
 
-XXX Description of the purpose of the new file here
+L<perldtrace> describes Perl's DTrace support, listing the provided probes
+and gives examples of their use.
 
 =head2 Changes to Existing Documentation
 
@@ -142,6 +325,10 @@ section.
 
 XXX Description of the change here
 
+=item *
+
+L<perlxs> was extended with documentation on inline typemaps.
+
 =back
 
 =head1 Diagnostics
@@ -247,7 +434,11 @@ 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.
 
 =back
 
@@ -328,7 +519,66 @@ L</Modules and Pragmata>.
 
 =item *
 
-XXX
+Applying the :lvalue attribute to subroutine that is already defined does
+not work properly, as the attribute changes the way the sub is compiled.
+Hence, Perl 5.12 began warning when an attempt is made to apply the
+attribute to an already defined sub.  In such cases, the attribute is
+discarded.
+
+But the change in 5.12 missed the case where custom attributes are also
+present: that case still silently and ineffectively applied the attribute.
+That omission has now been corrected.  C<sub foo :lvalue :Whatever> (when
+C<foo> is already defined) now warns about the :lvalue attribute, and does
+not apply it.
+
+L<attributes.pm|attributes> has likewise been updated to warn and not apply
+the attribute.
+
+=item *
+
+=for comment
+Not necessary for perl5160delta
+
+The remaining discrepancies between explicit and implicit return from
+lvalue subroutines have been resolved.  They mainly involved which error
+message to display when a read-only value is returned in lvalue context.
+Also, returning a PADTMP (the result of most built-ins, like C<index>) in
+lvalue context is now forbidden for explicit return, as it always has been
+for implicit return.  This is not a regression from 5.14, as all the cases
+in which it could happen where previously syntax errors.
+
+=item *
+
+=for comment
+Not necessary for perl5160delta
+
+Explicitly returning a tied C<my> variable from an lvalue subroutine in
+list lvalue context used to clear the variable before the assignment could
+happen.  This is something that was missed when explicit return was made to
+work in 5.15.0.
+
+=item *
+
+=for comment
+Not necessary for perl5160delta
+
+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.
 
 =back