The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MARC::Moose - Moose based MARC records set of tools

VERSION

version 1.0.49

DESCRIPTION

SYNOPSYS

use MARC::Moose::Record;
use MARC::Moose::Reader::File::Iso2709;

my $reader = MARC::Moose::Reader::File::Iso2709->new(
    file   => 'biblio.iso', );
while ( my $record = $reader->read() ) {
    # Remove some fields
    $record->fields([
        grep { not $_->tag ~~ [qw(001 009 039 917 930 955)] } @{$record->fields}
    ]);
    # Clean some subfields
    for my $field ( @{$record->fields} ) {
       next unless $field->tag ~~ [qw(410 461 600 606 607 608)];
       $field->subf([
         grep { not $_->[0] =~ /0|2|3|9/ } @{$field->subf}
       ]);
    }
    print $formater->format( $record );
}

WARNINGS

MARC records are expected to be UTF-8 encoded. It won't work if it isn't. Parsed records MUST be UTF-8. If you don't have UTF-8 records, write a specific reader or use a generic tool like yaz-marcdump before loading records.

SEE ALSO

AUTHOR

Frédéric Demians <f.demians@tamil.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Frédéric Demians.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.