On Tue, Aug 08, 2000 at 09:28:17AM +0100, Piers Cawley wrote:
> Peter Scott <[EMAIL PROTECTED]> writes:
> 
> > At 12:07 AM 8/8/00 +0200, Bart Lateur wrote:
> > >On Mon, 07 Aug 2000 10:56:40 -0700, Peter Scott wrote:
> > >
> > > >I meant that BEGIN, END, and INIT aren't declared as subs at present but
> > > >named blocks.  I was surprised to discover that they're put in the symbol
> > > >table anyway though.
> > >
> > >Check the docs again. [snip]
> > >     Four special subroutines act as package constructors and
> > >     destructors. These are the `BEGIN', `CHECK', `INIT', and `END'
> > >     routines. The `sub' is optional for these routines.
> > 
> > Drat.  I propose making it non-optional for P6.  ETOOMANYSPECIALCASES.  Any 
> > objections?
> 
> But what happens if you want multiple BEGIN blocks?

The same thing that happens now.  As I understand it, perl compiles
and executes the BEGIN block then detroys it so that you may have as
many BEGIN blocks as you want and each time perl thinks it's the first
one.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to