Don't invoke the linestr callback if we found a keyword and the bufptr still contains...
[p5sagit/Devel-Declare.git] / Declare.xs
index 95dd495..500e9d7 100644 (file)
@@ -381,6 +381,10 @@ STATIC OP *dd_ck_const(pTHX_ OP *o, void *user_data) {
       break;
   }
 
+  if (strnEQ (PL_bufptr, "->", 2)) {
+    return o;
+  }
+
   dd_linestr_callback(aTHX_ "const", name);
 
   return o;