diff options
| author | fukachan <fukachan> | 2001-11-10 04:03:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-10 04:03:13 +0000 |
| commit | e120a0de64536d1258cbd71fbcda3d5b99abfd6f (patch) | |
| tree | 781c581e566dc470e32deda626188e0fa7bafcb9 /fml/lib | |
| parent | 29025194f76fdb6df53ba9ffeb1bbd1e081cfa2d (diff) | |
| download | fml8-e120a0de64536d1258cbd71fbcda3d5b99abfd6f.tar.gz fml8-e120a0de64536d1258cbd71fbcda3d5b99abfd6f.tar.bz2 fml8-e120a0de64536d1258cbd71fbcda3d5b99abfd6f.zip | |
remove makefml issue.
modify run() which now executes:
$curproc->html_start($args);
$curproc->run_cgi($args);
$curproc->html_end($args);
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 68 |
1 files changed, 21 insertions, 47 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm index 369d21d5..41c74c94 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.1.1.1 2001/11/08 15:35:32 fukachan Exp $ +# $FML: Kernel.pm,v 1.2 2001/11/09 00:07:10 fukachan Exp $ # package FML::Process::CGI::Kernel; @@ -12,6 +12,14 @@ use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); use Carp; +use FML::Process::Kernel; +use FML::Log qw(Log LogWarn LogError); +@ISA = qw(FML::Process::Kernel); + +# load standard CGI routines +use CGI qw/:standard/; + + =head1 NAME FML::Process::CGI::Kernel - CGI basic functions @@ -38,15 +46,6 @@ ordinary constructor which is used widely in FML::Process classes. =cut -use FML::Process::Kernel; -use FML::Log qw(Log LogWarn LogError); -use FML::Config; - -# load standard CGI routines -use CGI qw/:standard/; - -@ISA = qw(FML::Process::Kernel); - # XXX now we re-evaluate $ml_home_dir and @cf again. # XXX but we need the mechanism to re-evaluate $args passed from @@ -116,50 +115,25 @@ sub finish { 1;} dispatch *.cgi programs. -=cut +FML::CGI::XXX module should implement these routines: +star_html(), run_cgi() and end_html(). -# See CGI.pm for more details -sub run -{ - my ($curproc, $args) = @_; - my $config = $curproc->{ config }; - my $myname = $config->{ program_name }; +run() executes - # model specific ticket object - if ($myname eq 'makefml.cgi') { - $curproc->_makefml($args); - } - else { - croak("Who am I ($myname)? I don't know $myname\n"); - } -} + $curproc->start_html($args); + $curproc->run_cgi($args); + $curproc->end_html($args); + +=cut -sub _makefml +sub run { my ($curproc, $args) = @_; - my $method = $curproc->safe_param_method; - my $ml_name = $curproc->safe_param_ml_name; - my $address = $curproc->safe_param_address || ''; - my $argv = $curproc->command_line_argv(); - my @options = (); - - # arguments to pass off to each method - my $optargs = { - command => $method, - ml_name => $ml_name, - address => $address, - options => \@options, - argv => $argv, - args => $args, - }; - - Log("makefml.cgi ml_name=$ml_name command=$method address=$address"); - # here we go - require FML::Command; - my $obj = new FML::Command; - $obj->$method($curproc, $optargs); + $curproc->html_start($args); + $curproc->run_cgi($args); + $curproc->html_end($args); } |
