On Mon, 07 Aug 2000 15:19:00 -0700, Peter Scott wrote:

>>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?

If you mean that you MUST use "sub", I object. If you mean that the
"sub" may not be used, I agree.

The whole thing with reminds me of FORTH's [ ... ] syntax, which
temporarily stops compilation, and the code between the square brackets
is executed instead of compiled. It maps directly to Perl's 
BEGIN { ... }. To me, it is not a sub that gets compiled and immedialy
executed.

OTOH, for END { ... }, you could say it is.

The possibility of multiple BEGIN and END blocks do distinguish it from
ordinary callback subs, though.

-- 
        Bart.

Reply via email to