[ic] app server, parsing @argv in Server.pm

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Thu Sep 12 21:35:01 2002


Re ic/mv as app server:

I want to do this:
vlink -a asdf -b asdf -c asdf -d asdf -e etc...  # $ENV has CGI vars

And I'm looking at this code at start of lib/Vend/Server.pm:

> sub new {
>     my ($class, $fh, $env, $entity) = @_;
>         if(@Global::argv > 1) {
>                 (
>                         $CGI::script_name,
>                         $CGI::values{mv_session_id},
>                         $CGI::query_string
>                 ) = @Global::argv;
>                 map_cgi();
>                 $Global::FastMode = 1;
>                 return bless { fh => $fh }, $class;
>         }
>     populate($env);
>

Thinking that maybe I might modify an appserver version of
vlink to unshift in 'appserver' as argv[0] so something like
this would work:

         if($Global::argv[0] eq 'appserver') {
	       # shift and parse @arg first
	 }
	 if(@Global::argv > 1) {
	     as before

Then I could call as SSI or even command line for caching: 
appserver -a asdf -b asdf -c asdf -d asdf -e etc...

Looks too easy.  Has anyone any experience going down this
path before?  There are a lot of other ways vlink could tell
server how it is being called.

cfm

-- 

Christopher F. Miller, Publisher                               cfm@maine.com
MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
1.207.657.5078                                         http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux