summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-01-19 20:33:01 -0800
committerFather Chrysostomos <sprout@cpan.org>2015-01-19 20:34:13 -0800
commit997340692b82e720b661394ed6fca1989b1abc2d (patch)
tree7c116e013e9068f6df896444236131546419edc4 /ext
parent4a873d7a0f3c3698425007a136dda05b0adef997 (diff)
downloadperl-997340692b82e720b661394ed6fca1989b1abc2d.tar.gz
Document :const
Diffstat (limited to 'ext')
-rw-r--r--ext/attributes/attributes.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm
index bac3d7be99..062cd77ce0 100644
--- a/ext/attributes/attributes.pm
+++ b/ext/attributes/attributes.pm
@@ -260,6 +260,13 @@ attribute will be sanity checked at compile time.
The "locked" attribute is deprecated, and has no effect in 5.10.0 and later.
It was used as part of the now-removed "Perl 5.005 threads".
+=item const
+
+This experimental attribute, introduced in Perl 5.22, only applies to
+anonymous subroutines. It causes the subroutine to be called as soon as
+the C<sub> expression is evaluated. The return value is captured and
+turned into a constant subroutine.
+
=back
The following are the built-in attributes for variables: