From: Rafael Garcia-Suarez Date: Wed, 18 Oct 2006 17:40:57 +0000 (+0000) Subject: Functions with a (_) prototype should behave as unary operators X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c28b960db3547273cd8c89c0eaafc8e99cf70c1;p=p5sagit%2Fp5-mst-13.2.git Functions with a (_) prototype should behave as unary operators (which is not the case of functions with a (;$) prototype) p4raw-id: //depot/perl@29041 --- diff --git a/toke.c b/toke.c index 0629099..4158e32 100644 --- a/toke.c +++ b/toke.c @@ -5403,7 +5403,7 @@ Perl_yylex(pTHX) const char *proto = SvPV_const((SV*)cv, protolen); if (!protolen) TERM(FUNC0SUB); - if (*proto == '$' && proto[1] == '\0') + if ((*proto == '$' || *proto == '_') && proto[1] == '\0') OPERATOR(UNIOPSUB); while (*proto == ';') proto++;