| Line 186... |
Line 186... |
| 186 |
die "Error, I don't know the command [$command]\n";
|
186 |
die "Error, I don't know the command [$command]\n";
|
| 187 |
}
|
187 |
}
|
| 188 |
|
188 |
|
| 189 |
if ( defined &{\&{$execute}} ) { # check if module::sub exists (ie, $command::action)
|
189 |
if ( defined &{\&{$execute}} ) { # check if module::sub exists (ie, $command::action)
|
| 190 |
my $message = &{\&{$execute}}(@ARGV); # yes, it exists, so call it with any remaining arguments
|
190 |
my $message = &{\&{$execute}}(@ARGV); # yes, it exists, so call it with any remaining arguments
|
| 191 |
print $message unless !$message || $main::config->{'flags'}->{'quiet'} && !$main::config->{'flags'}->{'dryrun'};
|
191 |
if ( ! $main::config->{'flags'}->{'quiet'} ) {
|
| - |
|
192 |
print $message if $message;
|
| - |
|
193 |
}
|
| 192 |
} else { # method $action does not exist in module $command, so just a brief error message
|
194 |
} else { # method $action does not exist in module $command, so just a brief error message
|
| 193 |
die "Error, could not find action [$action] for module [$command]\n";
|
195 |
die "Error, could not find action [$action] for module [$command]\n";
|
| 194 |
}
|
196 |
}
|
| 195 |
|
197 |
|
| 196 |
1;
|
198 |
1;
|