print $$string . $/;
my ($h, $p, $pi, $t, $ti) =
+<<<<<<< collectd-4.3:contrib/cussh.pl
$$string =~ m/^(\w+)\/(\w+)(?:-(\w+))?\/(\w+)(?:-(\w+))?\s+/;
+=======
+ $$string =~ m#^([^/]+)/([^/-]+)(?:-([^/]+))?/([^/-]+)(?:-([^/]+))?\s*#;
+>>>>>>> local:contrib/cussh.pl
$$string = $';
return if ((! $h) || (! $p) || (! $t));
($id{'host'}, $id{'plugin'}, $id{'type'}) = ($h, $p, $t);
- $id{'plugin_instance'} = $pi if ($pi);
- $id{'type_instance'} = $ti if ($ti);
+ $id{'plugin_instance'} = $pi if defined ($pi);
+ $id{'type_instance'} = $ti if defined ($ti);
return \%id;
}