develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more

Thread Previous
Elizabeth Mattijsen
November 30, 2003 07:21
Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more
Message ID:
At 15:50 +0100 11/30/03, Tels wrote:
>  >Because CLONE/DESTROY are called on objects, the mere presence of them
>  >does not affect the compilation.
>Why is CLONE special, but FOO not? That doesn't follow from Liz' example:

Actually, the CLONE _isn't_ special.  Which is the source of the confusion.

BEGIN, CHECK, INIT and END are special as they don't need "sub"

All other capitalized subroutine names _do_ need the "sub", as they 
are basically ordinary, explicitely callable subroutines that just 
happen to be called by Perl depending on a number of triggers.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About