Bug 12412: Add ability for plugins to convert arbitrary files to MARC from record...
[koha.git] / t / Koha / Plugin / Test.pm
1 package Koha::Plugin::Test;
2
3 ## It's good practive to use Modern::Perl
4 use Modern::Perl;
5
6 ## Required for all plugins
7 use base qw(Koha::Plugins::Base);
8
9 our $VERSION = 1.01;
10 our $metadata = {
11     name            => 'Test Plugin',
12     author          => 'Kyle M Hall',
13     description     => 'Test plugin',
14     date_authored   => '2013-01-14',
15     date_updated    => '2013-01-14',
16     minimum_version => '3.11',
17     maximum_version => undef,
18     version         => $VERSION,
19 };
20
21 ## This is the minimum code required for a plugin's 'new' method
22 ## More can be added, but none should be removed
23 sub new {
24     my ( $class, $args ) = @_;
25     $args->{'metadata'} = $metadata;
26     my $self = $class->SUPER::new($args);
27     return $self;
28 }
29
30 sub report {
31     my ( $self, $args ) = @_;
32     return "Koha::Plugin::Test::report";
33 }
34
35 sub tool {
36     my ( $self, $args ) = @_;
37     return "Koha::Plugin::Test::tool";
38 }
39
40 sub to_marc {
41     my ( $self, $args ) = @_;
42     return "Koha::Plugin::Test::to_marc";
43 }
44
45 sub configure {
46     my ( $self, $args ) = @_;
47     return "Koha::Plugin::Test::configure";;
48 }
49
50 sub install {
51     my ( $self, $args ) = @_;
52     return "Koha::Plugin::Test::install";
53 }
54
55 sub uninstall {
56     my ( $self, $args ) = @_;
57     return "Koha::Plugin::Test::uninstall";
58 }