You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by titetluc titetluc <ti...@gmail.com> on 2008/02/15 13:07:03 UTC

[MP2][QUESTION]Apache::Handler usage with mod_perl

Hello all,

I would like to use attributes (Attribute::Handlers) in a mod_perl module.

I defined my attribute:

use Attribute::Handlers;
sub Catch_error  ATTR(CODE, BEGIN) { ... }

My module uses this attribute:

sub foo :Catch_error{
}

But this does not work.
I searched in the mod_perl mailing list and found interesting threads
("OO handlers" and "Attribute::Handlers - cant use under mod_perl?").

Attribute::Handlers would be incompatible with mod_perl (CHECK phase
is not handled by mod_perl). But according to Geoffrey Young and James
Smith, it should work (Apache::Handler module uses the
Attribute::Handlers module).
I had a look at the Apache::Handler but I can not see any declaration
differences with my module.

Could someone give some tips to make my attribute usable in mod_perl.

Thanks

Gaetan