/[webpac]/trunk2/all2all.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 /trunk2/all2all.pl

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

revision 371 by dpavlin, Thu Jun 17 17:25:12 2004 UTC revision 372 by dpavlin, Sat Jun 19 18:16:20 2004 UTC
# Line 9  all2all.pl - basic script for all WebPAC Line 9  all2all.pl - basic script for all WebPAC
9  use strict;  use strict;
10  use Data::Dumper;  use Data::Dumper;
11  use Carp;  use Carp;
12    use Log::Log4perl qw(get_logger :levels);
13    
14  use lib './lib';  use lib './lib';
15  use WebPAC;  use WebPAC;
16    
17    Log::Log4perl->init('log.conf');
18    my $log = get_logger();
19    
20  my $webpac = new WebPAC(  my $webpac = new WebPAC(
21          code_page => 'ISO-8859-2',          code_page => 'ISO-8859-2',
22          limit_mfn => 500,          limit_mfn => 500,
23          debug => 1,  #       debug => 1,
24  ) || die;  ) || die;
25    
26  $|=1;  $|=1;
# Line 32  my $maxmfn = $webpac->open_isis( Line 36  my $maxmfn = $webpac->open_isis(
36          ],          ],
37  );  );
38    
39  print "rows: $maxmfn\n\n";  $log->info("rows: $maxmfn");
40    
41  $webpac->open_import_xml(type => 'isis_hidra_ths');  $webpac->open_import_xml(type => 'isis_hidra_ths');
42    
# Line 40  while (my $rec = $webpac->fetch_rec) { Line 44  while (my $rec = $webpac->fetch_rec) {
44    
45          my @ds = $webpac->data_structure($rec);          my @ds = $webpac->data_structure($rec);
46    
47            if ($log->is_debug) {
48                    $log->debug("rec = ",Dumper($rec));
49                    $log->debug("ds = ",Dumper(\@ds));
50            }
51    
52          print $webpac->output(          print $webpac->output(
53                  template => 'text.tt',                  template => 'text.tt',
54                  data => \@ds,                  data => \@ds,
# Line 47  while (my $rec = $webpac->fetch_rec) { Line 56  while (my $rec = $webpac->fetch_rec) {
56    
57  }  }
58    
59  print "## lookup ",Dumper($webpac->{'lookup'});  if ($log->is_debug) {
60  print "## data ",Dumper($webpac->{'data'});          $log->debug("lookup hash: ",Dumper($webpac->{'lookup'}));
61            $log->debug("data hash: ",Dumper($webpac->{'data'}));
62    }

Legend:
Removed from v.371  
changed lines
  Added in v.372

  ViewVC Help
Powered by ViewVC 1.1.26