diff options
| author | fukachan <fukachan> | 2001-11-13 03:42:47 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-13 03:42:47 +0000 |
| commit | 53dfd91ce54742476b419dfd022946fa97ed34ed (patch) | |
| tree | 7dd867be4c19aca256b167dde885c7e549d2cf4b /fml/lib/FML/Process/CGI | |
| parent | f25c0bf54360609870e38816adc9621b4f57ca7c (diff) | |
| download | fml8-53dfd91ce54742476b419dfd022946fa97ed34ed.tar.gz fml8-53dfd91ce54742476b419dfd022946fa97ed34ed.tar.bz2 fml8-53dfd91ce54742476b419dfd022946fa97ed34ed.zip | |
some cgi may need no ml_name
Diffstat (limited to 'fml/lib/FML/Process/CGI')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm index ad34b951..f5fba3fd 100644 --- a/fml/lib/FML/Process/CGI/Kernel.pm +++ b/fml/lib/FML/Process/CGI/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.5 2001/11/11 11:04:58 fukachan Exp $ +# $FML: Kernel.pm,v 1.6 2001/11/11 23:34:00 fukachan Exp $ # package FML::Process::CGI::Kernel; @@ -54,21 +54,24 @@ sub new { my ($self, $args) = @_; my $type = ref($self) || $self; + my $is_need_ml_name = $args->{ 'need_ml_name' }; # we should get $ml_name from HTTP. - my $ml_home_prefix = $args->{ ml_home_prefix }; - my $ml_name = safe_param_ml_name($self) || do { - croak("not get ml_name from HTTP") if $args->{ need_ml_name }; - }; - - use File::Spec; - my $ml_home_dir = File::Spec->catfile($ml_home_prefix, $ml_name); - my $config_cf = File::Spec->catfile($ml_home_dir, 'config.cf'); - - # fix $args { cf_list, ml_home_dir }; - my $cflist = $args->{ cf_list }; - push(@$cflist, $config_cf); - $args->{ ml_home_dir } = $ml_home_dir; + if ($is_need_ml_name) { + my $ml_home_prefix = $args->{ ml_home_prefix }; + my $ml_name = safe_param_ml_name($self) || do { + croak("not get ml_name from HTTP") if $args->{ need_ml_name }; + }; + + use File::Spec; + my $ml_home_dir = File::Spec->catfile($ml_home_prefix, $ml_name); + my $config_cf = File::Spec->catfile($ml_home_dir, 'config.cf'); + + # fix $args { cf_list, ml_home_dir }; + my $cflist = $args->{ cf_list }; + push(@$cflist, $config_cf); + $args->{ ml_home_dir } = $ml_home_dir; + } # o.k. load configurations my $curproc = new FML::Process::Kernel $args; @@ -152,6 +155,8 @@ sub AUTOLOAD return if $AUTOLOAD =~ /DESTROY/; + if (defined $ENV{'debug'}) { my (@c) = caller; warn("AUTOLOAD: @c");} + my $comname = $AUTOLOAD; $comname =~ s/.*:://; |
