summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2022-02-15 18:54:29 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2022-02-20 00:07:03 +0000
commit3d1a4f06721f5fc5870542326c4cfeebe339db99 (patch)
tree50319418ded469f27ae02d6783ca0668fa3159b9 /regen
parent088588be575cc78689858d4fb2002463d401881e (diff)
downloadperl-3d1a4f06721f5fc5870542326c4cfeebe339db99.tar.gz
Add 'signatures' to :5.36 feature bundle
Diffstat (limited to 'regen')
-rwxr-xr-xregen/feature.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index fca1963b39..49b4a4994e 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -60,7 +60,7 @@ use constant V5_27 => sort ( +V5_23, qw{bitwise} );
use constant V5_35 => sort grep {; $_ ne 'switch'
&& $_ ne 'bareword_filehandles'
&& $_ ne 'indirect'
- && $_ ne 'multidimensional' } +V5_27, qw{isa};
+ && $_ ne 'multidimensional' } +V5_27, qw{isa signatures};
my %feature_bundle = (
all => [ sort keys %feature ],
@@ -702,13 +702,15 @@ regardless of what feature declarations are in scope.
=head2 The 'signatures' feature
-This enables unpacking of subroutine arguments into lexical variables
-by syntax such as
+This enables syntax for declaring subroutine arguments as lexical variables.
+For example, for this suroutine:
sub foo ($left, $right) {
- return $left + $right;
+ return $left + $right;
}
+Calling C<foo(3, 7)> will assign C<3> into C<$left> and C<7> into C<$right>.
+
See L<perlsub/Signatures> for details.
This feature is available from Perl 5.20 onwards. From Perl 5.20 to 5.34,
@@ -719,7 +721,8 @@ except when explicitly disabled:
As of Perl 5.36, use of this feature no longer triggers a warning, though the
C<experimental::signatures> warning category still exists (for compatibility
-with code that disables it).
+with code that disables it). This feature is now considered stable, and is
+enabled automatically by C<use v5.36> (or higher).
=head2 The 'refaliasing' feature