summaryrefslogtreecommitdiff
path: root/perly.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-05 23:22:21 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:44:57 -0700
commit5027875589574a2ca6c9fb86193d4c8f720ef004 (patch)
tree3e9dd7504ca98c4a28c71ba1baf65747cc4d2e0d /perly.h
parentf37b842aabb9fad0fb5fe0a4803f30c6ead59c74 (diff)
downloadperl-5027875589574a2ca6c9fb86193d4c8f720ef004.tar.gz
Store state subs in the pad
In making ‘sub foo’ respect previous ‘our sub’ declarations in a recent commit, I actually made ‘state sub foo’ into a syntax error. (At the time, I patched up MYSUB in perly.y to keep the tests for ‘"my sub" not yet implemented’ still working.) Basically, it was creat- ing an empty pad entry, but returning something that perly.y was not expecting. This commit adjusts the grammar to allow the SUB branch of barestmt to accept a PRIVATEREF for its subname, in addition to a WORD. It reuses the subname rule that SUB used to use (before our subs were added), gutting it to remove the special block handling, which SUB now tokes care of. That means the MYSUB rule will no longer turn on CvSPECIAL on the PL_compcv that is going to be thrown away anyway. The code for special blocks (BEGIN, END, etc.) that turns on CvSPECIAL now checks for state subs and skips those. It only applies to our subs and package subs. newMYSUB has now actually been written. It basically duplicates newATTRSUB, except for GV-specific things. It does currently vivify a GV and set CvGV, but I am hoping to change that later. I also hope to merge some of the code later, too. I changed the prototype of newMYSUB to make it easier to use. It is not used anywhere on CPAN and has always simply died, so that should be all right.
Diffstat (limited to 'perly.h')
-rw-r--r--perly.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/perly.h b/perly.h
index c531e48e6f..63133c79a9 100644
--- a/perly.h
+++ b/perly.h
@@ -268,6 +268,6 @@ typedef union YYSTYPE
/* Generated from:
- * d37e00fcfb1737df464a95af8f4a92c2518ee5b69cd05ffc577f253313aa81c3 perly.y
+ * a216aadb9729f2e06283be0b4e7f08adc1209abb0bb9b50c453be450c6104a81 perly.y
* 4a3ced51fe6585f6ec59e65e1ffd74bc976c498b0e6992eaab337219fee72e51 regen_perly.pl
* ex: set ro: */