diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-04 17:28:29 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-04 17:28:29 +0000 |
commit | 4f25aa189c4a92535547c706ad37c13b7caee387 (patch) | |
tree | 08af6df6000b2bd878b1b2e5e05cd48a1db0464b /op.c | |
parent | 0e950d832564d240b1bebd0a01f04f9f5d57cc79 (diff) | |
download | perl-4f25aa189c4a92535547c706ad37c13b7caee387.tar.gz |
implement STOP blocks and fix compiler to use them (minimally
tested)
p4raw-id: //depot/perl@4515
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -4411,6 +4411,13 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) av_store(PL_endav, 0, (SV *)cv); GvCV(gv) = 0; } + else if (strEQ(s, "STOP") && !PL_error_count) { + if (!PL_stopav) + PL_stopav = newAV(); + av_unshift(PL_stopav, 1); + av_store(PL_stopav, 0, (SV *)cv); + GvCV(gv) = 0; + } else if (strEQ(s, "INIT") && !PL_error_count) { if (!PL_initav) PL_initav = newAV(); @@ -4522,6 +4529,13 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename) av_store(PL_endav, 0, (SV *)cv); GvCV(gv) = 0; } + else if (strEQ(s, "STOP")) { + if (!PL_stopav) + PL_stopav = newAV(); + av_unshift(PL_stopav, 1); + av_store(PL_stopav, 0, (SV *)cv); + GvCV(gv) = 0; + } else if (strEQ(s, "INIT")) { if (!PL_initav) PL_initav = newAV(); |