summaryrefslogtreecommitdiff
path: root/warnings.h
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2014-02-01 01:27:13 +0000
committerZefram <zefram@fysh.org>2014-02-01 01:27:15 +0000
commit30d9c59b5f3cba8b5d632d20c2370e82d8ba69ca (patch)
tree989db43c82b395cec053b341532db7a145827254 /warnings.h
parentef463b6d87c1ce4e4946bdf785d47e481c1f33f2 (diff)
downloadperl-30d9c59b5f3cba8b5d632d20c2370e82d8ba69ca.tar.gz
subroutine signatures
Declarative syntax to unwrap argument list into lexical variables. "sub foo ($a,$b) {...}" checks number of arguments and puts the arguments into lexical variables. Signatures are not equivalent to the existing idiom of "sub foo { my($a,$b) = @_; ... }". Signatures are only available by enabling a non-default feature, and generate warnings about being experimental. The syntactic clash with prototypes is managed by disabling the short prototype syntax when signatures are enabled.
Diffstat (limited to 'warnings.h')
-rw-r--r--warnings.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/warnings.h b/warnings.h
index c1e0b9337b..66e4153d6b 100644
--- a/warnings.h
+++ b/warnings.h
@@ -99,7 +99,8 @@
#define WARN_EXPERIMENTAL__AUTODEREF 56
#define WARN_EXPERIMENTAL__POSTDEREF 57
-#define WARN_SYSCALLS 58
+#define WARN_EXPERIMENTAL__SIGNATURES 58
+#define WARN_SYSCALLS 59
#define WARNsize 15
#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"