From a32caa9956625a5f27cc9a864caf050ade0b4ca9 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 20 Apr 2008 23:21:50 +0200 Subject: [PATCH] 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 --- bindings/perl/Collectd.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.11.0