Group
Extension

Matches 1

MARC-Schema ( J/JO/JOROL/MARC-Schema-0.16.tar.gz, JOROL, 2024; MetaCPAN )
MARC-Schema/lib/MARC/Schema.pm ( view source; MetaCPAN )
package MARC::Schema;

use strict;
use warnings;

our $VERSION = '0.16';

use Cpanel::JSON::XS;
use File::Share ':all';
use File::Slurper 'read_binary';
use Scalar::Util qw(reftype);

sub new {
    my
ift;
    my $json;
    if ($self->{file}) {
        $json = read_binary($self->{file});
    }
    else {
        $self->{file} = dist_file('MARC-Schema', 'marc-schema.json');
        $json = read_bina
ry($self->{file});
    }
    my $schema = decode_json($json);

    return $schema->{fields};
}

sub check {
    my ($self, $record, %options) = @_;

    $record = $record->{record} if reftype $record 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.