From: Sebastian Harl Date: Sun, 20 Apr 2008 21:21:50 +0000 (+0200) Subject: Collectd.pm: Fixed the check for complete function names in plugin_register. X-Git-Tag: collectd-4.4.0~4^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a32caa9956625a5f27cc9a864caf050ade0b4ca9;p=collectd.git Collectd.pm: Fixed the check for complete function names in plugin_register. plugin_register() checks if the registered function includes the plugin's package name. Up to now, this check would also have succeeded if the function name itself would be prepended by the package name. Now, the check looks for the separator "::". Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/bindings/perl/Collectd.pm b/bindings/perl/Collectd.pm index 43775706..4ba9751b 100644 --- a/bindings/perl/Collectd.pm +++ b/bindings/perl/Collectd.pm @@ -246,7 +246,7 @@ sub plugin_register { my %p : shared; - if ($data !~ m/^$pkg/) { + if ($data !~ m/^$pkg\:\:/) { $data = $pkg . "::" . $data; }