summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/attributes.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/attributes.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/attributes.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/Master/tlpkg/tlperl/lib/attributes.pm b/Master/tlpkg/tlperl/lib/attributes.pm
index 5a656a69236..ebca2146085 100644
--- a/Master/tlpkg/tlperl/lib/attributes.pm
+++ b/Master/tlpkg/tlperl/lib/attributes.pm
@@ -1,6 +1,6 @@
package attributes;
-our $VERSION = 0.21;
+our $VERSION = 0.23;
@EXPORT_OK = qw(get reftype);
@EXPORT = ();
@@ -238,6 +238,19 @@ Indicates that the referenced subroutine
is a method. A subroutine so marked
will not trigger the "Ambiguous call resolved as CORE::%s" warning.
+=item prototype(..)
+
+The "prototype" attribute is an alternate means of specifying a prototype
+on a sub. The desired prototype is within the parens.
+
+The prototype from the attribute is assigned to the sub immediately after
+the prototype from the sub, which means that if both are declared at the
+same time, the traditionally defined prototype is ignored. In other words,
+C<sub foo($$) : prototype(@) {}> is indistinguishable from C<sub foo(@){}>.
+
+If illegalproto warnings are enabled, the prototype declared inside this
+attribute will be sanity checked at compile time.
+
=item locked
The "locked" attribute is deprecated, and has no effect in 5.10.0 and later.