/[webpac2]/trunk/run.pl
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/run.pl

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

revision 255 by dpavlin, Fri Dec 16 01:04:20 2005 UTC revision 285 by dpavlin, Sun Dec 18 21:06:39 2005 UTC
# Line 9  use lib './lib'; Line 9  use lib './lib';
9    
10  use WebPAC::Common 0.02;  use WebPAC::Common 0.02;
11  use WebPAC::Lookup;  use WebPAC::Lookup;
12  use WebPAC::Input::ISIS;  use WebPAC::Input::ISIS 0.02;
13  use WebPAC::Store 0.03;  use WebPAC::Store 0.03;
14  use WebPAC::Normalize::XML;  use WebPAC::Normalize::XML;
15  use WebPAC::Output::TT;  use WebPAC::Output::TT;
# Line 76  while (my ($database, $db_config) = each Line 76  while (my ($database, $db_config) = each
76    
77          foreach my $input (@inputs) {          foreach my $input (@inputs) {
78    
 print Dumper($input);  
   
79                  my $type = lc($input->{type});                  my $type = lc($input->{type});
80    
81                  die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis');                  die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis');
# Line 95  print Dumper($input); Line 93  print Dumper($input);
93                  );                  );
94    
95                  my $maxmfn = $isis->open(                  my $maxmfn = $isis->open(
96                          filename => $input->{path},                          path => $input->{path},
97                          code_page => $input->{encoding},        # database encoding                          code_page => $input->{encoding},        # database encoding
98                  );                  );
99    
# Line 107  print Dumper($input); Line 105  print Dumper($input);
105                          prefix => $input->{name},                          prefix => $input->{name},
106                  );                  );
107    
108                  $n->open(                  my $normalize_path = $input->{normalize}->{path};
109                          tag => $input->{normalize}->{tag},  
110                          xml_file => $input->{normalize}->{path},                  if ($normalize_path =~ m/\.xml$/i) {
111                  );                          $n->open(
112                                    tag => $input->{normalize}->{tag},
113                                    xml_file => $input->{normalize}->{path},
114                            );
115                    } elsif ($normalize_path =~ m/\.(?:yml|yaml)$/i) {
116                            $n->open_yaml(
117                                    path => $normalize_path,
118                                    tag => $input->{normalize}->{tag},
119                            );
120                    }
121    
122                  for ( 0 ... $isis->size ) {                  for ( 0 ... $isis->size ) {
123    

Legend:
Removed from v.255  
changed lines
  Added in v.285

  ViewVC Help
Powered by ViewVC 1.1.26