perldiag: Make Constant(%s) messages match reality
authorFather Chrysostomos <sprout@cpan.org>
Fri, 7 Dec 2012 04:24:34 +0000 (20:24 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 9 Dec 2012 02:46:51 +0000 (18:46 -0800)
We no longer have an ‘in regex’ variant (if we ever did).

The Constant(%s)%s: %s represents three specific warnings, one of
which doesn’t have the colon any more.  It’s clearer if we list all
three, especially since the one about returning undef can acciden-
tally happen with ‘normal’ code (as opposed to code that fiddles with
%^H entries it shouldn’t be touching).

pod/perldiag.pod

index 5f0045b..6589ca8 100644 (file)
@@ -1504,18 +1504,25 @@ thread has entered cond_wait() and thus relinquished the lock.
 to check the return value of your socket() call?  See
 L<perlfunc/connect>.
 
-=item Constant(%s)%s: %s
+=item Constant(%s): Call to &{$^H{%s}} did not return a defined value
+
+(F) The subroutine registered to handle constant overloading
+(see L<overload>) or a custom charnames handler (see
+L<charnames/CUSTOM TRANSLATORS>) returned an undefined value.
+
+=item Constant(%s): $^H{%s} is not defined
+
+(F) The parser found inconsistencies while attempting to define an
+overloaded constant.  Perhaps you forgot to load the corresponding
+L<overload> pragma?.
+
+=item Constant(%s) unknown
 
 (F) The parser found inconsistencies either while attempting to define
 an overloaded constant, or when trying to find the character name
 specified in the C<\N{...}> escape.  Perhaps you forgot to load the
 corresponding L<overload> pragma?.
 
-=item Constant(%s)%s: %s in regex; marked by <-- HERE in m/%s/
-
-(F) The parser found inconsistencies while attempting to find
-the character name specified in the C<\N{...}> escape.
-
 =item Constant is not %s reference
 
 (F) A constant value (perhaps declared using the C<use constant> pragma)