/**
* collectd - src/perl.c
- * Copyright (C) 2007 Sebastian Harl
+ * Copyright (C) 2007, 2008 Sebastian Harl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
log_err ("module_register: Unable to bootstrap Collectd.");
exit (1);
}
+
+ /* Set $0 to "collectd" because perl_parse() has to set it to "-e". */
+ Perl_sv_setpv (perl, Perl_get_sv (perl, "0", 0), "collectd");
+
perl_run (perl);
plugin_register_log ("perl", perl_log);
|| (OCONFIG_TYPE_STRING != ci->values[0].type))
return 1;
+ if (NULL == aTHX) {
+ log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
+ return 1;
+ }
+
value = ci->values[0].value.string;
if (NULL == perl) {