[Bug 15743] New: Allow plugins to embed Perl modules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Bug ID: 15743 Summary: Allow plugins to embed Perl modules Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Actually if a plugin comes with several .pm files, they are all treated as separate plugins, and Koha::Plugins die if one of these modules doesn't contain a 'new' subroutine. Can't locate object method "new" via package "Koha::Plugin::XXX::YYY::..." (perhaps you forgot to load "Koha::Plugin::XXX::YYY::..."?) at /home/koha/src/Koha/Plugins.pm line 66. It may be useful to have several .pm files to organize code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 47651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47651&action=edit Bug 15743: Allow plugins to embed Perl modules This patch allows plugins to embed Perl modules by ignoring Perl modules in plugins directory that don't inherit from Koha::Plugins::Base -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Test plan: 0. Enable plugins 1. Create the smallest valid Perl module (the 'package' line and the '1;' line are enough) in your plugins directory 2. In Koha, go to /cgi-bin/koha/plugins/plugins-home.pl, you should see the error message 3. Apply patch 4. Refresh /cgi-bin/koha/plugins/plugins-home.pl, you should have no error messages, and no new plugins in the table -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47651|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 47657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47657&action=edit [SIGNED-OFF] Bug 15743: Allow plugins to embed Perl modules This patch allows plugins to embed Perl modules by ignoring Perl modules in plugins directory that don't inherit from Koha::Plugins::Base TEST PLAN --------- 1) Edit koha-conf.xml to have enable_plugins set to 1, and the pluginsdir set to a particular path. 2) Create a dummy plugin file. (e.g. {that path}/Koha/Plugin/Kaboom.pm) --- BEGIN Kaboom.pm --- package Koha::Plugin::Kaboom; use Modern::Perl; our $VERSION = '1'; 1; --- END Kaboom.pm --- 3) Sign in to staff client 4) Reports -> Report plugins -- commented line version explodes. 5) Apply patch 6) Reports -> Report plugins -- commented line version works. -- the ?method= portion in the address bar prevents you from seeing that the plugin is actually considered, because various methods are not defined. Delete that portion of the URL, and you should see a thin empty second row appear. 7) run koha qa tests Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47657|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47696&action=edit Bug 15743: Allow plugins to embed Perl modules This patch allows plugins to embed Perl modules by ignoring Perl modules in plugins directory that don't inherit from Koha::Plugins::Base TEST PLAN --------- 1) Edit koha-conf.xml to have enable_plugins set to 1, and the pluginsdir set to a particular path. 2) Create a dummy plugin file. (e.g. {that path}/Koha/Plugin/Kaboom.pm) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #5 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15743 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.9. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org