/[webpac2]/branches/Sack/lib/WebPAC/Input/DBF.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 /branches/Sack/lib/WebPAC/Input/DBF.pm

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

revision 871 by dpavlin, Thu Jun 21 23:54:42 2007 UTC revision 873 by dpavlin, Fri Jun 22 00:03:46 2007 UTC
# Line 81  sub new { Line 81  sub new {
81    
82          $log->info("opening DBF database '$arg->{path}' with $size records");          $log->info("opening DBF database '$arg->{path}' with $size records");
83    
84          my $mapping_path = $arg->{input_config}->{mapping_path};          my $mapping_path = $arg->{input_config}->{mapping_path} || $self->{input_config}->{mapping_path};
85          my $mapping;          my $mapping;
86    
87          if ( ! $mapping_path ) {          if ( ! $mapping_path || ! -e $mapping_path ) {
88                  $log->debug("didn't found any mapping_path in configuration", sub { dump( $arg->{input_config} ) });                  $log->debug("didn't found any mapping_path in configuration", sub { dump( $arg->{input_config} ) });
89    
90                  foreach my $field ( $db->field_names ) {                  foreach my $field ( $db->field_names ) {
# Line 96  sub new { Line 96  sub new {
96    
97                  $log->logdie("mapping file $mapping_path allready exists, aborting.") if ( -e $mapping_path );                  $log->logdie("mapping file $mapping_path allready exists, aborting.") if ( -e $mapping_path );
98    
99                  DumpFile( $mapping_path, Dump( { mapping => $mapping } ) ) ||                  DumpFile( $mapping_path, { mapping => $mapping } ) ||
100                          $log->logdie("can't write template file for mapping_path $mapping_path: $!");                          $log->logdie("can't write template file for mapping_path $mapping_path: $!");
101    
102                  $log->logdie("template file for mapping_path created as $mapping_path");                  $log->logdie("template file for mapping_path created as $mapping_path");

Legend:
Removed from v.871  
changed lines
  Added in v.873

  ViewVC Help
Powered by ViewVC 1.1.26