Name : perl-Module-Pluggable-Ordered
| |
Version : 1.5
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.8.1
| Date : 2023-07-20 19:19:48
|
Group : Development/Libraries/Perl
| Source RPM : perl-Module-Pluggable-Ordered-1.5-lp155.8.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Call module plugins in a specified order
|
Description :
This module behaves exactly the same as \'Module::Pluggable\', supporting all of its options, but also mixes in the \'call_plugins\' and \'plugins_ordered\' methods to your class. \'call_plugins\' acts a little like \'Class::Trigger\'; it takes the name of a method, and some parameters. Let\'s say we call it like so:
__PACKAGE__->call_plugins(\"my_method\", AATTsomething);
\'call_plugins\' looks at the plugin modules found using \'Module::Pluggable\' for ones which provide \'my_method_order\'. It sorts the modules numerically based on the result of this method, and then calls \'$_->my_method(AATTsomething)\' on them in order. This produces an effect a little like the System V init process, where files can specify where in the init sequence they want to be called.
\'plugins_ordered\' extends the \'plugins\' method created by \'Module::Pluggable\' to list the plugins in defined order. It looks for a \'_order\' method in the modules found using \'Module::Pluggable\', and returns the modules sorted numerically in that order. For example:
my AATTplugins = __PACKAGE__->plugins();
The resulting array of plugins will be sorted. If no \'_order\' subroutine is defined for a module, an arbitrary default value of 50 is used.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-M/15.5/noarch |