DRIVER=processor
MODALIAS=x86cpu:vendor:0000:family:000F:model:0006:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0017,0018,0019,001A,001C,002B,0034,003D,0068,006F,0072,0074,0076,007D,0080,008D,0095,009F,00C0,00F3,00FD,0164,0165

     -ˆÆÍ„i—žw¿Ê ?÷     -=head1 NAME

perl5101delta - what is new for perl v5.10.1

=head1 DESCRIPTION

This document describes differences between the 5.10.0 release and
the 5.10.1 release.

If you are upgrading from an earlier release such as 5.8.8, first read
the L<perl5100delta>, which describes differences between 5.8.8 and
5.10.0

=head1 Incompatible Changes

=head2 Switch statement changes

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
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 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/) {
      # do something
    }

=item defined-or operator

A compound expression involving the defined-or operator, as in
C<when (expr1 // expr2)>, will be treated as boolean if the first
expression is boolean. (This just extends the existing rule that applies
to the regular or operator, as in C<when (expr1 || expr2)>.)

=back

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.

=head2 Smart match changes

=head3 Changes to type-based dispatch

The smart match operator C<~~> is no longer commutative. The behaviour of
a smart match now depends primarily on the type of its right hand
argument. Moreover, its semantics have been adjusted for greater
consistency or usefulness in several cases. While the general backwards
compatibility is maintained, several changes must be noted:

=over 4

=item *

Code references with an empty prototype are no longer treated specially.
They are passed an argument like the other code references (even if they
choose to ignore it).

=item *

C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
returns a true value for each key of the hash (or element of the
array), instead of passing the whole hash or array as a reference to
the subroutine.

=item *

Due to the commutativity breakage, code references are no longer
treated specially when appearing on the left of the C<~~> operator,
but like any vulgar scalar.

=item *

C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
hash). No implicit conversion to C<""> is done (as was the case in perl
5.10.0).

=item *

C<$scalar ~~ @array> now always distributes the smart match across the
elements of the array. It's true if one element in @array verifies
C<$scalar ~~ $element>. This is a generalization of the old behaviour
that tested whether the array contained the scalar.

=back

The full dispatch table for the smart match operator is given in
L<perlsyn/"Smart matching in detail">.

=head3 Smart match and overloading

According to the rule of dispatch based on the rightmost argument type,
when an object overloading C<~~> appears on the right side of the
operator, the overload routine will always be called (with a 3rd argument
set to a true value, see L<overload>.) However, when the object will
appear on the left, the overload routine will be called only when the
rightmost argument is a simple scalar. This way distributivity of smart match
across arrays is not broken, as well as the other behav