Update Module::Load::Conditional to 0.20
[p5sagit/p5-mst-13.2.git] / pod / perlop.pod
index 52ecddc..9ef1aec 100644 (file)
@@ -53,7 +53,7 @@ values only, not array values.
     nonassoc   list operators (rightward)
     right      not
     left       and
-    left       or xor err
+    left       or xor
 
 In the following sections, these operators are covered in precedence order.
 
@@ -522,9 +522,9 @@ for selecting between two aggregates for assignment:
     @a = scalar(@b) || @c;     # really meant this
     @a = @b ? @b : @c;         # this works fine, though
 
-As more readable alternatives to C<&&>, C<//> and C<||> when used for
-control flow, Perl provides C<and>, C<err> and C<or> operators (see below).
-The short-circuit behavior is identical.  The precedence of "and", "err"
+As more readable alternatives to C<&&> and C<||> when used for
+control flow, Perl provides the C<and> and C<or> operators (see below).
+The short-circuit behavior is identical.  The precedence of "and"
 and "or" is much lower, however, so that you can safely use them after a
 list operator without the need for parentheses:
 
@@ -838,9 +838,9 @@ precedence.  This means that it short-circuits: i.e., the right
 expression is evaluated only if the left expression is true.
 
 =head2 Logical or, Defined or, and Exclusive Or
-X<operator, logical, or> X<operator, logical, xor> X<operator, logical, err>
+X<operator, logical, or> X<operator, logical, xor>
 X<operator, logical, defined or> X<operator, logical, exclusive or>
-X<or> X<xor> X<err>
+X<or> X<xor>
 
 Binary "or" returns the logical disjunction of the two surrounding
 expressions.  It's equivalent to || except for the very low precedence.
@@ -865,13 +865,6 @@ takes higher precedence.
 
 Then again, you could always use parentheses.
 
-Binary "err" is equivalent to C<//>--it's just like binary "or", except it
-tests its left argument's definedness instead of its truth.  There are two
-ways to remember "err":  either because many functions return C<undef> on
-an B<err>or, or as a sort of correction:  C<$a = ($b err 'default')>. This
-keyword is only available when the 'err' feature is enabled: see
-L<feature> for more information.
-
 Binary "xor" returns the exclusive-OR of the two surrounding expressions.
 It cannot short circuit, of course.
 
@@ -1050,17 +1043,21 @@ matching and related activities.
 =over 8
 
 =item qr/STRING/msixpo
-X<qr> X</i> X</m> X</o> X</s> X</x>
+X<qr> X</i> X</m> X</o> X</s> X</x> X</p>
 
 This operator quotes (and possibly compiles) its I<STRING> as a regular
 expression.  I<STRING> is interpolated the same way as I<PATTERN>
 in C<m/PATTERN/>.  If "'" is used as the delimiter, no interpolation
 is done.  Returns a Perl value which may be used instead of the
-corresponding C</STRING/imosx> expression.
+corresponding C</STRING/msixpo> expression. The returned value is a
+normalized version of the original pattern. It magically differs from
+a string containing the same characters: C<ref(qr/x/)> returns "Regexp",
+even though dereferencing the result returns undef.
 
 For example,
 
     $rex = qr/my.STRING/is;
+    print $rex;                 # prints (?si-xm:my.STRING)
     s/$rex/foo/;
 
 is equivalent to
@@ -1117,7 +1114,7 @@ for a detailed look at the semantics of regular expressions.
 =item m/PATTERN/msixpogc
 X<m> X<operator, match>
 X<regexp, options> X<regexp> X<regex, options> X<regex>
-X</c> X</i> X</m> X</o> X</s> X</x>
+X</m> X</s> X</i> X</x> X</p> X</o> X</g> X</c>
 
 =item /PATTERN/msixpogc
 
@@ -1130,8 +1127,8 @@ rather tightly.)  See also L<perlre>.  See L<perllocale> for
 discussion of additional considerations that apply when C<use locale>
 is in effect.
 
-Options are as described in qr// in addition to the following match
-process modifiers
+Options are as described in C<qr//>; in addition, the following match
+process modifiers are available:
 
     g  Match globally, i.e., find all occurrences.
     c  Do not reset search position on a failed match when /g is in effect.
@@ -1152,7 +1149,7 @@ the trailing delimiter.  This avoids expensive run-time recompilations,
 and is useful when the value you are interpolating won't change over
 the life of the script.  However, mentioning C</o> constitutes a promise
 that you won't change the variables in the pattern.  If you change them,
-Perl won't even notice.  See also L<"qr/STRING/imosx">.
+Perl won't even notice.  See also L<"qr/STRING/msixpo">.
 
 If the PATTERN evaluates to the empty string, the last
 I<successfully> matched regular expression is used instead. In this
@@ -1317,7 +1314,7 @@ around the year 2168.
 
 =item s/PATTERN/REPLACEMENT/msixpogce
 X<substitute> X<substitution> X<replace> X<regexp, replace>
-X<regexp, substitute> X</e> X</g> X</i> X</m> X</o> X</s> X</x>
+X<regexp, substitute> X</m> X</s> X</i> X</x> X</p> X</o> X</g> X</c> X</e>
 
 Searches a string for a pattern, and if found, replaces that pattern
 with the replacement text and returns the number of substitutions
@@ -1425,6 +1422,8 @@ to occur that you might want.  Here are two common cases:
 =head2 Quote-Like Operators
 X<operator, quote-like>
 
+=over 4
+
 =item q/STRING/
 X<q> X<quote, single> X<'> X<''>