[collectd] perl -mCollectd --error--> Bareword "LOG_ERR" not allowed while "strict subs" in use at Collectd.pm line 164.

Trent W. Buck twb at cyber.com.au
Thu Apr 21 07:04:55 CEST 2011


I was trying to load the OpenVZ.pm perl plugin into my collectd 4.8.2
instance on Ubuntu 10.04 LTS (Lucid).  It wasn't working; after some
digging I managed to produce the following issue.  It's still present
in git HEAD.  I can't see anyone else mentioning this issue in this
list's archives, so

  1. WTF is going on; and
  2. why is it (apparently) only affecting me?

Below is the transcript showing the issue on a Debian Sid which doesn't
have collectd installed yet, but just loading the pm directly from git.

PS: removing the "use strict;" line works around the problem, but I'd
prefer not to do that.

$ git describe
collectd-5.0.0-21-g99364c7
$ git pull
Already up-to-date.
$ cd bindings/perl/lib
$ PAGER=cat git log -1 Collectd.pm
commit 2c4059f3b4da4adceb0547bd2d7e2d69c20e1169
Author: Florian Forster <octo at leeloo.lan.home.verplant.org>
Date:   Sun Aug 29 09:56:31 2010 +0200

    perl plugin: Remove the deprecated "plugin_flush_{all,one}" functions.
$ perl -I. -mCollectd
Bareword "LOG_ERR" not allowed while "strict subs" in use at Collectd.pm line 164.
Bareword "TYPE_CONFIG" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_INIT" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_READ" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_WRITE" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_SHUTDOWN" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_LOG" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_NOTIF" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "TYPE_FLUSH" not allowed while "strict subs" in use at Collectd.pm line 118.
Bareword "FC_MATCH" not allowed while "strict subs" in use at Collectd.pm line 129.
Bareword "FC_TARGET" not allowed while "strict subs" in use at Collectd.pm line 129.
Bareword "FC_MATCH" not allowed while "strict subs" in use at Collectd.pm line 134.
Bareword "FC_TARGET" not allowed while "strict subs" in use at Collectd.pm line 134.
Bareword "FC_CB_EXEC" not allowed while "strict subs" in use at Collectd.pm line 139.
Bareword "FC_CB_CREATE" not allowed while "strict subs" in use at Collectd.pm line 139.
Bareword "FC_CB_DESTROY" not allowed while "strict subs" in use at Collectd.pm line 139.
Compilation failed in require.
BEGIN failed--compilation aborted.
$ perl --version

This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
(with 52 registered patches, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.



More information about the collectd mailing list