Describe changes to Carp and Carp::Heavy
[p5sagit/p5-mst-13.2.git] / pod / perl5110delta.pod
index ea62b67..b4c2cdc 100644 (file)
@@ -13,15 +13,25 @@ development releases.
 
 The handling of complex expressions by the C<given>/C<when> switch
 statement has been enhanced. There are two new cases where C<when> now
-inteprets its argument as a boolean, instead of an expression to be used
+interprets its argument as a boolean, instead of an expression to be used
 in a smart match:
 
 =over 4
 
 =item flip-flop operators
 
-The C<..> and C<...> flip-flop operators are evaluated in boolean context,
-following their usual semantics; see L<perlop/"Range Operators">.
+The C<..> and C<...> flip-flop operators are now evaluated in boolean
+context, following their usual semantics; see L<perlop/"Range Operators">.
+
+Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
+whether a given value is an integer between 1 and 10; you should use
+C<when ([1..10])> instead (note the array reference).
+
+However, contrary to 5.10.0, evaluating the flip-flop operators in boolean
+context ensures it can now be useful in a C<when()>, notably for
+implementing bistable conditions, like in:
+
+    when (/^=begin/ .. /^=end/) { ... }
 
 =item defined-or operator
 
@@ -32,7 +42,7 @@ to the regular or operator, as in C<when (expr1 || expr2)>.)
 
 =back
 
-The next paragraph details more changes brought to the semantics to
+The next section details more changes brought to the semantics to
 the smart match operator, that naturally also modify the behaviour
 of the switch statements where smart matching is implicitly used.
 
@@ -100,15 +110,52 @@ and possibly with stringification overloading; the other common cases
 will be automatically handled consistently.
 
 C<~~> will now refuse to work on objects that do not overload it (in order
-to avoid relying on the object's underlying structure).
+to avoid relying on the object's underlying structure). (However, if the
+object overloads the stringification or the numification operators, and
+if overload fallback is active, it will be used instead, as usual.)
 
 =head1 Core Enhancements
 
-=head1 The C<overloading> pragma
+=head2 The C<overloading> pragma
 
 This pragma allows you to lexically disable or enable overloading
 for some or all operations. (Yuval Kogman)
 
+=head2 C<\N> regex escape
+
+A new regex escape has been added, C<\N>. It will match any character that
+is not a newline, independently from the presence or absence of the single
+line match modifier C</s>. (If C<\N> is followed by an opening brace and
+by a letter, perl will still assume that a Unicode character name is
+coming, so compatibility is preserved.) (Rafael Garcia-Suarez)
+
+=head2 Implicit strictures
+
+Using the C<use VERSION> syntax with a version number greater or equal
+to 5.11.0 will also lexically enable strictures just like C<use strict>
+would do (in addition to enabling features.) So, the following:
+
+    use 5.11.0;
+
+will now imply:
+
+    use strict;
+    use feature ':5.11';
+
+=head2 Parallel tests
+
+The core distribution can now run its regression tests in parallel on
+Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
+your environment to the number of tests to run in parallel, and run
+C<make test_harness>. On a Bourne-like shell, this can be done as
+
+    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel
+
+An environment variable is used, rather than parallel make itself, because
+L<TAP::Harness> needs to be able to schedule individual non-conflicting test
+scripts itself, and there is no standard interface to C<make> utilities to
+interact with their job schedulers.
+
 =head1 Modules and Pragmata
 
 =head2 Pragmata Changes
@@ -121,6 +168,17 @@ See L</"The C<overloading> pragma"> above.
 
 =back
 
+=head2 Selected Changes to Core Modules
+
+=over 4
+
+L<Carp> now includes all the necessary code to function. Previously, it
+used to be a lightweight placeholder that loaded the actual code from
+C<Carp::Heavy> on demand. C<Carp::Heavy> is now a simple, empty module
+kept for backwards compatibility for programs that used to pre-load it.
+
+=back
+
 =head1 Utility Changes
 
 =head1 Documentation
@@ -138,6 +196,13 @@ See L</"The C<overloading> pragma"> above.
 as documented, and as does C<-I> when specified on the command-line.
 (Renée Bäcker)
 
+=item C<kill> is now fatal when called on non-numeric process identifiers
+
+Previously, an 'undef' process identifier would be interpreted as a request to
+kill process "0", which would terminate the current process group on POSIX
+systems.  Since process identifiers are always integers, killing a non-numeric
+process is now fatal.
+
 =back
 
 =head1 New or Changed Diagnostics
@@ -161,6 +226,15 @@ to a tiny but sufficient test case.  Your bug report, along with the
 output of C<perl -V>, will be sent off to perlbug@perl.org to be
 analysed by the Perl porting team.
 
+If the bug you are reporting has security implications, which make it
+inappropriate to send to a publicly archived mailing list, then please send
+it to perl5-security-report@perl.org. This points to a closed subscription
+unarchived mailing list, which includes all the core committers, who be able
+to help assess the impact of issues, figure out a resolution, and help
+co-ordinate the release of patches to mitigate or fix the problem across all
+platforms on which Perl is supported. Please only use this address for security
+issues in the Perl core, not for modules independently distributed on CPAN.
+
 =head1 SEE ALSO
 
 The F<Changes> file for exhaustive details on what changed.