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

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

Thread Previous | Thread Next
Elizabeth Mattijsen
December 3, 2003 03:34
Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more
Message ID:
At 12:15 +0100 12/3/03, Rafael Garcia-Suarez wrote:
>Elizabeth Mattijsen wrote:
>  > So when _are_ CHECK/INIT blocks run then exactly?  Is the definition
>>  just as :they're only run once after compilation of the first outer
>  > eval is completed?
>CHECK and INIT blocks are run at the end of the compilation of the main
>program. The fact that they were defined from inside an eval("") doesn't
>matter. If the eval("") happened during the compilation of the main
>program, they will be run. If it happened after the main program was
>compiled, they will not.

That's what I meant to convey: what I call the "first outer eval" is 
what you call "after the main program is compiled".  I mean, I know 
you can embed Perl within a C program: in that case you're don't 
necessarily need to read a file to start up Perl, do you?


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