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

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

revision 1186 by dpavlin, Mon Aug 4 21:47:27 2008 UTC revision 1187 by dpavlin, Wed May 20 14:23:54 2009 UTC
# Line 8  use base qw/WebPAC::Common/; Line 8  use base qw/WebPAC::Common/;
8  use MARC::Record;  use MARC::Record;
9  use MARC::Lint;  use MARC::Lint;
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
 use Encode qw/from_to decode/;  
11    
12  =head1 NAME  =head1 NAME
13    
# Line 53  sub new { Line 52  sub new {
52                          $log->warn("Can't create MARC::Lint object, linting is disabled");                          $log->warn("Can't create MARC::Lint object, linting is disabled");
53          }          }
54    
55            $self->{marc_encoding} ||= 'utf-8';
56    
57          if (my $path = $self->{path}) {          if (my $path = $self->{path}) {
58                  open($self->{fh}, '>', $path) ||                  open($self->{fh}, '>', $path) ||
59                          $log->logdie("can't open MARC output $path: $!");                          $log->logdie("can't open MARC output $path: $!");
60                  binmode($self->{fh}, ':utf8');                  binmode($self->{fh}, ':utf8');
61    
62                  $log->info("Creating MARC export file $path", $self->{lint} ? ' (with lint)' : '', "\n");                  $log->info("Creating MARC export file $path", $self->{lint} ? ' (with lint)' : '', " encoding ", $self->{marc_encoding}, "\n");
63          } else {          } else {
64                  $log->logconfess("new called without path");                  $log->logconfess("new called without path");
65          }          }
66    
         $self->{marc_encoding} ||= 'utf-8';  
   
67          $self ? return $self : return undef;          $self ? return $self : return undef;
68  }  }
69    

Legend:
Removed from v.1186  
changed lines
  Added in v.1187

  ViewVC Help
Powered by ViewVC 1.1.26