[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Are STOP and INIT good names? (was Re: [PATCH pod/perlmod.pod 5.005_63] Special Blocks For Less Than Gurus)



On Wed, 26 Jan 2000 18:44:52 GMT, Nick Ing-Simmons wrote:
>Larry Wall <larry@wall.org> writes:
>>And why I prefer CHECK over CHECKPOINT, though of course the latter can
>>be verbed if you try hard enough.
>
>FWIW - CHECK is fine with me. 

The motion is hereby carried.  Thank you for your patience.


Sarathy
gsar@ActiveState.com
-----------------------------------8<-----------------------------------
Change 4905 by gsar@auger on 2000/01/26 19:10:26

	s/STOP/CHECK/ blocks

Affected files ...

... //depot/perl/embedvar.h#86 edit
... //depot/perl/ext/B/B/Stash.pm#5 edit
... //depot/perl/ext/B/NOTES#3 edit
... //depot/perl/ext/B/O.pm#5 edit
... //depot/perl/intrpvar.h#58 edit
... //depot/perl/keywords.h#17 edit
... //depot/perl/keywords.pl#12 edit
... //depot/perl/lib/constant.pm#9 edit
... //depot/perl/op.c#247 edit
... //depot/perl/perl.c#207 edit
... //depot/perl/perlapi.h#9 edit
... //depot/perl/perly.c#38 edit
... //depot/perl/perly.y#30 edit
... //depot/perl/pod/perldelta.pod#136 edit
... //depot/perl/pod/perldiag.pod#119 edit
... //depot/perl/pod/perlfunc.pod#131 edit
... //depot/perl/pod/perlmod.pod#16 edit
... //depot/perl/pod/perlrun.pod#29 edit
... //depot/perl/pod/perlsub.pod#26 edit
... //depot/perl/pod/perltodo.pod#9 edit
... //depot/perl/sv.c#187 edit
... //depot/perl/t/op/misc.t#37 edit
... //depot/perl/toke.c#184 edit
... //depot/perl/vms/perly_c.vms#32 edit

Differences ...

==== //depot/perl/embedvar.h#86 (text+w) ====
Index: perl/embedvar.h
--- perl/embedvar.h.~1~	Wed Jan 26 11:10:31 2000
+++ perl/embedvar.h	Wed Jan 26 11:10:31 2000
@@ -199,6 +199,7 @@
 #define PL_bitcount		(PERL_GET_INTERP->Ibitcount)
 #define PL_bufend		(PERL_GET_INTERP->Ibufend)
 #define PL_bufptr		(PERL_GET_INTERP->Ibufptr)
+#define PL_checkav		(PERL_GET_INTERP->Icheckav)
 #define PL_collation_ix		(PERL_GET_INTERP->Icollation_ix)
 #define PL_collation_name	(PERL_GET_INTERP->Icollation_name)
 #define PL_collation_standard	(PERL_GET_INTERP->Icollation_standard)
@@ -367,7 +368,6 @@
 #define PL_statusvalue_vms	(PERL_GET_INTERP->Istatusvalue_vms)
 #define PL_stderrgv		(PERL_GET_INTERP->Istderrgv)
 #define PL_stdingv		(PERL_GET_INTERP->Istdingv)
-#define PL_stopav		(PERL_GET_INTERP->Istopav)
 #define PL_strtab		(PERL_GET_INTERP->Istrtab)
 #define PL_strtab_mutex		(PERL_GET_INTERP->Istrtab_mutex)
 #define PL_sub_generation	(PERL_GET_INTERP->Isub_generation)
@@ -463,6 +463,7 @@
 #define PL_bitcount		(vTHX->Ibitcount)
 #define PL_bufend		(vTHX->Ibufend)
 #define PL_bufptr		(vTHX->Ibufptr)
+#define PL_checkav		(vTHX->Icheckav)
 #define PL_collation_ix		(vTHX->Icollation_ix)
 #define PL_collation_name	(vTHX->Icollation_name)
 #define PL_collation_standard	(vTHX->Icollation_standard)
@@ -631,7 +632,6 @@
 #define PL_statusvalue_vms	(vTHX->Istatusvalue_vms)
 #define PL_stderrgv		(vTHX->Istderrgv)
 #define PL_stdingv		(vTHX->Istdingv)
-#define PL_stopav		(vTHX->Istopav)
 #define PL_strtab		(vTHX->Istrtab)
 #define PL_strtab_mutex		(vTHX->Istrtab_mutex)
 #define PL_sub_generation	(vTHX->Isub_generation)
@@ -864,6 +864,7 @@
 #define PL_bitcount		(aTHXo->interp.Ibitcount)
 #define PL_bufend		(aTHXo->interp.Ibufend)
 #define PL_bufptr		(aTHXo->interp.Ibufptr)
+#define PL_checkav		(aTHXo->interp.Icheckav)
 #define PL_collation_ix		(aTHXo->interp.Icollation_ix)
 #define PL_collation_name	(aTHXo->interp.Icollation_name)
 #define PL_collation_standard	(aTHXo->interp.Icollation_standard)
@@ -1032,7 +1033,6 @@
 #define PL_statusvalue_vms	(aTHXo->interp.Istatusvalue_vms)
 #define PL_stderrgv		(aTHXo->interp.Istderrgv)
 #define PL_stdingv		(aTHXo->interp.Istdingv)
-#define PL_stopav		(aTHXo->interp.Istopav)
 #define PL_strtab		(aTHXo->interp.Istrtab)
 #define PL_strtab_mutex		(aTHXo->interp.Istrtab_mutex)
 #define PL_sub_generation	(aTHXo->interp.Isub_generation)
@@ -1129,6 +1129,7 @@
 #define PL_Ibitcount		PL_bitcount
 #define PL_Ibufend		PL_bufend
 #define PL_Ibufptr		PL_bufptr
+#define PL_Icheckav		PL_checkav
 #define PL_Icollation_ix	PL_collation_ix
 #define PL_Icollation_name	PL_collation_name
 #define PL_Icollation_standard	PL_collation_standard
@@ -1297,7 +1298,6 @@
 #define PL_Istatusvalue_vms	PL_statusvalue_vms
 #define PL_Istderrgv		PL_stderrgv
 #define PL_Istdingv		PL_stdingv
-#define PL_Istopav		PL_stopav
 #define PL_Istrtab		PL_strtab
 #define PL_Istrtab_mutex	PL_strtab_mutex
 #define PL_Isub_generation	PL_sub_generation

==== //depot/perl/ext/B/B/Stash.pm#5 (text) ====
Index: perl/ext/B/B/Stash.pm
--- perl/ext/B/B/Stash.pm.~1~	Wed Jan 26 11:10:31 2000
+++ perl/ext/B/B/Stash.pm	Wed Jan 26 11:10:31 2000
@@ -4,7 +4,7 @@
 
 BEGIN { %Seen = %INC }
 
-STOP {
+CHECK {
 	my @arr=scan($main::{"main::"});
 	@arr=map{s/\:\:$//;$_;}  @arr;
 	print "-umain,-u", join (",-u",@arr) ,"\n";

==== //depot/perl/ext/B/NOTES#3 (text) ====
Index: perl/ext/B/NOTES
--- perl/ext/B/NOTES.~1~	Wed Jan 26 11:10:31 2000
+++ perl/ext/B/NOTES	Wed Jan 26 11:10:31 2000
@@ -161,8 +161,8 @@
 	it should return a sub ref (usually a closure) to perform the
 	actual compilation. When O regains control, it ensures that the
 	"-c" option is forced (so that the program being compiled doesn't
-	end up running) and registers a STOP block to call back the sub ref
+	end up running) and registers a CHECK block to call back the sub ref
 	returned from the backend's compile(). Perl then continues by
 	parsing prog.pl (just as it would with "perl -c prog.pl") and after
-	doing so, assuming there are no parse-time errors, the STOP block
+	doing so, assuming there are no parse-time errors, the CHECK block
 	of O gets called and the actual backend compilation happens. Phew.

==== //depot/perl/ext/B/O.pm#5 (text) ====
Index: perl/ext/B/O.pm
--- perl/ext/B/O.pm.~1~	Wed Jan 26 11:10:31 2000
+++ perl/ext/B/O.pm	Wed Jan 26 11:10:31 2000
@@ -11,7 +11,7 @@
     my $compilesub = &{"B::${backend}::compile"}(@options);
     if (ref($compilesub) eq "CODE") {
 	minus_c;
-	eval 'STOP { &$compilesub() }';
+	eval 'CHECK { &$compilesub() }';
     } else {
 	die $compilesub;
     }
@@ -59,7 +59,7 @@
 package, passing it OPTIONS. That function is expected to return
 a sub reference which we'll call CALLBACK. Next, the "compile-only"
 flag is switched on (equivalent to the command-line option C<-c>)
-and a STOP block is registered which calls CALLBACK. Thus the main
+and a CHECK block is registered which calls CALLBACK. Thus the main
 Perl program mentioned on the command-line is read in, parsed and
 compiled into internal syntax tree form. Since the C<-c> flag is
 set, the program does not start running (excepting BEGIN blocks of

==== //depot/perl/intrpvar.h#58 (text) ====
Index: perl/intrpvar.h
--- perl/intrpvar.h.~1~	Wed Jan 26 11:10:31 2000
+++ perl/intrpvar.h	Wed Jan 26 11:10:31 2000
@@ -93,7 +93,7 @@
 PERLVAR(Icurstname,	SV *)		/* name of current package */
 PERLVAR(Ibeginav,	AV *)		/* names of BEGIN subroutines */
 PERLVAR(Iendav,		AV *)		/* names of END subroutines */
-PERLVAR(Istopav,	AV *)		/* names of STOP subroutines */
+PERLVAR(Icheckav,	AV *)		/* names of CHECK subroutines */
 PERLVAR(Iinitav,	AV *)		/* names of INIT subroutines */
 PERLVAR(Istrtab,	HV *)		/* shared string table */
 PERLVARI(Isub_generation,U32,1)		/* incr to invalidate method cache */

==== //depot/perl/keywords.h#17 (text+w) ====
Index: perl/keywords.h
--- perl/keywords.h.~1~	Wed Jan 26 11:10:31 2000
+++ perl/keywords.h	Wed Jan 26 11:10:31 2000
@@ -16,7 +16,7 @@
 #define KEY_LE			15
 #define KEY_LT			16
 #define KEY_NE			17
-#define KEY_STOP		18
+#define KEY_CHECK		18
 #define KEY_abs			19
 #define KEY_accept		20
 #define KEY_alarm		21

==== //depot/perl/keywords.pl#12 (xtext) ====
Index: perl/keywords.pl
--- perl/keywords.pl.~1~	Wed Jan 26 11:10:31 2000
+++ perl/keywords.pl	Wed Jan 26 11:10:31 2000
@@ -42,7 +42,7 @@
 LE
 LT
 NE
-STOP
+CHECK
 abs
 accept
 alarm

==== //depot/perl/lib/constant.pm#9 (text) ====
Index: perl/lib/constant.pm
--- perl/lib/constant.pm.~1~	Wed Jan 26 11:10:31 2000
+++ perl/lib/constant.pm	Wed Jan 26 11:10:31 2000
@@ -9,7 +9,7 @@
 #=======================================================================
 
 # Some names are evil choices.
-my %keywords = map +($_, 1), qw{ BEGIN INIT STOP END DESTROY AUTOLOAD };
+my %keywords = map +($_, 1), qw{ BEGIN INIT CHECK END DESTROY AUTOLOAD };
 
 my %forced_into_main = map +($_, 1),
     qw{ STDIN STDOUT STDERR ARGV ARGVOUT ENV INC SIG };

==== //depot/perl/op.c#247 (text) ====
Index: perl/op.c
--- perl/op.c.~1~	Wed Jan 26 11:10:31 2000
+++ perl/op.c	Wed Jan 26 11:10:31 2000
@@ -4547,7 +4547,7 @@
 	else
 	    s = name;
 
-	if (*s != 'B' && *s != 'E' && *s != 'S' && *s != 'I')
+	if (*s != 'B' && *s != 'E' && *s != 'C' && *s != 'I')
 	    goto done;
 
 	if (strEQ(s, "BEGIN")) {
@@ -4577,12 +4577,12 @@
 	    av_store(PL_endav, 0, SvREFCNT_inc(cv));
 	    GvCV(gv) = 0;
 	}
-	else if (strEQ(s, "STOP") && !PL_error_count) {
-	    if (!PL_stopav)
-		PL_stopav = newAV();
+	else if (strEQ(s, "CHECK") && !PL_error_count) {
+	    if (!PL_checkav)
+		PL_checkav = newAV();
 	    DEBUG_x( dump_sub(gv) );
-	    av_unshift(PL_stopav, 1);
-	    av_store(PL_stopav, 0, SvREFCNT_inc(cv));
+	    av_unshift(PL_checkav, 1);
+	    av_store(PL_checkav, 0, SvREFCNT_inc(cv));
 	    GvCV(gv) = 0;
 	}
 	else if (strEQ(s, "INIT") && !PL_error_count) {
@@ -4693,7 +4693,7 @@
 	else
 	    s = name;
 
-	if (*s != 'B' && *s != 'E' && *s != 'S' && *s != 'I')
+	if (*s != 'B' && *s != 'E' && *s != 'C' && *s != 'I')
 	    goto done;
 
 	if (strEQ(s, "BEGIN")) {
@@ -4709,11 +4709,11 @@
 	    av_store(PL_endav, 0, SvREFCNT_inc(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, SvREFCNT_inc(cv));
+	else if (strEQ(s, "CHECK")) {
+	    if (!PL_checkav)
+		PL_checkav = newAV();
+	    av_unshift(PL_checkav, 1);
+	    av_store(PL_checkav, 0, SvREFCNT_inc(cv));
 	    GvCV(gv) = 0;
 	}
 	else if (strEQ(s, "INIT")) {

==== //depot/perl/perl.c#207 (text) ====
Index: perl/perl.c
--- perl/perl.c.~1~	Wed Jan 26 11:10:31 2000
+++ perl/perl.c	Wed Jan 26 11:10:31 2000
@@ -453,11 +453,11 @@
     /* startup and shutdown function lists */
     SvREFCNT_dec(PL_beginav);
     SvREFCNT_dec(PL_endav);
-    SvREFCNT_dec(PL_stopav);
+    SvREFCNT_dec(PL_checkav);
     SvREFCNT_dec(PL_initav);
     PL_beginav = Nullav;
     PL_endav = Nullav;
-    PL_stopav = Nullav;
+    PL_checkav = Nullav;
     PL_initav = Nullav;
 
     /* shortcuts just get cleared */
@@ -742,8 +742,8 @@
 		env, xsinit);
     switch (ret) {
     case 0:
-	if (PL_stopav)
-	    call_list(oldscope, PL_stopav);
+	if (PL_checkav)
+	    call_list(oldscope, PL_checkav);
 	return 0;
     case 1:
 	STATUS_ALL_FAILURE;
@@ -754,8 +754,8 @@
 	    LEAVE;
 	FREETMPS;
 	PL_curstash = PL_defstash;
-	if (PL_stopav)
-	    call_list(oldscope, PL_stopav);
+	if (PL_checkav)
+	    call_list(oldscope, PL_checkav);
 	return STATUS_NATIVE_EXPORT;
     case 3:
 	PerlIO_printf(Perl_error_log, "panic: top_env\n");
@@ -3180,7 +3180,7 @@
 		else
 		    Perl_sv_catpvf(aTHX_ atsv,
 				   "%s failed--call queue aborted",
-				   paramList == PL_stopav ? "STOP"
+				   paramList == PL_checkav ? "CHECK"
 				   : paramList == PL_initav ? "INIT"
 				   : "END");
 		while (PL_scopestack_ix > oldscope)
@@ -3204,7 +3204,7 @@
 		    Perl_croak(aTHX_ "BEGIN failed--compilation aborted");
 		else
 		    Perl_croak(aTHX_ "%s failed--call queue aborted",
-			       paramList == PL_stopav ? "STOP"
+			       paramList == PL_checkav ? "CHECK"
 			       : paramList == PL_initav ? "INIT"
 			       : "END");
 	    }

==== //depot/perl/perlapi.h#9 (text+w) ====
Index: perl/perlapi.h
--- perl/perlapi.h.~1~	Wed Jan 26 11:10:31 2000
+++ perl/perlapi.h	Wed Jan 26 11:10:31 2000
@@ -136,6 +136,8 @@
 #define PL_bufend		(*Perl_Ibufend_ptr(aTHXo))
 #undef  PL_bufptr
 #define PL_bufptr		(*Perl_Ibufptr_ptr(aTHXo))
+#undef  PL_checkav
+#define PL_checkav		(*Perl_Icheckav_ptr(aTHXo))
 #undef  PL_collation_ix
 #define PL_collation_ix		(*Perl_Icollation_ix_ptr(aTHXo))
 #undef  PL_collation_name
@@ -472,8 +474,6 @@
 #define PL_stderrgv		(*Perl_Istderrgv_ptr(aTHXo))
 #undef  PL_stdingv
 #define PL_stdingv		(*Perl_Istdingv_ptr(aTHXo))
-#undef  PL_stopav
-#define PL_stopav		(*Perl_Istopav_ptr(aTHXo))
 #undef  PL_strtab
 #define PL_strtab		(*Perl_Istrtab_ptr(aTHXo))
 #undef  PL_strtab_mutex

==== //depot/perl/perly.c#38 (text) ====
Index: perl/perly.c
--- perl/perly.c.~1~	Wed Jan 26 11:10:31 2000
+++ perl/perly.c	Wed Jan 26 11:10:31 2000
@@ -1826,7 +1826,7 @@
 #line 338 "perly.y"
 { STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv,n_a);
 			  if (strEQ(name, "BEGIN") || strEQ(name, "END")
-			      || strEQ(name, "STOP") || strEQ(name, "INIT"))
+			      || strEQ(name, "INIT") || strEQ(name, "CHECK"))
 			      CvSPECIAL_on(PL_compcv);
 			  yyval.opval = yyvsp[0].opval; }
 break;

==== //depot/perl/perly.y#30 (text) ====
Index: perl/perly.y
--- perl/perly.y.~1~	Wed Jan 26 11:10:31 2000
+++ perl/perly.y	Wed Jan 26 11:10:31 2000
@@ -337,7 +337,7 @@
 
 subname	:	WORD	{ STRLEN n_a; char *name = SvPV(((SVOP*)$1)->op_sv,n_a);
 			  if (strEQ(name, "BEGIN") || strEQ(name, "END")
-			      || strEQ(name, "STOP") || strEQ(name, "INIT"))
+			      || strEQ(name, "INIT") || strEQ(name, "CHECK"))
 			      CvSPECIAL_on(PL_compcv);
 			  $$ = $1; }
 	;

==== //depot/perl/pod/perldelta.pod#136 (text) ====
Index: perl/pod/perldelta.pod
--- perl/pod/perldelta.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perldelta.pod	Wed Jan 26 11:10:31 2000
@@ -24,10 +24,10 @@
 
 =over 4
 
-=item STOP is a new keyword
+=item CHECK is a new keyword
 
 In addition to C<BEGIN>, C<INIT>, C<END>, C<DESTROY> and C<AUTOLOAD>,
-subroutines named C<STOP> are now special.  These are queued up during
+subroutines named C<CHECK> are now special.  These are queued up during
 compilation and behave similar to END blocks, except they are called at
 the end of compilation rather than at the end of execution.  They cannot
 be called directly.
@@ -925,7 +925,7 @@
 behavior, END blocks are not executed anymore when the C<-c> switch
 is used.
 
-See L<STOP blocks> for how to run things when the compile phase ends.
+See L<CHECK blocks> for how to run things when the compile phase ends.
 
 =head2 Potential to leak DATA filehandles
 

==== //depot/perl/pod/perldiag.pod#119 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perldiag.pod	Wed Jan 26 11:10:31 2000
@@ -1342,7 +1342,7 @@
 
 =item %s failed--call queue aborted
 
-(F) An untrapped exception was raised while executing a STOP, INIT, or
+(F) An untrapped exception was raised while executing a CHECK, INIT, or
 END subroutine.  Processing of the remainder of the queue of such
 routines has been prematurely ended.
 

==== //depot/perl/pod/perlfunc.pod#131 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perlfunc.pod	Wed Jan 26 11:10:31 2000
@@ -3902,7 +3902,7 @@
 array, returns the undefined value.  If ARRAY is omitted, shifts the
 C<@_> array within the lexical scope of subroutines and formats, and the
 C<@ARGV> array at file scopes or within the lexical scopes established by
-the C<eval ''>, C<BEGIN {}>, C<INIT {}>, C<STOP {}>, and C<END {}>
+the C<eval ''>, C<BEGIN {}>, C<INIT {}>, C<CHECK {}>, and C<END {}>
 constructs.
 
 See also C<unshift>, C<push>, and C<pop>.  C<Shift()> and C<unshift> do the

==== //depot/perl/pod/perlmod.pod#16 (text) ====
Index: perl/pod/perlmod.pod
--- perl/pod/perlmod.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perlmod.pod	Wed Jan 26 11:10:31 2000
@@ -213,7 +213,7 @@
 =head2 Package Constructors and Destructors
 
 Four special subroutines act as package constructors and destructors.
-These are the C<BEGIN>, C<STOP>, C<INIT>, and C<END> routines.  The
+These are the C<BEGIN>, C<CHECK>, C<INIT>, and C<END> routines.  The
 C<sub> is optional for these routines.
 
 A C<BEGIN> subroutine is executed as soon as possible, that is, the moment
@@ -245,9 +245,9 @@
 For example, the code generators documented in L<perlcc> make use of
 C<INIT> blocks to initialize and resolve pointers to XSUBs.
 
-Similar to C<END> blocks, C<STOP> blocks are run just after the
+Similar to C<END> blocks, C<CHECK> blocks are run just after the
 Perl compile phase ends and before the run time begins, in
-LIFO order.  C<STOP> blocks are again useful in the Perl compiler
+LIFO order.  C<CHECK> blocks are again useful in the Perl compiler
 suite to save the compiled state of the program.
 
 When you use the B<-n> and B<-p> switches to Perl, C<BEGIN> and

==== //depot/perl/pod/perlrun.pod#29 (text) ====
Index: perl/pod/perlrun.pod
--- perl/pod/perlrun.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perlrun.pod	Wed Jan 26 11:10:31 2000
@@ -268,7 +268,7 @@
 =item B<-c>
 
 causes Perl to check the syntax of the program and then exit without
-executing it.  Actually, it I<will> execute C<BEGIN>, C<STOP>, and
+executing it.  Actually, it I<will> execute C<BEGIN>, C<CHECK>, and
 C<use> blocks, because these are considered as occurring outside the
 execution of your program.  C<INIT> and C<END> blocks, however, will
 be skipped.

==== //depot/perl/pod/perlsub.pod#26 (text) ====
Index: perl/pod/perlsub.pod
--- perl/pod/perlsub.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perlsub.pod	Wed Jan 26 11:10:31 2000
@@ -207,7 +207,7 @@
 function in all capitals is a loosely-held convention meaning it
 will be called indirectly by the run-time system itself, usually
 due to a triggered event.  Functions that do special, pre-defined
-things include C<BEGIN>, C<STOP>, C<INIT>, C<END>, C<AUTOLOAD>, and
+things include C<BEGIN>, C<CHECK>, C<INIT>, C<END>, C<AUTOLOAD>, and
 C<DESTROY>--plus all functions mentioned in L<perltie>.
 
 =head2 Private Variables via my()
@@ -454,7 +454,7 @@
     }
 
 See L<perlmod/"Package Constructors and Destructors"> about the
-special triggered functions, C<BEGIN>, C<STOP>, C<INIT> and C<END>.
+special triggered functions, C<BEGIN>, C<CHECK>, C<INIT> and C<END>.
 
 If declared at the outermost scope (the file scope), then lexicals
 work somewhat like C's file statics.  They are available to all

==== //depot/perl/pod/perltodo.pod#9 (text) ====
Index: perl/pod/perltodo.pod
--- perl/pod/perltodo.pod.~1~	Wed Jan 26 11:10:31 2000
+++ perl/pod/perltodo.pod	Wed Jan 26 11:10:31 2000
@@ -824,7 +824,7 @@
 
 =head2 END blocks
 
-END blocks need saving in compiled output, now that STOP blocks
+END blocks need saving in compiled output, now that CHECK blocks
 are available.
 
 =head2 _AUTOLOAD

==== //depot/perl/sv.c#187 (text) ====
Index: perl/sv.c
--- perl/sv.c.~1~	Wed Jan 26 11:10:31 2000
+++ perl/sv.c	Wed Jan 26 11:10:31 2000
@@ -6832,7 +6832,7 @@
 
     PL_beginav		= av_dup_inc(proto_perl->Ibeginav);
     PL_endav		= av_dup_inc(proto_perl->Iendav);
-    PL_stopav		= av_dup_inc(proto_perl->Istopav);
+    PL_checkav		= av_dup_inc(proto_perl->Icheckav);
     PL_initav		= av_dup_inc(proto_perl->Iinitav);
 
     PL_sub_generation	= proto_perl->Isub_generation;

==== //depot/perl/t/op/misc.t#37 (xtext) ====
Index: perl/t/op/misc.t
--- perl/t/op/misc.t.~1~	Wed Jan 26 11:10:31 2000
+++ perl/t/op/misc.t	Wed Jan 26 11:10:31 2000
@@ -357,11 +357,11 @@
 BEGIN { print "argv <@ARGV>\nbegin <",shift,">\n" }
 END { print "end <",shift,">\nargv <@ARGV>\n" }
 INIT { print "init <",shift,">\n" }
-STOP { print "stop <",shift,">\n" }
+CHECK { print "check <",shift,">\n" }
 EXPECT
 argv <a b c d e>
 begin <a>
-stop <b>
+check <b>
 init <c>
 end <d>
 argv <e>

==== //depot/perl/toke.c#184 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~	Wed Jan 26 11:10:31 2000
+++ perl/toke.c	Wed Jan 26 11:10:31 2000
@@ -3858,9 +3858,9 @@
 	case KEY_AUTOLOAD:
 	case KEY_DESTROY:
 	case KEY_BEGIN:
+	case KEY_CHECK:
+	case KEY_INIT:
 	case KEY_END:
-	case KEY_STOP:
-	case KEY_INIT:
 	    if (PL_expect == XSTATE) {
 		s = PL_bufptr;
 		goto really_sub;
@@ -4921,6 +4921,7 @@
 	break;
     case 'C':
 	if (strEQ(d,"CORE"))			return -KEY_CORE;
+	if (strEQ(d,"CHECK"))			return KEY_CHECK;
 	break;
     case 'c':
 	switch (len) {
@@ -5304,9 +5305,6 @@
 	    break;
 	}
 	break;
-    case 'S':
-	if (strEQ(d,"STOP"))			return KEY_STOP;
-	break;
     case 's':
 	switch (d[1]) {
 	case 0:					return KEY_s;

==== //depot/perl/vms/perly_c.vms#32 (text) ====
Index: perl/vms/perly_c.vms
--- perl/vms/perly_c.vms.~1~	Wed Jan 26 11:10:31 2000
+++ perl/vms/perly_c.vms	Wed Jan 26 11:10:31 2000
@@ -1828,7 +1828,7 @@
 #line 338 "perly.y"
 { STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv,n_a);
 			  if (strEQ(name, "BEGIN") || strEQ(name, "END")
-			      || strEQ(name, "STOP") || strEQ(name, "INIT"))
+			      || strEQ(name, "INIT") || strEQ(name, "CHECK"))
 			      CvSPECIAL_on(PL_compcv);
 			  yyval.opval = yyvsp[0].opval; }
 break;
End of Patch.


References to:
Nick Ing-Simmons <nik@tiuk.ti.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]