Changeset 13724
- Timestamp:
- Jun 8, 2007, 12:53:39 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r13693 r13724 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.5 8 2007-06-07 02:29:11 price Exp $3 # $Id: Config.pm,v 1.59 2007-06-08 22:53:39 eugene Exp $ 4 4 5 5 package PS::IPP::Config; … … 166 166 close $file; 167 167 $self->{camera} = $parser->parse( join '', @contents); # The parsed metadata config 168 $self->{cameraName} = $name; 168 169 169 170 unless (defined $self->{camera}) { … … 222 223 my $pathname = metadataLookupStr($path_list, $name); # Path of interest 223 224 unless (defined $pathname) { 224 carp "Unable to find camera configuration file $pathname\n" ;225 carp "Unable to find datapath $name\n" ; 225 226 exit($PS_EXIT_CONFIG_ERROR); 226 227 } … … 548 549 549 550 unless (defined $self->{rejection}) { 550 my $camera = $self->{camera }; # Camera configuration551 my $camera = $self->{cameraName}; # Camera name 551 552 unless (defined $camera) { 552 553 carp "Camera has not yet been defined.\n"; … … 554 555 } 555 556 556 my $rejName = metadataLookupStr($camera, 'REJECTIONS'); # Name of rejection file 557 unless (defined $rejName) { 558 carp "Can't find REJECTIONS list in camera configuration.\n"; 559 return undef; 560 } 557 # rejections are saved as a recipe: REJECTIONS 558 my @rejContents = `ppConfigDump -dump-recipe REJECTIONS -camera $camera -`; 561 559 562 my $rejRealName = $self->_find_config($rejName); # Resolved filename, after hunting the PATH 563 564 my $rejFile; # Rejection file handle 565 unless (open $rejFile, $rejRealName) { 566 carp "Unable to open rejection file $rejRealName: $!"; 567 exit($PS_EXIT_CONFIG_ERROR); 568 } 569 my @rejContents = <$rejFile>; # Contents of the rejection file 570 close $rejFile; 571 560 # load from resulting psMetadataConfig 572 561 $self->{rejection} = $parser->parse( join '', @rejContents); # The rejection metadata 573 562 unless (defined $self->{rejection}) { 574 carp "Unable to parse rejection file $rejRealName.";563 carp "Unable to parse REJECTION recipe for $camera."; 575 564 exit($PS_EXIT_CONFIG_ERROR); 576 565 }
Note:
See TracChangeset
for help on using the changeset viewer.
