pthread_condattr_init in thread.h for OLD_PTHREADS_API.
[p5sagit/p5-mst-13.2.git] / perly.y
diff --git a/perly.y b/perly.y
index 3bf1fda..5996527 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -288,8 +288,9 @@ startformsub:       /* NULL */      /* start a format subroutine scope */
                        { $$ = start_subparse(TRUE, 0); }
        ;
 
-subname        :       WORD    { char *name = SvPVx(((SVOP*)$1)->op_sv, na);
-                         if (strEQ(name, "BEGIN") || strEQ(name, "END"))
+subname        :       WORD    { char *name = SvPV(((SVOP*)$1)->op_sv, na);
+                         if (strEQ(name, "BEGIN") || strEQ(name, "END")
+                             || strEQ(name, "INIT"))
                              CvUNIQUE_on(compcv);
                          $$ = $1; }
        ;
@@ -529,6 +530,13 @@ term       :       term ASSIGNOP term
                            prepend_elem(OP_LIST,
                                $4,
                                scalar(newCVREF(0,scalar($2))))); dep();}
+       |       term ARROW '(' ')'      %prec '('
+                       { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
+                                  newCVREF(0, scalar($1))); }
+       |       term ARROW '(' expr ')' %prec '('
+                       { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
+                                  append_elem(OP_LIST, $4,
+                                      newCVREF(0, scalar($1)))); }
        |       LOOPEX
                        { $$ = newOP($1, OPf_SPECIAL);
                            hints |= HINT_BLOCK_SCOPE; }