Commit 722064e0 authored by ueli heuer's avatar ueli heuer 👾
Browse files

Cleanup $param0, to be shure that the variable is empty.

parent 6009a55e
......@@ -54,15 +54,16 @@ sub update_rrd ($@) {
# }}}
# {{{ sub get_values ($$$@)
sub get_values ($$$@) {
my ( $type, $target, $community, @parameter ) = @_;
my ($type, $target, $community, @parameter ) = @_;
my ($torun,$mod_var,$module, @values, @param, $param);
if ( $type eq 'exec' ) {
$torun = join(' ',@parameter);
$torun =~ s/#BIN#/$BIN/g;
#print "$torun\n";
@values = `$torun`;
} elsif ( $type eq 'module' ) {
$param0 = undef();
($module, @param) = @parameter;
if ($module =~ /,/) {
($module,$param0) = split(/,/,$module,2);
......@@ -76,7 +77,7 @@ sub get_values ($$$@) {
$param = sprintf('"%s"',join ('","',@param));
$mod_var = "${module}_mod";
if (! ${$mod_var} ) {
require "$module.mod.pl";
my $res = require "$module.mod.pl";
}
@values = eval "$module ($param)";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment