Document "Ambiguous use of %c resolved as operator %c"
authorJames Mastros <james@mastros.biz>
Wed, 2 Jun 2010 16:35:22 +0000 (17:35 +0100)
committerRafael Garcia-Suarez <rgs@consttype.org>
Mon, 26 Jul 2010 08:13:01 +0000 (10:13 +0200)
pod/perldiag.pod
t/porting/diag.t

index 9166457..55e53f1 100644 (file)
@@ -89,6 +89,15 @@ C<tr/a-y//>, which was probably not what you would have expected.)
 you thought.  Normally it's pretty easy to disambiguate it by supplying
 a missing quote, operator, parenthesis pair or declaration.
 
+=item Ambiguous use of %c resolved as operator %c
+
+(W ambiguous) C<%>, C<&>, and C<*> are both infix operators (modulus,
+bitwise and, and multpication), and you said something like C<*foo *
+foo> that might be interpreted as either of them.  We assumed you
+meant the infix operator, but please try to make it more clear -- in
+the example given, you might write C<*foo * foo()> if you really meant
+to multiply a glob by the result of calling a function.
+
 =item '|' and '<' may not both be specified on command line
 
 (F) An error peculiar to VMS.  Perl does its own command line
index 4fbfa84..46b4a86 100644 (file)
@@ -226,7 +226,6 @@ sub check_file {
 # PLEASE DO NOT ADD TO THIS LIST.  Instead, write an entry in
 # pod/perldiag.pod for your new (warning|error).
 __DATA__
-Ambiguous use of %c resolved as operator %c
 Ambiguous use of %c{%s} resolved to %c%s
 Ambiguous use of %c{%s%s} resolved to %c%s%s
 Ambiguous use of -%s resolved as -&%s()