diff options
author | Vincent Pit <perl@profvince.com> | 2010-01-03 16:33:35 +0100 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2010-01-03 16:33:35 +0100 |
commit | fd909433c74372968d34d9cad8f4458ab60e19b4 (patch) | |
tree | a4c80056370fda124a32dd66e8b887e9fcfa3b32 /toke.c | |
parent | 2484dfd45804d90a4c06fd52415df7023397d17d (diff) | |
download | perl-fd909433c74372968d34d9cad8f4458ab60e19b4.tar.gz |
Allow "{sub f}" to compile
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7432,7 +7432,7 @@ Perl_yylex(pTHX) else if (*s != '{' && key == KEY_sub) { if (!have_name) Perl_croak(aTHX_ "Illegal declaration of anonymous subroutine"); - else if (*s != ';') + else if (*s != ';' && *s != '}') Perl_croak(aTHX_ "Illegal declaration of subroutine %"SVf, SVfARG(PL_subname)); } |