Code

Collectd.pm: Fixed the check for complete function names in plugin_register.
authorSebastian Harl <sh@tokkee.org>
Sun, 20 Apr 2008 21:21:50 +0000 (23:21 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 30 Apr 2008 08:37:14 +0000 (10:37 +0200)
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 <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
bindings/perl/Collectd.pm

index 43775706c3b8ccc6af6929a0d623b7145496f692..4ba9751bd77c4b0eb0ab7f693602187a24afb9c3 100644 (file)
@@ -246,7 +246,7 @@ sub plugin_register {
 
                my %p : shared;
 
-               if ($data !~ m/^$pkg/) {
+               if ($data !~ m/^$pkg\:\:/) {
                        $data = $pkg . "::" . $data;
                }