diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-06-21 23:02:25 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-22 08:21:14 -0700 |
commit | bb3abb059a118f508179df292a0a6e562767107f (patch) | |
tree | 4f392856cc80bca46ff02d854b34ae6376ddd33f /pod/perldiag.pod | |
parent | eddd77ceed2006321182714bd36a37ee8620dbde (diff) | |
download | perl-bb3abb059a118f508179df292a0a6e562767107f.tar.gz |
attributes.pm: warn & don’t apply :lvalue to defined subs
This is something that ‘sub foo :lvalue;’ declarations do. This brings
attributes.pm in line with them.
See commits fff96ff and 885ef6f, ticket #68758, and
<364E1F98-FDCC-49A7-BADB-BD844626B8AE@cpan.org>.
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r-- | pod/perldiag.pod | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 7954739f77..51a19e7d1c 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2474,13 +2474,18 @@ You may wish to switch to using L<Math::BigInt> explicitly. by that? lstat() makes sense only on filenames. (Perl did a fstat() instead on the filehandle.) +=item lvalue attribute cannot be removed after the subroutine has been defined + +(W misc) The lvalue attribute on a Perl subroutine cannot be turned off +once the subroutine is defined. + =item lvalue attribute ignored after the subroutine has been defined -(W misc) Making a subroutine an lvalue subroutine after it has been defined -by declaring the subroutine with an lvalue attribute is not -possible. To make the subroutine an lvalue subroutine add the -lvalue attribute to the definition, or put the declaration before -the definition. +(W misc) Making a Perl subroutine an lvalue subroutine after it has been +defined, whether by declaring the subroutine with an lvalue attribute +or by using L<attributes.pm|attributes>, is not possible. To make the subroutine an +lvalue subroutine, add the lvalue attribute to the definition, or put +the declaration before the definition. =item Malformed integer in [] in pack |