Perl-script every time you want to read a value with the C<exec plugin> (see
L<collectd-exec(5)>) and provides a lot more functionality, too.
-When loading the C<perl plugin>, the B<Globals> option should be enabled.
-Else, the perl plugin will fail to load any Perl modules implemented in C,
-which includes, amongst many others, the B<threads> module used by the plugin
-itself. See the documentation of the B<Globals> option in L<collectd.conf(5)>
-for details.
-
=head1 CONFIGURATION
=over 4
command line option or B<use lib Dir> in the source code. Please note that it
only has effect on plugins loaded after this option.
+=item B<RegisterLegacyFlush> I<true|false>
+
+The C<Perl plugin> used to register one flush callback (called B<"perl">) and
+call all Perl-based flush handlers when this callback was called. Newer versions
+of the plugin wrap the Perl flush handlers and register them directly with the
+daemon I<in addition> to the legacy B<"perl"> callback. This allows to call
+specific Perl flush handlers, but has the downside that flushing I<all> plugins
+now calls the Perl flush handlers twice (once directly and once via the legacy
+callback). Unfortunately, removing the B<"perl"> callback would break backwards
+compatibility.
+
+This option allows you to disable the legacy B<"perl"> flush callback if you care
+about the double call and don't call the B<"perl"> callback in your setup.
+
=back
=head1 WRITING YOUR OWN PLUGINS
=over 4
-=item
+=item *
Please feel free to send in new plugins to collectd's mailing list at
-E<lt>collectdE<nbsp>atE<nbsp>verplant.orgE<gt> for review and, possibly,
+E<lt>collectdE<nbsp>atE<nbsp>collectd.orgE<gt> for review and, possibly,
inclusion in the main distribution. In the latter case, we will take care of
keeping the plugin up to date and adapting it to new versions of collectd.
=over 4
-=item
+=item *
collectd is heavily multi-threaded. Each collectd thread accessing the perl
plugin will be mapped to a Perl interpreter thread (see L<threads(3perl)>).
that no data is shared between threads by default. You have to use the
B<threads::shared> module to do so.
-=item
+=item *
Each function name registered with collectd has to be available before the
first thread has been created (i.E<nbsp>e. basically at compile time). This
will not work. This is due to the fact that the symbol table is not shared
across different threads.
-=item
+=item *
Each plugin is usually only loaded once and kept in memory for performance
reasons. Therefore, END blocks are only executed once when collectd shuts
down. You should not rely on END blocks anyway - use B<shutdown functions>
instead.
-=item
+=item *
The perl plugin exports the internal API of collectd which is considered
unstable and subject to change at any time. We try hard to not break backwards
=back
-=head1 KNOWN BUGS
-
-=over 4
-
-=item
-
-Currently, it is not possible to flush a single Perl plugin only. You can
-either flush all Perl plugins or none at all and you have to use C<perl> as
-plugin name when doing so.
-
-=back
-
=head1 SEE ALSO
L<collectd(1)>,
E<lt>shE<nbsp>atE<nbsp>tokkee.orgE<gt>.
This manpage has been written by Florian Forster
-E<lt>octoE<nbsp>atE<nbsp>verplant.orgE<gt> and Sebastian Harl
+E<lt>octoE<nbsp>atE<nbsp>collectd.orgE<gt> and Sebastian Harl
E<lt>shE<nbsp>atE<nbsp>tokkee.orgE<gt>.
=cut