summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-10-14 03:08:59 +0000
committerfukachan <fukachan>2001-10-14 03:08:59 +0000
commit16e369e137b2e800fc36f3d2005d959f785100ee (patch)
tree1d0c3ea9b7fed0ba1a0632c28f729bcac091d330 /fml/lib/FML/Process
parent11584ffb8b531b4e17873d74f9ced64df97fdba8 (diff)
downloadfml8-16e369e137b2e800fc36f3d2005d959f785100ee.tar.gz
fml8-16e369e137b2e800fc36f3d2005d959f785100ee.tar.bz2
fml8-16e369e137b2e800fc36f3d2005d959f785100ee.zip
sync style w/ Process::Command
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Configure.pm24
1 files changed, 21 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Configure.pm b/fml/lib/FML/Process/Configure.pm
index 5168d56a..92216d27 100644
--- a/fml/lib/FML/Process/Configure.pm
+++ b/fml/lib/FML/Process/Configure.pm
@@ -4,7 +4,7 @@
# Copyright (C) 2000,2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Configure.pm,v 1.25 2001/08/26 08:41:58 fukachan Exp $
+# $FML: Configure.pm,v 1.26 2001/10/14 00:58:41 fukachan Exp $
#
package FML::Process::Configure;
@@ -171,7 +171,8 @@ sub _makefml
# arguments to pass off to each method
my $command_args = {
command_mode => 'admin',
- command => $method,
+ comname => $method,
+ command => "$method @options",
ml_name => $ml_name,
options => \@options,
argv => $argv,
@@ -181,7 +182,24 @@ sub _makefml
# here we go
require FML::Command;
my $obj = new FML::Command;
- $obj->$method($curproc, $command_args);
+
+ if (defined $obj) {
+ # execute command ($comname method) under eval().
+ eval q{
+ $obj->$method($curproc, $command_args);
+ };
+ unless ($@) {
+ ; # not show anything
+ }
+ else {
+ LogError("command $method fail");
+ if ($@ =~ /^(.*)\s+at\s+/) {
+ my $reason = $1;
+ Log($reason); # pick up reason
+ croak($reason);
+ }
+ }
+ }
}