diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 870e923b12a87..d607a9abe5f42 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -428,6 +428,23 @@ assigning through that reference. For example used as an lvalue, which is pretty strange. Perhaps you forgot to dereference it first. See L. +=item Attribute %s on %s does not take a value + +(F) You specified an attribute that does not permit a value to be passed in, +but provided a value anyway. Remember that whitespace is B between +an attribute name and the parentheses of a signature or prototype on a +subroutine; you must write this as + + sub f :attr ($signature) { ... } + +=item Attribute %s on %s requires a value + +(F) You specified an attribute that would require a value to be passed in +parentheses, but did not provide one. Remember that whitespace is B +permitted between the attribute name and its value; you must write this as + + class Example::Class :attr(VALUE) ... + =item Attribute prototype(%s) discards earlier prototype attribute in same sub (W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for @@ -1822,15 +1839,6 @@ the C<:isa> attribute, when one is already specified. Unlike classes whose instances are created with C, classes created via the C keyword cannot have more than one superclass. -=item Class attribute %s requires a value - -(F) You specified an attribute for a class that would require a value to -be passed in parentheses, but did not provide one. Remember that -whitespace is B permitted between the attribute name and its value; -you must write this as - - class Example::Class :attr(VALUE) ... - =item class is experimental (S experimental::class) This warning is emitted if you use the C @@ -2552,15 +2560,6 @@ is not possible. (F) A field may have at most one application of the C<:param> attribute to assign a parameter name to it; once applied a second one is not allowed. -=item Field attribute %s requires a value - -(F) You specified an attribute for a field that would require a value to -be passed in parentheses, but did not provide one. Remember that -whitespace is B permitted between the attribute name and its value; -you must write this as - - field $var :attr(VALUE) ... - =item field is experimental (S experimental::class) This warning is emitted if you use the C @@ -7233,6 +7232,11 @@ reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine. +=item Unrecognized attribute %s on %s + +(F) You attempted to add a named attribute to a declaration, but perl does +not recognise the name of the requested attribute. + =item Unrecognized character %s; marked by S<<-- HERE> after %s near column %d @@ -7241,11 +7245,6 @@ in your Perl script (or eval) near the specified column. Perhaps you tried to run a compressed script, a binary program, or a directory as a Perl program. -=item Unrecognized class attribute %s - -(F) You attempted to add a named attribute to a C definition, but -perl does not recognise the name of the requested attribute. - =item Unrecognized escape \%c in character class in regex; marked by S<<-- HERE> in m/%s/ @@ -7276,11 +7275,6 @@ recognized by Perl. The character(s) were understood literally, but this may change in a future version of Perl. The S<<-- HERE> shows whereabouts in the regular expression the escape was discovered. -=item Unrecognized field attribute %s - -(F) You attempted to add a named attribute to a C definition, but -perl does not recognise the name of the requested attribute. - =item Unrecognized signal name "%s" (F) You specified a signal name to the kill() function that was not