File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,13 @@ breaking existing code. To avoid this a future version of perl will
296
296
throw an exception when any of C<sysread()>, C<recv()>, C<syswrite()> or C<send()>
297
297
are called on handle with the C<:utf8> layer.
298
298
299
+ =head2 Signatured subs should not rely on @_
300
+
301
+ Currently the experimental subroutine signature facility still populates
302
+ C<@_> in addition to setting the parameter variables. In the next major
303
+ release of perl this is likely to change, so that C<@_> is not populated by
304
+ default (although a new mechanism will be provided to re-enable it).
305
+
299
306
=head1 Performance Enhancements
300
307
301
308
=over 4
Original file line number Diff line number Diff line change @@ -458,9 +458,11 @@ that the caller passed no arguments:
458
458
return 123;
459
459
}
460
460
461
- When using a signature, the arguments are still available in the special
462
- array variable C<@_>, in addition to the lexical variables of the
463
- signature. There is a difference between the two ways of accessing the
461
+ When using a signature, the arguments are currently still available in the
462
+ special array variable C<@_>, in addition to the lexical variables of the
463
+ signature, but in a future release of perl that may change to being not
464
+ available by default. There is a difference between the two ways of
465
+ accessing the
464
466
arguments: C<@_> I<aliases> the arguments, but the signature variables
465
467
get I<copies> of the arguments. So writing to a signature variable
466
468
only changes that variable, and has no effect on the caller's variables,
You can’t perform that action at this time.
0 commit comments