From bb3abb059a118f508179df292a0a6e562767107f Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 21 Jun 2011 23:02:25 -0700 Subject: =?UTF-8?q?attributes.pm:=20warn=20&=20don=E2=80=99t=20apply=20:lv?= =?UTF-8?q?alue=20to=20defined=20subs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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>. --- pod/perldiag.pod | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'pod/perldiag.pod') 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 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, 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 -- cgit v1.2.1