Changeset 12830
- Timestamp:
- Apr 12, 2007, 5:15:04 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r12799 r12830 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.3 4 2007-04-11 01:58:02 eugene Exp $3 # $Id: Config.pm,v 1.35 2007-04-13 03:15:04 price Exp $ 4 4 5 5 package PS::IPP::Config; … … 27 27 $PS_EXIT_DATA_ERROR 28 28 $PS_EXIT_TIMEOUT_ERROR 29 metadataLookupStr 30 metadataLookupMD 29 31 ); 30 32 … … 70 72 my $mdc = $parser->parse( join '', @contents); # The parsed metadata config 71 73 72 my $path = _interpolate_env( _mdLookupStr($mdc, 'PATH')); # The path74 my $path = _interpolate_env(metadataLookupStr($mdc, 'PATH')); # The path 73 75 unless (defined $path) { 74 76 carp "PATH is not set in $name\n"; … … 101 103 } 102 104 103 my $camera_list = _mdLookupMD($self->{_ipprc}, 'CAMERAS'); # List of cameras104 my $filename = _mdLookupStr($camera_list, $name); # Filename of camera configuration105 my $camera_list = metadataLookupMD($self->{_ipprc}, 'CAMERAS'); # List of cameras 106 my $filename = metadataLookupStr($camera_list, $name); # Filename of camera configuration 105 107 unless (defined $filename) { 106 108 carp "Unable to find configuration file for camera $name\n"; … … 165 167 } 166 168 167 my $path_list = _mdLookupMD($self->{_ipprc}, 'DATAPATH'); # List of paths168 my $pathname = _mdLookupStr($path_list, $name); # Path of interest169 my $path_list = metadataLookupMD($self->{_ipprc}, 'DATAPATH'); # List of paths 170 my $pathname = metadataLookupStr($path_list, $name); # Path of interest 169 171 unless (defined $pathname) { 170 172 carp "Unable to find camera configuration file $pathname\n" ; … … 229 231 pop @dirs; # Get rid of filename 230 232 231 my $path_list = _mdLookupMD($self->{_ipprc}, 'DATAPATH'); # List of paths233 my $path_list = metadataLookupMD($self->{_ipprc}, 'DATAPATH'); # List of paths 232 234 my $best_path; 233 235 my $best_name; … … 285 287 } 286 288 287 my $rejection = _mdLookupMD($camera, 'REJECTION'); # Rejection list289 my $rejection = metadataLookupMD($camera, 'REJECTION'); # Rejection list 288 290 unless (defined $rejection) { 289 291 carp "Can't find REJECTION list in camera configuration.\n"; … … 346 348 } 347 349 348 my $filerules = _mdLookupMD($camera, 'FILERULES'); # File rules350 my $filerules = metadataLookupMD($camera, 'FILERULES'); # File rules 349 351 unless (defined $filerules) { 350 352 carp "Can't find FILERULES list in camera configuration.\n"; … … 358 360 } 359 361 360 my $filename = _mdLookupStr($file, "FILENAME.RULE"); # File name362 my $filename = metadataLookupStr($file, "FILENAME.RULE"); # File name 361 363 unless (defined $filename) { 362 364 carp "Can't find FILENAME.RULE for $name within FILERULES in camera configuration.\n"; … … 395 397 ## } 396 398 ## 397 ## my $extname_rules = _mdLookupMD($camera, 'EXTNAME.RULES'); # File rules399 ## my $extname_rules = metadataLookupMD($camera, 'EXTNAME.RULES'); # File rules 398 400 ## unless (defined $extname_fules) { 399 401 ## carp "Can't find EXTNAME.RULES in camera configuration.\n"; … … 401 403 ## } 402 404 ## 403 ## my $extname = _mdLookupStr($file, $name); # File name405 ## my $extname = metadataLookupStr($file, $name); # File name 404 406 ## unless (defined $extname) { 405 407 ## carp "Can't find $name within EXTNAME.RULES in camera configuration.\n"; … … 434 436 } 435 437 436 my $dir = _mdLookupStr($camera, "DVO.CAMERADIR"); # Directory of interest438 my $dir = metadataLookupStr($camera, "DVO.CAMERADIR"); # Directory of interest 437 439 unless (defined $dir) { 438 440 carp "Can't find DVO.CAMERADIR in camera configuration.\n"; … … 463 465 464 466 # Lookup the metadata, checking the type is STR 465 sub _mdLookupStr467 sub metadataLookupStr 466 468 { 467 469 my $mdc = shift; # Metadata config to look up … … 486 488 487 489 # Lookup the metadata, checking the type is MD 488 sub _mdLookupMD490 sub metadataLookupMD 489 491 { 490 492 my $mdc = shift; # Metadata config to look up … … 507 509 return undef; 508 510 } 509 510 511 511 512 # Lookup the metadata, checking the type is MD; may be redirection
Note:
See TracChangeset
for help on using the changeset viewer.
