You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael J Schout <ms...@gkg.net> on 2000/06/29 00:45:36 UTC

CHECK blocks under mod_perl?

Hi.

I would like to use a CHECK { } block under mod_perl, but have so far not had
any luck.  It seems like mod_perl does not know how to deal with CHECK { }
blocks.  Is this true?  If so, can it be remedied?   I cant use a BEGIN block
for what I am doing because it must happen after compilation is completed.  I
know that CHECK blocks are a 5.6.0 feature so this is why I think maybe
mod_perl doesnt know how to deal with them.

I'm using mod_perl 1.24, apache 1.3.12, perl 5.6.0

Mike


Re: CHECK blocks under mod_perl?

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 28 Jun 2000, Michael J Schout wrote:

> Hi.
> 
> I would like to use a CHECK { } block under mod_perl, but have so far not had
> any luck.  It seems like mod_perl does not know how to deal with CHECK { }
> blocks.  Is this true?  If so, can it be remedied?   I cant use a BEGIN block
> for what I am doing because it must happen after compilation is completed.  I
> know that CHECK blocks are a 5.6.0 feature so this is why I think maybe
> mod_perl doesnt know how to deal with them.

Perl only calls CHECK blocks during perl_parse(), which mod_perl calls
once at startup time.  so CHECK blocks don't work for the same reason this
doesn't:
% perl -e 'eval qq(CHECK { print "ok\n" })'

can you give an example of what you're trying todo?  it might be
reasonable to fit this into Apache::Registry, which already has to special
case END blocks.  i'd rather not add another special case, but if there's
good reason, it shouldn't be difficult to implement.