PluginManager(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… PluginManager(3pm) β€” Lire::PluginManager

okay so bestie, welcome to Lire::PluginManager, the module in LogReport's Lire that manages the Lire plugins. it's literally the group chat admin of the plugin world 🫢


✨ NAME ✨

Lire::PluginManager β€” Manages the Lire plugins. that's it, that's the vibe πŸ’–


🌸 SYNOPSIS 🌸

use Lire::PluginManager;

Lire::PluginManager->register_default_plugins();

my $plugin = new MyDlfConverter();
Lire::PluginManager->register_plugin( $plufin );

my $plugins = Lire::PluginManager->plugins( 'dlf_analyser' );

my $converter = Lire::PluginManager->get_plugin('dlf_analyser', 'combined');

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: all method can be called as class method on the Lire::PlugingManager module or on an instance. either way works, no drama ✨

πŸŽ€ PLUGIN TYPES πŸŽ€

there are four kind of plugins defined in Lire, and yes we stan all four πŸ‘‘:

  • dlf_analyser
  • dlf_converter
  • chart_type
  • output_format

πŸ’œ instance()

Returns the singleton instance of the PluginManager. one manager, one vibe, main character energy periodt πŸ’…

πŸ’œ plugin_names( $type )

Returns an array reference containing the names of all registered plugin of type $type. just the names bestie, the whole roster πŸŽ€

πŸ’œ plugins( $type )

Returns an array reference containing all the Plugin objects registerd for $type. yup, the actual objects this time, not just the names πŸ”₯

πŸ’œ has_plugin( $type, $name )

Returns true if there is a Lire::Plugin named $name registered for type $type. vibe check: does this plugin exist or not πŸ’€

πŸ’œ get_plugin( $type, $name )

Returns the Lire::Plugin object named $name of type $type. Croaks when there is no plugin registerd under that name. so like… if it's not there, it will yell at you 😭

πŸ’œ register_plugin( $plugin )

Registers the Lire::Plugin $plugin. 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 β€” no duplicate entries, we do not allow that here πŸ™ˆ

πŸ’œ unregister_plugin( $type, $name )

Unregister the plugin $name of type $type. The method will dies if there is no such plugin. so unregister responsibly or catch the drama 🫢

πŸ’œ analysers_by_src( $schema )

Returns in an array reference all the analysers that declare $schema as their src_schema(). source-side besties only ✨

πŸ’œ analysers_by_dst( $schema )

Returns in an array reference all the analysers that declare $schema as their dst_schema(). same energy, destination side 🌈

πŸ’œ 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 'plugins_init_path' configuration variable.

These scripts should call Lire::PluginManager->register_plugin() to register the plugins.

For compatibility with previous versions of Lire, it will also registers the DlfConverters initialized using older mechanism. legacy support, we love to see it πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ“ AUTHOR πŸ“

Francis J. Lacoste <flacoste@logreport.org> β€” icon, legend, wrote the thing πŸ’…


⭐ VERSION ⭐

$Id: PluginManager.pm,v 1.8 2006/07/23 13:16:29 vanbaal Exp $


Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org

This file is part of Lire.

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.

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.

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.


ok that's the whole page bestie, no cap, nothing skipped, every last flag and caveat present and accounted for πŸ’–

and that's a wrap from Lire 2.1.1, dated 2025-09-28 β€” PluginManager(3pm) signing off, mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from