This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for :const
authorFather Chrysostomos <sprout@cpan.org>
Tue, 20 Jan 2015 04:39:44 +0000 (20:39 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 20 Jan 2015 04:39:44 +0000 (20:39 -0800)
pod/perldelta.pod

index af25293..5fe09b5 100644 (file)
@@ -68,6 +68,13 @@ experience, using this pragma will raise a category
 C<experimental:re_strict> warning.
 See L<'strict' in re|re/'strict' mode>.
 
+=head2 New "const" subroutine attribute
+
+The "const" attribute can be applied to an anonymous subroutine.  It causes
+it to be executed immediately when it is cloned.  Its value is captured and
+used to create a new constant subroutine that is returned.  This feature is
+experimental.  See L<perlsub/Constant Functions>.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security