From: Florian Ragwitz Date: Sun, 10 May 2009 00:01:49 +0000 (+0000) Subject: Don't invoke linestr callback if the parser is expecting an operator. This makes... X-Git-Tag: 0.005002~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e21e91fe39cd22441574c727fbb1c80ad6605a66;p=p5sagit%2FDevel-Declare.git Don't invoke linestr callback if the parser is expecting an operator. This makes calling a method with the name of a declarator work. --- diff --git a/Declare.xs b/Declare.xs index c0c7d7b..edfbc0d 100644 --- a/Declare.xs +++ b/Declare.xs @@ -330,6 +330,10 @@ STATIC OP *dd_ck_const(pTHX_ OP *o, void *user_data) { PERL_UNUSED_VAR(user_data); + if (DD_HAVE_PARSER && PL_expect == XOPERATOR) { + return o; + } + /* if this is set, we just grabbed a delimited string or something, not a bareword, so NO TOUCHY */