John Drago wrote:
I could formalize this to also
| execute some code when the compilation occurs, and this event then
| might be called:
| | Global_OnStart


Would BEGIN {...} take care of this?


BEGIN should work, but I think Global_OnStart would be more like putting some code at the botton of the global.asa, which would be executed last after everything else is defined.

For this effect, I usually just put code before any subs in the
global.asa, like global variable declarations, caching, calculations, etc.
I think BEGIN would work too, but would be executed before the
subs are compiled.  It may be useful to call helper subs in the global.asa
like &_calculate_this() when computing a global value defined outside
the subs in global.asa, and this would be better done outside a BEGIN {}

Personally, I don't need a formal Global_OnStart or Server_OnStart,
but it seems that especially when people are coming from backgrounds where
they don't necessarily know how mod_perl works more generally, there
might be a need for this.  I have no problem helping to abstract things
away from mod_perl though, and in general I regard Apache::ASP as a
general, consistent API on top of mod_perl that can shield one from
its sometimes troublesome details.

Regards,

Josh

________________________________________________________________________
Josh Chamas, Founder    | NodeWorks - http://www.nodeworks.com
Chamas Enterprises Inc. | NodeWorks Directory - http://dir.nodeworks.com
http://www.chamas.com   | Apache::ASP - http://www.apache-asp.org



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to