Joshua Chamas wrote:
> 
> You should find some way to share your subroutines ideally.
> One easy was to do this is to put them all in the global.asa
> file, and pass parameters to them to change their behavior
> on a per script basis.  Another thing to try is to decomp
> your application logic into a global object with methods.
> You can set the global object in global.asa like:
> 

Hey Jens, 

I am glad to hear that moving the subs to global.asa is working out.
If there are just too many subs like this after a while & your
global.asa gets too messy, consider using the GlobalPackage config
so that you can have a separate perl module for these subs like this:

== httpd.conf
  PerlSetVar GlobalPackage My::Site

== perllib/My/Site.pm
sub first {}
sub second {}

Since all ASP scripts will now be compiled into the My::Site package,
everything defined in that package, just like the global.asa
can be globally shared across all your ASP scripts.  Note you still
need to keep ASP event handlers like Script_OnStart in global.asa
even if you have a separate package like this, but using this 
approach helps keep ASP centric event handlers separate from
your other misc subroutines.

--Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

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

Reply via email to