[collectd] Bug#819964: collectd: Collectd perl module emits perl warnings

Sebastian Harl tokkee at debian.org
Fri Feb 24 12:08:05 CET 2017


forwarded 819964 collectd at verplant.org
thanks

Hi,

On Mon, Apr 04, 2016 at 01:03:15PM +0200, Guillem Jover wrote:
> The Collectd.pm perl module emits perl warnings, which makes checking
> depending perl modules difficult to check for cleanliness:
[…]
>   ,---
>   $ perl -cw Test.pm
>   Bareword "LOG_ERR" not allowed while "strict subs" in use at /usr/share/perl5/Collectd.pm line 165.
>   Bareword "TYPE_CONFIG" not allowed while "strict subs" in use at /usr/share/perl5/Collectd.pm line 119.
[…]

Thanks for reporting this. Unfortunately, this is hard to fix in a
standard Perl setup. The problem is this: Collectd.pm depends on C code
provided by the collectd perl plugin. It's similar to other Perl modules
that wrap C code, except that those would load a shared object file but
the perl plugin depends on collectd's internal API provided by the core
daemon. That is, Collectd.pm would have to dynamically load the collectd
binary and the perl plugin which isn't feasible. Detangling that would
require a major refactoring of collectd.

That said, we could provide another binary, say 'collectd-perl' that
acts like a Perl interpreter. You can think of the perl plugin as a
customized Perl interpreter embedded into collectd, so that's basically
what we'd want. That shouldn't be hard to do and it would provide the
secondary benefit that you could use that to actually test functionality
as well alongside simple compilation tests (perl -c). The only drawback
is that you'd have to use collectd-perl in place of perl for your tests.

Thoughts anyone?

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x2F1FFCC7 +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20170224/0174e476/attachment.sig>


More information about the collectd mailing list