diff options
author | Peter Martini <PeterCMartini@GMail.com> | 2013-10-13 16:00:00 -0400 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2013-10-16 13:17:44 +0200 |
commit | eedb00faea0e643c5d10ea0d9200aa705124d603 (patch) | |
tree | 1da04599023cc1c8c85517c195cf8f3be9506710 /pod/perlsub.pod | |
parent | 53d48b8bc3daee9ac6baf1f5eb39e4d9899a6646 (diff) | |
download | perl-eedb00faea0e643c5d10ea0d9200aa705124d603.tar.gz |
Adding a prototype attribute.
This attribute adds an additional way of declaring a prototype for a
sub, making sub foo($$) and sub foo : prototype($$) equivalent. The
intent is to keep the functionality of prototypes while allowing other
modules to use the syntactic space it currently occupies for other
purposes.
The attribute is supported in attributes.xs to allow
attributes::->import to work, but if its defined inline via something
like sub foo : prototype($$) {}, it will not call out to the
attributes module.
For: RT #119251
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r-- | pod/perlsub.pod | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 2b4b35b96b..2a9e0a838f 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1189,7 +1189,9 @@ Notice to pass back just the bare *FH, not its reference. X<prototype> X<subroutine, prototype> Perl supports a very limited kind of compile-time argument checking -using function prototyping. If you declare +using function prototyping. This can be declared in either the PROTO +section or with a L<prototype attribute|attributes/Built-in Attributes>. +If you declare sub mypush (+@) |