diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-03-01 12:29:26 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-03-01 12:34:33 -0800 |
commit | c217304d4cf1ab81c53d2d565896c7dd34645864 (patch) | |
tree | ef59fd30da9cf268efce85f47266358324527403 /ext/attributes/attributes.pm | |
parent | 345d70e3f599db40c8311185ac403b1a5b35d2a5 (diff) | |
download | perl-c217304d4cf1ab81c53d2d565896c7dd34645864.tar.gz |
attributes.pm: Add caveat about lvalue subs
Diffstat (limited to 'ext/attributes/attributes.pm')
-rw-r--r-- | ext/attributes/attributes.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm index 2ce7d8771f..e13bbb87de 100644 --- a/ext/attributes/attributes.pm +++ b/ext/attributes/attributes.pm @@ -222,6 +222,15 @@ Indicates that the referenced subroutine is a valid lvalue and can be assigned to. The subroutine must return a modifiable value such as a scalar variable, as described in L<perlsub>. +This module allows one to set this attribute on a subroutine that is +already defined. For Perl subroutines (XSUBs are fine), it may or may not +do what you want, depending on the code inside the subroutine, with details +subject to change in future Perl versions. You may run into problems with +lvalue context not being propagated properly into the subroutine, or maybe +even assertion failures. For this reason, a warning is emitted if warnings +are enabled. In other words, you should only do this if you really know +what you are doing. You have been warned. + =item method Indicates that the referenced subroutine is a method. A subroutine so marked |