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

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

Thread Previous
From:
Elizabeth Mattijsen
Date:
November 30, 2003 07:21
Subject:
Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more
Message ID:
p05111b05bbefbaf339ce@[192.168.56.3]
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.


Liz

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About