|
|
|
1 |
package MARC::Fast; |
package MARC::Fast; |
2 |
|
|
3 |
use strict; |
use strict; |
4 |
use Carp; |
use Carp; |
5 |
use Data::Dumper; |
use Data::Dumper; |
7 |
BEGIN { |
BEGIN { |
8 |
use Exporter (); |
use Exporter (); |
9 |
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
10 |
$VERSION = 0.04; |
$VERSION = 0.05; |
11 |
@ISA = qw (Exporter); |
@ISA = qw (Exporter); |
12 |
#Give a hoot don't pollute, do not export more than needed by default |
#Give a hoot don't pollute, do not export more than needed by default |
13 |
@EXPORT = qw (); |
@EXPORT = qw (); |
313 |
return $rec; |
return $rec; |
314 |
} |
} |
315 |
|
|
316 |
|
=head2 to_ascii |
317 |
|
|
318 |
1; |
print $marc->to_ascii( 42 ); |
319 |
__END__ |
|
320 |
|
=cut |
321 |
|
|
322 |
=head1 BUGS |
sub to_ascii { |
323 |
|
my $self = shift; |
324 |
|
|
325 |
|
my $mfn = shift || confess "need mfn"; |
326 |
|
my $row = $self->fetch($mfn) || return; |
327 |
|
|
328 |
|
my $out; |
329 |
|
|
330 |
=head1 SUPPORT |
foreach my $f (sort keys %{$row}) { |
331 |
|
my $dump = join('', @{ $row->{$f} }); |
332 |
|
$dump =~ s/\x1e$//; |
333 |
|
$dump =~ s/\x1f/\$/g; |
334 |
|
$out .= "$f\t$dump\n"; |
335 |
|
} |
336 |
|
|
337 |
|
return $out; |
338 |
|
} |
339 |
|
|
340 |
|
1; |
341 |
|
__END__ |
342 |
|
|
343 |
=head1 AUTHOR |
=head1 AUTHOR |
344 |
|
|
358 |
|
|
359 |
=head1 SEE ALSO |
=head1 SEE ALSO |
360 |
|
|
361 |
perl(1). |
L<Biblio::Isis>, perl(1). |
362 |
|
|
363 |
=cut |
=cut |