Catmandu-MARC

 view release on metacpan or  search on metacpan

lib/Catmandu/Importer/MARC/Line.pm  view on Meta::CPAN


with 'Catmandu::Importer';

sub generator {
    my ($self) = @_;
    sub {
        state $fh    = $self->fh;
        state $count = 0;

        # set input record separator to paragraph mode
        local $/ = '';

        # get next record
        while (defined(my $data = $fh->getline)) {
            $count++;
            my @record;
            my $id;
            chomp $data;

            # split record into fields
            my @fields = split /\n/, $data;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.591 second using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )