http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7804
--- Comment #32 from Jared Camins-Esakov <[email protected]> --- (In reply to comment #30) > (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? That's the way I'd go with it, yeah. I believe to add a directory to the Perl include path we just have to push the directory to @INC: push @INC, $pluginpath; > 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? Yeah, we can just store everything in $self, and have run_report/run_tool pass all the CGI variables through. > 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; That's exactly what I had in mind. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
