mod_perl basically loads all modules as a string eval. And you can't have INIT code blocks in eval. See also the CGI to mod_perl Porting. mod_perl Coding guidelines.use warnings; eval "INIT { 1 }"; __END__ Too late to run INIT block at (eval 1) line 1.
I faced a similar dilemma with Thread::Bless: in the end I made sure initializations would only actually initialize once (even if called multiple times), renamed the INIT code block to sub unitialize and added an INIT block that just does a goto &initialize.
Liz
In reply to Re: Re: Re: RFC : Pragma vs. Module
by liz
in thread RFC : Pragma vs. Module
by stvn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |