/[webpac2]/trunk/lib/WebPAC/Input/XML.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/WebPAC/Input/XML.pm

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

revision 968 by dpavlin, Fri Nov 2 13:59:10 2007 UTC revision 984 by dpavlin, Sun Nov 4 11:17:21 2007 UTC
# Line 72  sub new { Line 72  sub new {
72    
73          $log->info("found ", $#files + 1, " XML files in ", $arg->{path});          $log->info("found ", $#files + 1, " XML files in ", $arg->{path});
74    
75          $self->{_files} = \@files;          $self->{_files} = [ sort @files ];
76    
77          $self ? return $self : return undef;          $self ? return $self : return undef;
78  }  }
# Line 92  sub fetch_rec { Line 92  sub fetch_rec {
92    
93          my $path = $self->{_files}->[ $mfn - 1 ] || return;          my $path = $self->{_files}->[ $mfn - 1 ] || return;
94    
95          warn "### fetch_rec( $mfn ) = $path";          my $log = $self->_get_logger();
96    
97            my $xml = XMLin(
98                    $path,
99    #               ForceArray => 1,
100    #               ForceContent => 1,
101    #               KeepRoot => 1,
102    #               SuppressEmpty => 1, # '' undef
103    
104            ) || $log->logdie("can't open $path: $!");
105    
106            $log->debug("fetch_rec( $mfn ) => $path => xml is ",sub { dump($xml) });
107    
108            # add mfn
109            $xml->{'000'} = [ $mfn ];
110    
111            return $xml;
112  }  }
113    
114    

Legend:
Removed from v.968  
changed lines
  Added in v.984

  ViewVC Help
Powered by ViewVC 1.1.26