/[MARC-Fast]/trunk/Fast.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Fast.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Thu Jul 13 14:00:23 2006 UTC revision 11 by dpavlin, Fri Nov 3 20:34:31 2006 UTC
# Line 1  Line 1 
   
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;
# Line 7  use Data::Dumper; Line 7  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 ();
# Line 313  sub to_hash { Line 313  sub to_hash {
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    
# Line 343  LICENSE file included with this module. Line 358  LICENSE file included with this module.
358    
359  =head1 SEE ALSO  =head1 SEE ALSO
360    
361  perl(1).  L<Biblio::Isis>, perl(1).
362    
363  =cut  =cut

Legend:
Removed from v.9  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26