[Koha-bugs] [Bug 7804] Add Koha Plugin System

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 23 14:10:25 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7804

--- Comment #30 from Kyle M Hall <kyle.m.hall at gmail.com> ---
(In reply to comment #27)

So, from your description, it seems that plugins will be entirely OOP. For
M:L:C to work, we will need to add the plugins directory to the perl include
path, correct? What would be the safest way of doing that?

Let take the Patrons List report, it's "step 1" class name would be
Koha::Plugins::Org::CCFLS::PatronsList::Step1 and would be stored at
$pluginsdir/Koha/Plugins/Org/CCFLS/PatronsList/Step1.pm, with templates and
additional file in sub-directories along side Step1.pm

Also, how can we pass cgi variables between the steps? I imagine since
everything will pass through run_report.pl, it can capture the variables, pass
them to Koha::Plugins which can then pass them to the plugin via the new()
method. Does that make sense?

Example Skeleton Code:

package Koha::Plugins::Org::CCFLS::PatronsList::Step1;

use Modern::Perl;

sub new {
    my $class = shift;
    my $self = {};
    bless $self, $class;
    return $self;
}

sub main {
  # Get data
  # Do something useful
  # Output template
}

1;

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


More information about the Koha-bugs mailing list