From 30d9c59b5f3cba8b5d632d20c2370e82d8ba69ca Mon Sep 17 00:00:00 2001 From: Zefram Date: Sat, 1 Feb 2014 01:27:13 +0000 Subject: 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. --- perly.c | 1 + 1 file changed, 1 insertion(+) (limited to 'perly.c') diff --git a/perly.c b/perly.c index d8eedf2652..a7115b3625 100644 --- a/perly.c +++ b/perly.c @@ -28,6 +28,7 @@ #include "EXTERN.h" #define PERL_IN_PERLY_C #include "perl.h" +#include "feature.h" typedef unsigned char yytype_uint8; typedef signed char yytype_int8; -- cgit v1.2.1