From 15beb127ab37895e7edf5dda7f39f255cd226ec3 Mon Sep 17 00:00:00 2001 From: fukachan Date: Tue, 20 Mar 2001 15:46:14 +0000 Subject: modify $args passed from libexec/loader by analyzing CGI->param(). XXX we should remove this in the future. XXX the code should be in libexec/loader ? --- fml/lib/FML/Process/CGI.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fml/lib/FML/Process/CGI.pm b/fml/lib/FML/Process/CGI.pm index c4866a4c..b4a7ac45 100644 --- a/fml/lib/FML/Process/CGI.pm +++ b/fml/lib/FML/Process/CGI.pm @@ -49,7 +49,19 @@ use CGI qw/:standard/; sub new { my ($self, $args) = @_; - my $type = ref($self) || $self; + my $type = ref($self) || $self; + + # we should get $ml_name from HTTP. + my $ml_home_prefix = $args->{ ml_home_prefix }; + my $ml_name = param('ml_name'); + my $ml_home_dir = $ml_home_prefix .'/'. $ml_name; + + # fix $args { cf_list, ml_home_dir }; + my $cf = $args->{ cf_list }; + push(@$cf, $ml_home_dir.'/config.cf'); + $args->{ ml_home_dir } = $ml_home_dir; + + # o.k. load configurations my $curproc = new FML::Process::Kernel $args; return bless $curproc, $type; } @@ -68,7 +80,7 @@ sub prepare my ($curproc) = @_; my $config = $curproc->{ config }; my $charset = $config->{ cgi_charset } || 'euc-jp'; - + print header(-type => "text/html; charset=$charset"); } -- cgit v1.2.1