/[Biblio-Isis]/trunk/lib/Biblio/Isis.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/lib/Biblio/Isis.pm

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

revision 40 by dpavlin, Thu Jan 27 22:01:17 2005 UTC revision 41 by dpavlin, Sat Mar 12 21:05:29 2005 UTC
# Line 9  use Data::Dumper; Line 9  use Data::Dumper;
9  BEGIN {  BEGIN {
10          use Exporter ();          use Exporter ();
11          use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);          use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
12          $VERSION     = 0.12;          $VERSION     = 0.13;
13          @ISA         = qw (Exporter);          @ISA         = qw (Exporter);
14          #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
15          @EXPORT      = qw ();          @EXPORT      = qw ();
# Line 264  sub fetch { Line 264  sub fetch {
264    
265          # read XRFMFB abd XRFMFP          # read XRFMFB abd XRFMFP
266          read($self->{'fileXRF'}, $buff, 4);          read($self->{'fileXRF'}, $buff, 4);
267          my $pointer=unpack("V",$buff) || croak "pointer is null";          my $pointer=unpack("V",$buff);
268            if (! $pointer) {
269                    if ($self->{include_deleted}) {
270                            return;
271                    } else {
272                            warn "pointer for MFN $mfn is null\n";
273                            return;
274                    }
275            }
276    
277          # check for logically deleted record          # check for logically deleted record
278          if ($pointer & 0x80000000) {          if ($pointer & 0x80000000) {
# Line 393  sub to_ascii { Line 401  sub to_ascii {
401    
402          my $mfn = shift || croak "need MFN";          my $mfn = shift || croak "need MFN";
403    
404          my $rec = $self->fetch($mfn);          my $rec = $self->fetch($mfn) || return;
405    
406          my $out = "0\t$mfn";          my $out = "0\t$mfn";
407    
# Line 461  sub to_hash { Line 469  sub to_hash {
469          # init record to include MFN as field 000          # init record to include MFN as field 000
470          my $rec = { '000' => [ $mfn ] };          my $rec = { '000' => [ $mfn ] };
471    
472          my $row = $self->fetch($mfn);          my $row = $self->fetch($mfn) || return;
473    
474          foreach my $k (keys %{$row}) {          foreach my $k (keys %{$row}) {
475                  foreach my $l (@{$row->{$k}}) {                  foreach my $l (@{$row->{$k}}) {

Legend:
Removed from v.40  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.26