[collectd] Bareword "LOG_ERR" not allowed while "strict subs"

collectd at faxm0dem.org collectd at faxm0dem.org
Fri Jul 13 09:35:57 CEST 2012


Hi,

On Wed, Jul 11, 2012 at 05:38:06PM -0700, Casey Vega wrote:
> http://mailman.verplant.org/pipermail/collectd/2008-April/001766.html

FWIW, I wrote a module that lets you test collectd-perl plugins outside of
collectd's perl interpreter. Although it's still alpha stage, I can point
you to the source. Here's a preliminary synopsis:

SYNOPSIS
         use Test::Collectd::Plugins typesdb => ["/usr/share/collectd/types.db"];

         load_ok ("Collectd::Plugins::Some::Plugin");
         read_ok ("Collectd::Plugins::Some::Plugin", "plugin_name_as_returned_by_dispatch");
         my $config = Test::Collectd::Config -> parse(qw(
           Interval  60,
           SomeOption "true"
         ));
         read_config_ok ("My::Plugin", "my_plugin", $config);
         my $expected = [[{
           { plugin => "my_plugin", type => "gauge", values => [ 42 ] }
         }]];
         my $got = read_values_config ("My::Plugin", "my_plugin", $config);
         is_deeply ($got, $expected);

         done_testing;




More information about the collectd mailing list