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 Schout <ms...@gkg.net> on 2002/03/29 18:34:26 UTC
Attribute::Handlers - cant use under mod_perl?
I made an attempt to use Attribute::Handlers under mod perl today, and it
appears that this cant be done. What I was hoping to do was use
Attribute::Deprecated, and Attribute::Profiled in my perl handlers. That way
I could say something like:
package MyHandler;
sub whatever : Profiled { ... }
...
And I would get profile information written directly to the log file. Since
all of my handlers inherit from a common base class, I was thinking to
eventually create my own handler code that could be turned on or off by chaning
a configuration value eventually.
However, when running under mod_perl, the attribute handlers never get set up.
I think this is due to the fact that Attribute::Handlers uses CHECK and INIT
blocks to setup the handlers, and CHECK blocks dont get executed under
mod_perl.
Has anyone else tried to use Attribute::Handlers under mod_perl? Any success
stories?
Mike
Re: Attribute::Handlers - cant use under mod_perl?
Posted by Jim Smith <jg...@moya.tamu.edu>.
On Fri, Mar 29, 2002 at 11:34:26AM -0600, Michael Schout wrote:
> Has anyone else tried to use Attribute::Handlers under mod_perl? Any success
> stories?
Take a look at Apache::Handlers :)
I've been able to get both forms working (attribute and block).
Attribute::Handlers does require perl 5.6.0 at least, iirc.
--
James Smith <JG...@TAMU.Edu>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix