Add the overload warnings to perldiag.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 1 Sep 2000 13:59:24 +0000 (13:59 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 1 Sep 2000 13:59:24 +0000 (13:59 +0000)
p4raw-id: //depot/perl@6971

lib/overload.pm
pod/perldiag.pod

index b9c9ce7..6b1b82f 100644 (file)
@@ -1354,7 +1354,7 @@ key (in fact a presence of this method shows that this package has
 overloading enabled, and it is what is used by the C<Overloaded>
 function of module C<overload>).
 
-The module might issues the following warnings:
+The module might issue the following warnings:
 
 =over 4
 
index 20cc027..27711f5 100644 (file)
@@ -1713,6 +1713,16 @@ silently ignored.
 (F) Your machine apparently doesn't implement ioctl(), which is pretty
 strange for a machine that supports C.
 
+=item `%s' is not a code reference
+
+(W) The second (fourth, sixth, ...) argument of overload::constant needs
+to be a code reference. Either an anonymous subroutine, or a reference
+to a subroutine.
+
+=item `%s' is not an overloadable type
+
+(W) You tried to overload a constant type the overload package is unaware of.
+
 =item junk on end of regexp
 
 (P) The regular expression parser is confused.
@@ -2236,6 +2246,11 @@ L<perlport> for more on portability concerns.
 
 See also L<perlport> for writing portable code.
 
+=item Odd number of arguments for overload::constant
+
+(W) The call to overload::constant contained an odd number of arguments.
+The arguments should come in pairs.
+
 =item Odd number of elements in hash assignment
 
 (W misc) You specified an odd number of elements to initialize a hash,