Summary: | Allow plugins to embed Perl modules | ||
---|---|---|---|
Product: | Koha | Reporter: | Julian Maurice <julian.maurice> |
Component: | Architecture, internals, and plumbing | Assignee: | Julian Maurice <julian.maurice> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | brendan, f.demians |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 15743: Allow plugins to embed Perl modules
[SIGNED-OFF] Bug 15743: Allow plugins to embed Perl modules Bug 15743: Allow plugins to embed Perl modules |
Description
Julian Maurice
2016-02-04 16:52:19 UTC
Created attachment 47651 [details] [review] 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: 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 Created attachment 47657 [details] [review] [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> Created attachment 47696 [details] [review] 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> Pushed to Master - Should be in the May 2016 Release. Thanks! Patch pushed to 3.22.x, will be in 3.22.4 This patch has been pushed to 3.20.x, will be in 3.20.9. |