[collectd] perl plugin: Added a plugin to embed a Perl interpreter into collectd.

Florian Forster octo<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>verplant.org
Tue Apr 10 10:12:20 CEST 2007


Hi Sebastian :)

On Mon, Apr 09, 2007 at 06:26:48PM +0200, Sebastian Harl wrote:
> This is the long awaited plugin that makes it possible to write
> plugins in plain Perl.

\o/

> This plugin still needs a lot of testing. Also comments on the API,
> code, etc.  are very welcome.

Okay, here it comes ;) (Some of this I've already talked to you and only
include it here for others to comment on):
- Lines like the following are pretty long. I'd drop the `Collectd::'-
  prefix.
  `Collectd::plugin_register (Collectd::TYPE_DATASET, 'test_type', ...)'
- `LoadPlugin "foo"' will try to load ``Collectd::plugin::foo''. While I
  think this naming scheme is good (though I'd use `Plugin' with a
  capital `P') I wouldn't force it on the user. If
  ``MyCompany::Collectd::GreatPlugin'' fit's the local scheme better, it
  should be possible to use that, too.
- A config-option to set or prepend to the search paths (`@INC') would
  be most usefull.
- `die' and `warn' should do something usefull, e. g. disable the plugin
  and call `plugin_log', respectively.
- The function `plugin_log' should be exported to Perl.

> TODO:
>   write documentation

I'll write something up. It'd be good if you could look over that and
possibly correct it, though.

>   add checks for perl to configure

I'll take care of that.

All that being said: Thank you very much for the plugin :) It took me 15
minutes to get a working Perl-plugin - without any documentation other
than your commit message :)

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070410/1a692332/attachment.pgp


More information about the collectd mailing list