diff options
| author | fukachan <fukachan> | 2002-03-19 08:02:05 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-03-19 08:02:05 +0000 |
| commit | e47c93d8b1bd5357cf27082b87f22593a186bfc7 (patch) | |
| tree | 1399f8450f2b15c6ae3e0aa201f8a93fb1072e9e /fml/lib/FML/Process | |
| parent | e13dce8ae26942c7ea06e9286b6cd5fb63d88af7 (diff) | |
| download | fml8-e47c93d8b1bd5357cf27082b87f22593a186bfc7.tar.gz fml8-e47c93d8b1bd5357cf27082b87f22593a186bfc7.tar.bz2 fml8-e47c93d8b1bd5357cf27082b87f22593a186bfc7.zip | |
o prepend cgi_ or run_cgi to function name.
o implement trampoline mechanism using FML::Command: class.
o change: pop_menu -> scrolling_list
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm index 1ac6e6e1..2034af54 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.16 2002/03/18 13:52:20 fukachan Exp $ +# $FML: Kernel.pm,v 1.17 2002/03/18 15:21:33 fukachan Exp $ # package FML::Process::CGI::Kernel; @@ -341,8 +341,6 @@ sub cgi_execute_command if ($@ =~ /^(.*)\s+at\s+/) { my $reason = $@; print "<BR>\n"; - print $1; - print "<BR>\n"; print $reason; print "<BR>\n"; } @@ -351,7 +349,35 @@ sub cgi_execute_command } -=head2 try_get_address() +=head2 run_cgi_menu($args, $comname, $command_args) + +execute cgi_menu() given as FML::Command::* + +=cut + + +# Descriptions: execute FML::Command +# Arguments: OBJ($curproc) HASH_REF($args) HASH_REF($command_args) +# Side Effects: load module +# Return Value: none +sub run_cgi_menu +{ + my ($curproc, $args, $comname, $command_args) = @_; + my $cmd = "FML::Command::Admin::$comname"; + my $obj = undef; + + eval qq{ + use $cmd; + \$obj = new $cmd; + }; + + if (defined $obj) { + $obj->cgi_menu($curproc, $args, $command_args); + } +} + + +=head2 cgi_try_get_address() return input address after validating the input @@ -362,7 +388,7 @@ return input address after validating the input # Arguments: OBJ($curproc) HASH_REF($args) # Side Effects: longjmp() if critical error occurs. # Return Value: STR -sub try_get_address +sub cgi_try_get_address { my ($curproc, $args) = @_; my $address = ''; @@ -376,7 +402,10 @@ sub try_get_address # XXX longjmp() if insecure input is given. my $r = $@; if ($r =~ /ERROR\.INSECURE/) { croak($r);} + } + # retry ! + unless ($a) { eval q{ $a = $curproc->safe_param_address_selected();}; unless ($@) { $address = $a; |
