[Koha-bugs] [Bug 34828] Add Koha::MetadataExtractor class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 20 05:54:17 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828

--- Comment #4 from David Cook <dcook at prosentient.com.au> ---
#!/usr/bin/perl

use strict;
use warnings;

my $biblio = Local::Biblio->new({type => 'Test'});
warn $biblio;
warn $biblio->extractor;
warn $biblio->extractor->awesome;

package Local::Biblio;

sub new {
    my ($class,$args) = @_;
    $args = {} unless $args;
    my $self = bless($args,$class);
    return $self;
}

sub extractor {
    my ($self) = @_;
    my $type = $self->{type};
    return "Local::Extractor::$type";
}

package Local::Extractor::Test;
sub awesome {
    my ($class,$args) = @_;
    return "$class == awesome";
}

1;

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


More information about the Koha-bugs mailing list