[Koha-bugs] [Bug 24631] Plugin metadata should be outside the main class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 29 19:11:32 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24631

--- Comment #33 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Marcel de Rooy from comment #24)
> Why not do something like this in a plugin with an our $metadata definition:
> sub new {
>     my ($class, $params) = @_;
>     return $class->SUPER::new($params, $metadata);
> }
> Or when a new style plugin has a manifest file, do:
> sub new {
>     my ($class, $params) = @_;
>     return $class->SUPER::new($params, IO::File->new(FILENAME) );
> }
> And let Plugin::Base::new handle either the hashref or the filehandle?

One of the purposes here is to allow Koha to get the metadata without
instantiating the plugin. I think your suggestions is a good one though, as it
would keep the metadata DRY. I'll file a followup bug for this!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list