X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/81663c3ac1c97522ac445574deefdb117c7dc8c5..12e1284a67e5e3404c704c3f864749fd9f04c7c4:/pod/perl5100delta.pod
diff --git a/pod/perl5100delta.pod b/pod/perl5100delta.pod
index e4ead03..6728559 100644
--- a/pod/perl5100delta.pod
+++ b/pod/perl5100delta.pod
@@ -2,7 +2,7 @@
=head1 NAME
-perldelta - what is new for perl 5.10.0
+perl5100delta - what is new for perl 5.10.0
=head1 DESCRIPTION
@@ -103,7 +103,7 @@ nested balanced angle brackets:
< # match an opening angle bracket
(?: # match one of:
(?> # don't backtrack over the inside of this group
- [^<>]+ # one or more non angle brackets
+ [^<>]+ # one or more non angle brackets
) # end non backtracking group
| # ... or ...
(?1) # recurse to bracket 1 and try it again
@@ -200,6 +200,23 @@ logically match their complements.
C<\R> matches a generic linebreak, that is, vertical whitespace, plus
the multi-character sequence C<"\x0D\x0A">.
+=item Optional pre-match and post-match captures with the /p flag
+
+There is a new flag C
for regular expressions. Using this
+makes the engine preserve a copy of the part of the matched string before
+the matching substring to the new special variable C<${^PREMATCH}>, the
+part after the matching substring to C<${^POSTMATCH}>, and the matched
+substring itself to C<${^MATCH}>.
+
+Perl is still able to store these substrings to the special variables
+C<$`>, C<$'>, C<$&>, but using these variables anywhere in the program
+adds a penalty to all regular expression matches, whereas if you use
+the C flag and the new special variables instead, you pay only for
+the regular expressions where the flag is used.
+
+For more detail on the new variables, see L; for the use of
+the regular expression flag, see L and L.
+
=back
=head2 C
@@ -228,9 +245,9 @@ overriding the lexical declaration with C. (Rafael Garcia-Suarez)
=head2 The C<_> prototype
A new prototype character has been added. C<_> is equivalent to C<$> but
-defaults to C<$_> if the corresponding argument isn't supplied. (both C<$>
-and C<_> denote a scalar). Due to the optional nature of the argument, you
-can only use it at the end of a prototype, or before a semicolon.
+defaults to C<$_> if the corresponding argument isn't supplied (both C<$>
+and C<_> denote a scalar). Due to the optional nature of the argument,
+you can only use it at the end of a prototype, or before a semicolon.
This has a small incompatible consequence: the prototype() function has
been adjusted to return C<_> for some built-ins in appropriate cases (for
@@ -260,7 +277,10 @@ available: the C3 algorithm. See L for more information.
Note that, due to changes in the implementation of class hierarchy search,
code that used to undef the C<*ISA> glob will most probably break. Anyway,
undef'ing C<*ISA> had the side-effect of removing the magic on the @ISA
-array and should not have been done in the first place.
+array and should not have been done in the first place. Also, the
+cache C<*::ISA::CACHE::> no longer exists; to force reset the @ISA cache,
+you now need to use the C API, or more simply to assign to @ISA
+(e.g. with C<@ISA = @ISA>).
=head2 readdir() may return a "short filename" on Windows
@@ -310,7 +330,7 @@ To use state variables, one needs to enable them by using
use feature 'state';
or by using the C<-E> command-line switch in one-liners.
-See L.
+See L.
=head2 Stacked filetest operators
@@ -393,7 +413,7 @@ details.
This variable gives the native status returned by the last pipe close,
backtick command, successful call to wait() or waitpid(), or from the
-system() operator. See L for details. (Contributed by Gisle Aas.)
+system() operator. See L for details. (Contributed by Gisle Aas.)
=item C<${^RE_TRIE_MAXBUF}>
@@ -437,15 +457,13 @@ with it. (Larry Wall, Nicholas Clark)
=head2 kill() on Windows
On Windows platforms, C now kills a process tree.
-(On UNIX, this delivers the signal to all processes in the same process
+(On Unix, this delivers the signal to all processes in the same process
group.)
=head1 Incompatible Changes
=head2 Packing and UTF-8 strings
-=for XXX update this
-
The semantics of pack() and unpack() regarding UTF-8-encoded data has been
changed. Processing is now by default character per character instead of
byte per byte on the underlying encoding. Notably, code that used things
@@ -542,6 +560,14 @@ Previously, F<.pmc> files were loaded only if more recent than the
matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if
they exist.
+=head2 $^V is now a C object instead of a v-string
+
+$^V can still be used with the C<%vd> format in printf, but any
+character-level operations will now access the string representation
+of the C object and not the ordinals of a v-string.
+Expressions like C<< substr($^V, 0, 2) >> or C<< split //, $^V >>
+no longer work and must be rewritten.
+
=head2 @- and @+ in patterns
The special arrays C<@-> and C<@+> are no longer interpolated in regular
@@ -616,8 +642,37 @@ Previously, the exception would not occur until Perl attempted to make
use of the recursive inheritance while resolving a method or doing a
C<$foo-Eisa($bar)> lookup.
+=head2 warnings::enabled and warnings::warnif changed to favor users of modules
+
+The behaviour in 5.10.x favors the person using the module;
+The behaviour in 5.8.x favors the module writer;
+
+Assume the following code:
+
+ main calls Foo::Bar::baz()
+ Foo::Bar inherits from Foo::Base
+ Foo::Bar::baz() calls Foo::Base::_bazbaz()
+ Foo::Base::_bazbaz() calls: warnings::warnif('substr', 'some warning
+message');
+
+On 5.8.x, the code warns when Foo::Bar contains C