NAME

MARC::Moose::Reader::File::Isis - A file reader for ISIS (DOS) encoded records

VERSION

version 0.020

DESCRIPTION

Read next available MARC::Moose::Record from reader file using MARC::Moose::Parser::Isis parser.

ATTRIBUTES

parser

By default, use MARC::Moose::Parser::Isis to read MARC::Moose::Record records from a file.

has '+parser' => ( default => sub { MARC::Moose::Parser::Isis->new() } );

override 'read' => sub { my $self = shift;

$self->SUPER::read();

my $fh = $self->fh;
my $raw;
while ( <$fh> ) {
    s/\x0a|\x0d//g;
    $raw .= $_;
    last if /\x1d/; # End of record separator
}
return 0 unless $raw;

return $self->parser->parse( $raw );
};

__PACKAGE__->meta->make_immutable;

1;

SEE ALSO

AUTHOR

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

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 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.