This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Doc nits -- avoid bare "5.10" version numbers without a
[perl5.git] / pod / perl5100delta.pod
index 7751281..ce4892e 100644 (file)
@@ -36,7 +36,7 @@ optional features (like C<use feature ":5.10">).
 =head2 Defined-or operator
 
 A new operator C<//> (defined-or) has been implemented.
-The following statement:
+The following expression:
 
     $a // $b
 
@@ -44,7 +44,7 @@ is merely equivalent to
 
    defined $a ? $a : $b
 
-and
+and the statement
 
    $c //= $d;
 
@@ -111,10 +111,10 @@ nested balanced angle brackets:
      $                      # end of line
     /x
 
-Note, users experienced with PCRE will find that the Perl implementation
-of this feature differs from the PCRE one in that it is possible to
-backtrack into a recursed pattern, whereas in PCRE the recursion is
-atomic or "possessive" in nature. (Yves Orton)
+PCRE users should note that Perl's recursive regex feature allows
+backtracking into a recursed pattern, whereas in PCRE the recursion is
+atomic or "possessive" in nature.  As in the example above, you can
+add (?>) to control this selectively.  (Yves Orton)
 
 =item Named Capture Buffers
 
@@ -124,7 +124,7 @@ It's possible to backreference to a named buffer with the C<< \k<NAME> >>
 syntax. In code, the new magical hashes C<%+> and C<%-> can be used to
 access the contents of the capture buffers.
 
-Thus, to replace all doubled chars, one could write
+Thus, to replace all doubled chars with a single copy, one could write
 
     s/(?<letter>.)\k<letter>/$+{letter}/g
 
@@ -177,7 +177,7 @@ that contain backreferences. See L<perlre/"Capture buffers">. (Yves Orton)
 =item C<\K> escape
 
 The functionality of Jeff Pinyan's module Regexp::Keep has been added to
-the core. You can now use in regular expressions the special escape C<\K>
+the core. In regular expressions you can now use the special escape C<\K>
 as a way to do something like floating length positive lookbehind. It is
 also useful in substitutions like:
 
@@ -225,10 +225,10 @@ overriding the lexical declaration with C<our $_>. (Rafael Garcia-Suarez)
 
 =head2 The C<_> prototype
 
-A new prototype character has been added. C<_> is equivalent to C<$> (it
-denotes a scalar), but defaults to C<$_> if the corresponding argument
-isn't supplied. Due to the optional nature of the argument, you can only
-use it at the end of a prototype, or before a semicolon.
+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.
 
 This has a small incompatible consequence: the prototype() function has
 been adjusted to return C<_> for some built-ins in appropriate cases (for
@@ -250,12 +250,12 @@ for more information. (Alex Gough)
 
 A new pragma, C<mro> (for Method Resolution Order) has been added. It
 permits to switch, on a per-class basis, the algorithm that perl uses to
-find inherited methods in case of a mutiple inheritance hierachy. The
+find inherited methods in case of a multiple inheritance hierarchy. The
 default MRO hasn't changed (DFS, for Depth First Search). Another MRO is
 available: the C3 algorithm. See L<mro> for more information.
 (Brandon Black)
 
-Note that, due to changes in the implentation of class hierarchy search,
+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.
@@ -282,7 +282,7 @@ but retain their previous value. (Rafael Garcia-Suarez, Nicholas Clark)
 
 To use state variables, one needs to enable them by using
 
-    use feature "state";
+    use feature 'state';
 
 or by using the C<-E> command-line switch in one-liners.
 See L<perlsub/"Persistent variables via state()">.
@@ -303,14 +303,6 @@ to inheritance). (chromatic)
 
 See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.
 
-=head2 C<CLONE_SKIP()>
-
-Perl has now support for the C<CLONE_SKIP> special subroutine. Like
-C<CLONE>, C<CLONE_SKIP> is called once per package; however, it is called
-just before cloning starts, and in the context of the parent thread. If it
-returns a true value, then no objects of that class will be cloned. See
-L<perlmod> for details. (Contributed by Dave Mitchell.)
-
 =head2 Formats
 
 Formats were improved in several ways. A new field, C<^*>, can be used for
@@ -351,7 +343,9 @@ You can now use recursive subroutines with sort(), thanks to Robin Houston.
 The constant folding routine is now wrapped in an exception handler, and
 if folding throws an exception (such as attempting to evaluate 0/0), perl
 now retains the current optree, rather than aborting the whole program.
-(Nicholas Clark, Dave Mitchell)
+Without this change, programs would not compile if they had expressions that
+happened to generate exceptions, even though those expressions were in code
+that could never be reached at runtime. (Nicholas Clark, Dave Mitchell)
 
 =head2 Source filters in @INC
 
@@ -406,13 +400,19 @@ been updated to version 5.0.0.
 
 =head2 MAD
 
-MAD, which stands for I<Misc Attribute Decoration>, is a
+MAD, which stands for I<Miscellaneous Attribute Decoration>, is a
 still-in-development work leading to a Perl 5 to Perl 6 converter. To
 enable it, it's necessary to pass the argument C<-Dmad> to Configure. The
-obtained perl isn't binary compatible with a regular perl 5.9.4, and has
+obtained perl isn't binary compatible with a regular perl 5.10, and has
 space and speed penalties; moreover not all regression tests still pass
 with it. (Larry Wall, Nicholas Clark)
 
+=head2 kill() on Windows
+
+On Windows platforms, C<kill(-9, $pid)> now kills a process tree.
+(On UNIX, this delivers the signal to all processes in the same process
+group.)
+
 =head1 Incompatible Changes
 
 =head2 Packing and UTF-8 strings
@@ -431,7 +431,8 @@ To be consistent with pack(), the C<C0> in unpack() templates indicates
 that the data is to be processed in character mode, i.e. character by
 character; on the contrary, C<U0> in unpack() indicates UTF-8 mode, where
 the packed string is processed in its UTF-8-encoded Unicode form on a byte
-by byte basis. This is reversed with regard to perl 5.8.X.
+by byte basis. This is reversed with regard to perl 5.8.X, but now consistent
+between pack() and unpack().
 
 Moreover, C<C0> and C<U0> can also be used in pack() templates to specify
 respectively character and byte modes.
@@ -537,11 +538,11 @@ equivalent to setting it to C<'DEFAULT'>. (Rafael Garcia-Suarez)
 
 =head2 strictures and dereferencing in defined()
 
-C<use strict "refs"> was ignoring taking a hard reference in an argument
+C<use strict 'refs'> was ignoring taking a hard reference in an argument
 to defined(), as in :
 
-    use strict "refs";
-    my $x = "foo";
+    use strict 'refs';
+    my $x = 'foo';
     if (defined $$x) {...}
 
 This now correctly produces the run-time error C<Can't use string as a
@@ -577,7 +578,7 @@ B::Concise).
 
 =head2 Removal of the JPL
 
-The JPL (Java-Perl Linguo) has been removed from the perl sources tarball.
+The JPL (Java-Perl Lingo) has been removed from the perl sources tarball.
 
 =head2 Recursive inheritance detected earlier
 
@@ -623,6 +624,10 @@ The C<base> pragma now warns if a class tries to inherit from itself.
 C<strict> and C<warnings> will now complain loudly if they are loaded via
 incorrect casing (as in C<use Strict;>). (Johan Vromans)
 
+=item C<version>
+
+The C<version> module provides support for version objects.
+
 =item C<warnings>
 
 The C<warnings> pragma doesn't load C<Carp> anymore. That means that code
@@ -632,7 +637,7 @@ anymore, and will require parentheses to be added after the function name:
 
     use warnings;
     require Carp;
-    Carp::confess "argh";
+    Carp::confess 'argh';
 
 =item C<less>
 
@@ -826,9 +831,6 @@ rerunning all bar the last command from a saved command history.
 It can also display the parent inheritance tree of a given class, with the
 C<i> command.
 
-Perl has a new -dt command-line flag, which enables threads support in the
-debugger.
-
 =item ptar
 
 C<ptar> is a pure perl implementation of C<tar>, that comes with
@@ -836,7 +838,7 @@ C<Archive::Tar>.
 
 =item ptardiff
 
-C<ptardiff> is a small script used to generate a diff between the contents
+C<ptardiff> is a small utility used to generate a diff between the contents
 of a tar archive and a directory tree. Like C<ptar>, it comes with
 C<Archive::Tar>.
 
@@ -852,7 +854,7 @@ above).
 
 =item h2ph and h2xs
 
-C<h2ph> and C<h2xs> have been made a bit more robust with regard to
+C<h2ph> and C<h2xs> have been made more robust with regard to
 "modern" C code.
 
 C<h2xs> implements a new option C<--use-xsloader> to force use of
@@ -886,7 +888,7 @@ their parent modules.)
 
 =item cpanp
 
-C<cpanp>, the CPANPLUS shell, has been added. (C<cpanp-run-perl>, an
+C<cpanp>, the CPANPLUS shell, has been added. (C<cpanp-run-perl>, a
 helper for CPANPLUS operation, has been added too, but isn't intended for
 direct use).
 
@@ -914,12 +916,19 @@ Inc.
 The L<perlreguts> manpage, courtesy of Yves Orton, describes internals of the
 Perl regular expression engine.
 
+The L<perlreapi> manpage describes the interface to the perl interpreter
+used to write pluggable regular expression engines (by Ævar Arnfjörð
+Bjarmason).
+
 The L<perlunitut> manpage is an tutorial for programming with Unicode and
 string encodings in Perl, courtesy of Juerd Waalboer.
 
 A new manual page, L<perlunifaq> (the Perl Unicode FAQ), has been added
 (Juerd Waalboer).
 
+The L<perlcommunity> manpage gives a description of the Perl community
+on the Internet and in real life. (Edgar "Trizor" Bering)
+
 The L<CORE> manual page documents the C<CORE::> namespace. (Tels)
 
 The long-existing feature of C</(?{...})/> regexps setting C<$_> and pos()
@@ -1027,13 +1036,12 @@ this optimization. (Yves Orton)
 B<Note:> Much code exists that works around perl's historic poor
 performance on alternations. Often the tricks used to do so will disable
 the new optimisations. Hopefully the utility modules used for this purpose
-will be educated about these new optimisations by the time 5.10 is
-released.
+will be educated about these new optimisations.
 
 =item Aho-Corasick start-point optimisation
 
 When a pattern starts with a trie-able alternation and there aren't
-better optimisations available the regex engine will use Aho-Corasick
+better optimisations available, the regex engine will use Aho-Corasick
 matching to find the start point. (Yves Orton)
 
 =back
@@ -1109,7 +1117,7 @@ Also, it's now possible to build a C<perl-static.exe> that doesn't depend
 on the Perl DLL on Win32. See the Win32 makefiles for details.
 (Vadim Konovalov)
 
-=item pport.h files
+=item ppport.h files
 
 All F<ppport.h> files in the XS modules bundled with perl are now
 autogenerated at build time. (Marcus Holland-Moritz)
@@ -1120,12 +1128,6 @@ Efforts have been made to make perl and the core XS modules compilable
 with various C++ compilers (although the situation is not perfect with
 some of the compilers on some of the platforms tested.)
 
-=item Building XS extensions on Windows
-
-Support for building XS extension modules with the free MinGW compiler has
-been improved in the case where perl itself was built with the Microsoft
-VC++ compiler. (ActiveState)
-
 =item Support for Microsoft 64-bit compiler
 
 Support for building perl with Microsoft's 64-bit compiler has been
@@ -1133,7 +1135,7 @@ improved. (ActiveState)
 
 =item Visual C++
 
-Perl now can be compiled with Microsoft Visual C++.
+Perl can now be compiled with Microsoft Visual C++ 2005 (and 2008 Beta 2).
 
 =item Win32 builds
 
@@ -1164,7 +1166,9 @@ Perl has been reported to work on DragonFlyBSD and MidnightBSD.
 
 The VMS port has been improved. See L<perlvms>.
 
-Support for Cray XT4 Catamount/Qk has been added.
+Support for Cray XT4 Catamount/Qk has been added. See
+F<hints/catamount.sh> in the source code distribution for more
+information.
 
 Vendor patches have been merged for RedHat and Gentoo.
 
@@ -1256,7 +1260,7 @@ data, so perl no longer tries to read it on Windows. (Alex Davies)
 
 =item PERLIO_DEBUG
 
-The C<PERLIO_DEBUG> environment variable has no longer any effect for
+The C<PERLIO_DEBUG> environment variable no longer has any effect for
 setuid scripts and for scripts run with B<-T>.
 
 Moreover, with a thread-enabled perl, using C<PERLIO_DEBUG> could lead to
@@ -1289,7 +1293,7 @@ accordingly to the contents of that %INC entry. (Rafael)
 =item C<-t> switch fix
 
 The C<-w> and C<-t> switches can now be used together without messing
-up what categories of warnings are activated or not. (Rafael)
+up which categories of warnings are activated. (Rafael)
 
 =item Duping UTF-8 filehandles
 
@@ -1308,6 +1312,11 @@ in C<local $h{$x}; ++$x>). (Bo Lindbergh)
 
 =over 4
 
+=item Use of uninitialized value
+
+Perl will now try to tell you the name of the variable (if any) that was
+undefined.
+
 =item Deprecated use of my() in false conditional
 
 A new deprecation warning, I<Deprecated use of my() in false conditional>,
@@ -1363,6 +1372,11 @@ Two deprecation warnings have been added: (Rafael)
 
 Perl's command-line switch C<-P> is now deprecated.
 
+=item v-string in use/require is non-portable
+
+Perl will warn you against potential backwards compatibility problems with
+the C<use VERSION> syntax.
+
 =item perl -V
 
 C<perl -V> has several improvements, making it more useable from shell
@@ -1373,9 +1387,15 @@ details.
 
 =head1 Changed Internals
 
-In general, the source code of perl has been refactored, tied up, and
-optimized in many places. Also, memory management and allocation has been
-improved in a couple of points.
+In general, the source code of perl has been refactored, tidied up,
+and optimized in many places. Also, memory management and allocation
+has been improved in several points.
+
+When compiling the perl core with gcc, as many gcc warning flags are
+turned on as is possible on the platform.  (This quest for cleanliness
+doesn't extend to XS code because we cannot guarantee the tidiness of
+code we didn't write.)  Similar strictness flags have been added or
+tightened for various other C compilers.
 
 =head2 Reordering of SVt_* constants
 
@@ -1386,6 +1406,19 @@ difference unless you have code that explicitly makes assumptions about that
 ordering. (The inheritance hierarchy of C<B::*> objects has been changed
 to reflect this.)
 
+=head2 Elimination of SVt_PVBM
+
+Related to this, the internal type C<SVt_PVBM> has been been removed. This
+dedicated type of C<SV> was used by the C<index> operator and parts of the
+regexp engine to facilitate fast Boyer-Moore matches. Its use internally has
+been replaced by C<SV>s of type C<SVt_PVGV>.
+
+=head2 New type SVt_BIND
+
+A new type C<SVt_BIND> has been added, in readiness for the project to
+implement Perl 6 on 5. There deliberately is no implementation yet, and
+they cannot yet be created or destroyed.
+
 =head2 Removal of CPP symbols
 
 The C preprocessor symbols C<PERL_PM_APIVERSION> and
@@ -1397,7 +1430,7 @@ been removed.
 =head2 Less space is used by ops
 
 The C<BASEOP> structure now uses less space. The C<op_seq> field has been
-removed and replaced by the one-bit fields C<op_opt>. C<op_type> is now 9
+removed and replaced by a single bit bit-field C<op_opt>. C<op_type> is now 9
 bits long. (Consequently, the C<B::OP> class doesn't provide an C<seq>
 method anymore.)
 
@@ -1434,7 +1467,7 @@ C<AV*> parameters.
 =head2 $^H and %^H
 
 The implementation of the special variables $^H and %^H has changed, to
-allow implementing lexical pragmas in pure perl.
+allow implementing lexical pragmas in pure Perl.
 
 =head2 B:: modules inheritance changed
 
@@ -1447,10 +1480,6 @@ The anonymous hash and array constructors now take 1 op in the optree
 instead of 3, now that pp_anonhash and pp_anonlist return a reference to
 an hash/array when the op is flagged with OPf_SPECIAL (Nicholas Clark).
 
-=for p5p XXX have we some docs on how to create regexp engine plugins, since that's now possible ? (perlreguts)
-
-=for p5p XXX new BIND SV type, #29544, #29642
-
 =head1 Known Problems
 
 There's still a remaining problem in the implementation of the lexical