Skip to content

Commit

Permalink
Adjustments to perldiag.pod for new attribute.c errors
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Nov 22, 2023
1 parent 77970f6 commit 1ed5e14
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions pod/perldiag.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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<perlfunc/substr>.

=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<required> 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<not>
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
Expand Down Expand Up @@ -1822,15 +1839,6 @@ the C<:isa> attribute, when one is already specified. Unlike classes
whose instances are created with C<bless>, classes created via the
C<class> 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<not> 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<class>
Expand Down Expand Up @@ -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<not> 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<field>
Expand Down Expand Up @@ -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

Expand All @@ -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<class> 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/

Expand Down Expand Up @@ -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<field> 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
Expand Down

0 comments on commit 1ed5e14

Please sign in to comment.