> I' m using UniquePackages  and because subs name conflict I need to put the
> subs in the asp pages.
> Can I still use initialization of global vars in the
> global.asa/Spript_OnStart (as you suggest) ?
> ...so the ASP/$Server->Transfer() is the equivalent of JSP/forward
> 

I don't know if transfer is quite the same, $Response->Redirect()
might be more similar depending whether its an internal or
external redirect.  

You could hijack part of the ASP object namespace for your
uses like:
   $Request->{CX}{name} = 'hello';

or hijack a var in the main:: package

   $main::CX->{name} = 'hello';

You could also lose your reliance on UniquePackages by 
putting your subs into the global.asa.

You might also init an object which inits into context
globally which you could reset every Script_OnStart, like

# in script
<% my $cx = CX->new; %>

# in CX.pm; this is probably similar to Class::Singleton
use vars qw($CX);
$CX = {};
sub new { bless $CX }

# in global.asa
use CX;
sub Script_OnStart {
  $CX::CX = {};
}

-- Josh

Reply via email to