#include "collectd.h"
#include "common.h"
-#include "plugin.h"
#include "configfile.h"
#include <XSUB.h>
+/* Some versions of Perl define their own version of DEBUG... :-/ */
+#ifdef DEBUG
+# undef DEBUG
+#endif /* DEBUG */
+
+/* ... while we want the definition found in plugin.h. */
+#include "plugin.h"
+
#define PLUGIN_INIT 0
#define PLUGIN_READ 1
#define PLUGIN_WRITE 2
/*
* Create the perl interpreter and register it with collectd.
*/
-void module_register (modreg_e load)
+void module_register (void)
{
char *embed_argv[] = { "", "-e", "bootstrap Collectd \""VERSION"\"", NULL };
int embed_argc = 3;
plugin_register_config ("perl", perl_config, config_keys, config_keys_num);
plugin_register_init ("perl", perl_init);
- if (load & MR_READ)
- plugin_register_read ("perl", perl_read);
+ plugin_register_read ("perl", perl_read);
plugin_register_write ("perl", perl_write);
plugin_register_shutdown ("perl", perl_shutdown);