Changeset 2785 for trunk/gsdl/perllib/plugins/ConvertToPlug.pm
- Timestamp:
- 2001-10-09T17:21:29+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r2755 r2785 48 48 # @ISA = ('BasPlug'); #, 'HTMLPlug', 'TEXTPlug'); 49 49 } 50 51 # use strict; # this breaks 'print $outhandle ' error msgs.52 50 53 51 sub print_usage { … … 146 144 my $outhandle = $self->{'outhandle'}; 147 145 my $convert_to = $self->{'convert_to'}; 146 my $failhandle = $self->{'failhandle'}; 148 147 149 148 # softlink to collection tmp dir … … 184 183 if ($output_type eq "fail") { 185 184 print $outhandle "Could not convert $tailname$suffix to $convert_to format\n"; 186 if ($self->{'faillogname'} ne "" && -s "$errlog") { 187 open(SAVELOG, ">>$self->{'faillogname'}"); 185 print $failhandle "$tailname$suffix: " . ref($self) . " failed to convert to $convert_to\n"; 186 $self->{'num_not_processed'} ++; 187 if (-s "$errlog") { 188 188 open(ERRLOG, "$errlog"); 189 print SAVELOG "$tailname$suffix (converting to $convert_to) failed:\n";190 189 while (<ERRLOG>) { 191 print SAVELOG"$_";190 print $outhandle "$_"; 192 191 } 192 print $outhandle "\n"; 193 193 close ERRLOG; 194 print SAVELOG "\n";195 close SAVELOG;196 194 } 197 195 &util::rm("$errlog") if (-e "$errlog"); … … 236 234 237 235 my $filename = &util::filename_cat($base_dir, $file); 238 return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/; 236 if ($self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/) { 237 $self->{'num_blocked'} ++; 238 return 0; 239 } 239 240 if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) { 240 241 return undef; … … 299 300 $self->cleanup_tmp_area(); 300 301 302 $self->{'num_processed'} ++; 301 303 302 304 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.