--- trunk/lib/WebPAC/Output/MARC.pm 2009/05/19 14:46:12 1186 +++ trunk/lib/WebPAC/Output/MARC.pm 2009/05/20 14:23:54 1187 @@ -8,7 +8,6 @@ use MARC::Record; use MARC::Lint; use Data::Dump qw/dump/; -use Encode qw/from_to decode/; =head1 NAME @@ -53,18 +52,18 @@ $log->warn("Can't create MARC::Lint object, linting is disabled"); } + $self->{marc_encoding} ||= 'utf-8'; + if (my $path = $self->{path}) { open($self->{fh}, '>', $path) || $log->logdie("can't open MARC output $path: $!"); binmode($self->{fh}, ':utf8'); - $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"); } else { $log->logconfess("new called without path"); } - $self->{marc_encoding} ||= 'utf-8'; - $self ? return $self : return undef; }