=head1 VERSION
-Version 0.00
+Version 0.01
=cut
-our $VERSION = '0.00';
+our $VERSION = '0.01';
=head1 SYNOPSIS
=cut
+my $subfields = {
+ 'CR' => sub {
+ my @v = split(/, /, shift);
+ my $f;
+ foreach ( qw/author year reference volume page/ ) {
+ if ( my $tmp = shift @v ) {
+ $f->{$_} = $tmp;
+ }
+ }
+ if ( $f->{author} =~ /^\*(.+)/ ) {
+ delete $f->{author};
+ $f->{institution} = $1;
+ }
+ return $f;
+ },
+};
+
sub new {
my $class = shift;
my $self = {@_};
} elsif ( $line =~ /^\s{3}(.+)$/ ) {
$v = $1;
} elsif ( $line eq 'ER' ) {
+ # join tags
+ foreach ( qw/AB/ ) {
+ $rec->{$_} = join(' ', @{ $rec->{$_} }) if defined $rec->{$_};
+ }
push @{ $self->{_rec} }, $rec;
$rec = {};
$line = <$fh>;
$log->logdie("can't parse +$. $arg->{path} : $line");
}
+ $v = $subfields->{$tag}->($v) if defined $subfields->{$tag};
+
push @{ $rec->{$tag} }, $v;
}
=head1 SEE ALSO
L<http://isibasic.com/help/helpprn.html> is only sane source of document format which Google could find...
-
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>