summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-10-10 03:12:51 +0000
committerfukachan <fukachan>2001-10-10 03:12:51 +0000
commit1e1f2bb5c817d4e3ab09c224b3df00f5d5c58034 (patch)
treeb654d8888bb8ae59d855c9859aff114768661207
parent91af97f340a84c247152e3c4986c6d26fc8707ee (diff)
downloadfml8-1e1f2bb5c817d4e3ab09c224b3df00f5d5c58034.tar.gz
fml8-1e1f2bb5c817d4e3ab09c224b3df00f5d5c58034.tar.bz2
fml8-1e1f2bb5c817d4e3ab09c224b3df00f5d5c58034.zip
bug fix: oops, method is command name not its line
-rw-r--r--fml/lib/FML/Process/Command.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 6161076b..69d9fb3a 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -4,7 +4,7 @@
# Copyright (C) 2000,2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.10 2001/05/28 16:17:14 fukachan Exp $
+# $FML: Command.pm,v 1.11 2001/10/08 20:30:06 fukachan Exp $
#
package FML::Process::Command;
@@ -139,10 +139,11 @@ sub _evaluate_command
COMMAND:
for my $command (@body) {
+ my $comname = (split(/\s+/, $command))[0];
my $is_valid =
- $config->has_attribute( "available_commands", $command )
+ $config->has_attribute( "available_commands", $comname )
? 'yes' : 'no';
- Log("command = " . $command . " (valid?=$is_valid)");
+ Log("command = " . $comname . " (valid?=$is_valid)");
next if $is_valid eq 'no';
# arguments to pass off to each method
@@ -160,7 +161,7 @@ sub _evaluate_command
my $obj = new FML::Command;
if (defined $obj) {
eval q{
- $obj->$command($curproc, $optargs);
+ $obj->$comname($curproc, $optargs);
};
if ($@) {
LogError("fail to exec ${command}");