[EMAIL PROTECTED] wrote:
> 
> To avoid passing many parameters to the subs I become using a $cx (cx stand for
> context) global hash containig everything the subs needed, passed to each sub.
> 
>    page test.asp
>    $cx = {};
>    $cx->{'name'} = 'default name';
>    $cx->{'age'} = 30;
>    ...

Try this, 

# in global.asa
use vars qw($cx); # set up $cx for global use
sub Script_OnStart {
        $cx = {}; # initialize per request
}

# in script
sub HelloWorld {
  $cx->{name} = 'hello';
}

This will work, but I'd recommend you move your subs to
global.asa, which is your central module for your scripts.

And then you can use $Server->Transfer() to change
the file executing midstream.

--Josh

Reply via email to