Warren Young wrote:

More accurately, the new event would be for calculating something when the web server first comes up.



Apache::ASP does not know what applications are installed when the web server first comes up. That is what the Loader() routine is for. Loader() combined with this new event could calculate something just once for when the global.asa is first compiled in the parent httpd, but only when using Loader().

The problem fundamentally is getting Apache::ASP to know what applications
to compile at httpd server start time, and this is what Loader() does.
Loader for starters compiles the global.asa in the application being
referenced, and thus trigger the Global_OnStart routine being proposed.

If I were still working on the code, this would be a fair annoyance. The difference with new event is that it would run every time the parent web server comes up, regardless of whether the "application" is considered to be restarting. Restarting the web server to make new changes appear isn't a problem at all. I have to do it often already, since much of my code is in Perl modules, which don't get reloaded when they change.

The Global_OnStart event would actually run each time the global.asa is recompiled in a child web server process, so just touching the global.asa would trigger this event. Also for reloading perl code dynamically while in development, you can try the StatINC config, and the Apache::Reload module.

Global_OnStart is good.

Thanks, this seems to be the consensus.



I was thinking Global_OnStart would be in lieu of getting Loader working. Once you get Loader working, code at the end of global.asa has this "once on Apache startup" behavior, doesn't it?

Yes. Global_OnStart would just formalize this behavior. Again, unless one can propose a better way, I think Loader() is the best we can get for compiling Apache::ASP applications in the parent httpd.


The only gray area would be if you changed global.asa. It gets recompiled in this case. Would Global_OnStart be re-run? I suppose it could work either way.



Yes.


It may be that necessarily Global_OnStart would have to occur before $Application
or $Session is set up ( effectively before Application_OnStart or Session_OnStart )
effectively. Would this event still be useful if this is the case?


Yes, that's still useful.


Thanks for the feedback so far...


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