Changeset 18474 for gsdl/trunk/perllib/convertutil.pm
- Timestamp:
- 2009-02-09T14:34:27+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/convertutil.pm
r16841 r18474 233 233 print $outhandle " This means $ofilename will be regenerated on next build whether\n"; 234 234 print $outhandle " processing args have changed or not.\n"; 235 } 236 237 # Store the result, since ImageConverter.pm extracts the image height and width from the processed result 238 my $result_filename = "$ofilename.result"; 239 if (open(RESOUT, ">$result_filename")) 240 { 241 print RESOUT $result; 242 close(RESOUT); 243 } 244 else 245 { 246 my $outhandle = $options->{'outhandle'}; 247 print $outhandle "Warning: Unable to write out cached process result to file $result_filename.\n"; 235 248 } 236 249 … … 279 292 print $outhandle " $message_prefix: Cached file $ofile_no_dir already exists.\n"; 280 293 print $outhandle " $message_prefix: No need to regenerate $ofile\n" if ($verbosity > 2); 294 295 # Read in the cached result lines and join them into a single string 296 my $result_filename = "$ofilename.result"; 297 if (open(RESIN, "<$result_filename")) 298 { 299 my @result_lines = <RESIN>; 300 $result = join("\n", @result_lines); 301 close(RESIN); 302 } 303 else 304 { 305 print $outhandle " $message_prefix: Error, failed to obtain cached result from $result_filename.\n"; 306 } 281 307 } 282 308
Note:
See TracChangeset
for help on using the changeset viewer.