.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "PluginManager 3pm" .TH PluginManager 3pm 2025-09-28 "Lire 2.1.1" "LogReport's Lire Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Lire::PluginManager \- Manages the Lire plugins. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Lire::PluginManager; \& \& Lire::PluginManager\->register_default_plugins(); \& \& my $plugin = new MyDlfConverter(); \& Lire::PluginManager\->register_plugin( $plufin ); \& \& my $plugins = Lire::PluginManager\->plugins( \*(Aqdlf_analyser\*(Aq ); \& \& my $converter = Lire::PluginManager\->get_plugin(\*(Aqdlf_analyser\*(Aq, \*(Aqcombined\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" All method can be called as class method on the Lire::PlugingManager module or on an instance. .SS "PLUGIN TYPES" .IX Subsection "PLUGIN TYPES" There are four kind of plugins defined in Lire: dlf_analyser, dlf_converter, chart_type and output_format. .SS \fBinstance()\fP .IX Subsection "instance()" Returns the singleton instance of the PluginManager .ie n .SS "plugin_names( $type )" .el .SS "plugin_names( \f(CW$type\fP )" .IX Subsection "plugin_names( $type )" Returns an array reference containing the names of all registered plugin of type \f(CW$type\fR. .ie n .SS "plugins( $type )" .el .SS "plugins( \f(CW$type\fP )" .IX Subsection "plugins( $type )" Returns an array reference containing all the Plugin objects registerd for \f(CW$type\fR. .ie n .SS "has_plugin( $type, $name )" .el .SS "has_plugin( \f(CW$type\fP, \f(CW$name\fP )" .IX Subsection "has_plugin( $type, $name )" Returns true if there is a Lire::Plugin named \f(CW$name\fR registered for type \&\f(CW$type\fR. .ie n .SS "get_plugin( $type, $name )" .el .SS "get_plugin( \f(CW$type\fP, \f(CW$name\fP )" .IX Subsection "get_plugin( $type, $name )" Returns the Lire::Plugin object named \f(CW$name\fR of type \f(CW$type\fR. Croaks when there is no plugin registerd under that name. .ie n .SS "register_plugin( $plugin )" .el .SS "register_plugin( \f(CW$plugin\fP )" .IX Subsection "register_plugin( $plugin )" Registers the Lire::Plugin \f(CW$plugin\fR. The type and name of the plugin are queried using the Lire::Plugin interface. An error will be thrown if there is already a plugin registered under the same name and type. .ie n .SS "unregister_plugin( $type, $name )" .el .SS "unregister_plugin( \f(CW$type\fP, \f(CW$name\fP )" .IX Subsection "unregister_plugin( $type, $name )" Unregister the plugin \f(CW$name\fR of type \f(CW$type\fR. The method will dies if there is no such plugin. .ie n .SS "analysers_by_src( $schema )" .el .SS "analysers_by_src( \f(CW$schema\fP )" .IX Subsection "analysers_by_src( $schema )" Returns in an array reference all the analysers that declare \f(CW$schema\fR as their \fBsrc_schema()\fR. .ie n .SS "analysers_by_dst( $schema )" .el .SS "analysers_by_dst( \f(CW$schema\fP )" .IX Subsection "analysers_by_dst( $schema )" Returns in an array reference all the analysers that declare \f(CW$schema\fR as their \fBdst_schema()\fR. .SS \fBregister_default_plugins()\fP .IX Subsection "register_default_plugins()" This method will load and initialize all the plugins available. The plugins are registered by executing all the perl scripts found in the directories listed in the \*(Aqplugins_init_path\*(Aq configuration variable. .PP These scripts should call Lire::PluginManager\->\fBregister_plugin()\fR to register the plugins. .PP For compatibility with previous versions of Lire, it will also registers the DlfConverters initialized using older mechanism. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBLire::Plugin\fR\|(3pm), \fBLire::OutputFormat\fR\|(3pm), \fBLire::DlfAnalyser\fR\|(3pm), \&\fBLire::DlfConverter\fR\|(3pm) .SH AUTHOR .IX Header "AUTHOR" .Vb 1 \& Francis J. Lacoste .Ve .SH VERSION .IX Header "VERSION" \&\f(CW$Id:\fR PluginManager.pm,v 1.8 2006/07/23 13:16:29 vanbaal Exp $ .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org .PP This file is part of Lire. .PP Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html.