Changeset 10125 for trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
- Timestamp:
- Nov 21, 2006, 2:32:13 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r9898 r10125 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1. 4 2006-11-07 22:56:41price Exp $3 # $Id: Config.pm,v 1.5 2006-11-22 00:32:13 price Exp $ 4 4 5 5 package PS::IPP::Config; … … 164 164 } 165 165 166 my $file = _mdLookupMD ($filerules, $name); # The file of interest166 my $file = _mdLookupMDwithRedirect($filerules, $name); # The file of interest 167 167 unless (defined $file) { 168 168 carp "Can't find $name within FILERULES in camera configuration.\n"; … … 239 239 240 240 241 # Lookup the metadata, checking the type is MD; may be redirection 242 sub _mdLookupMDwithRedirect 243 { 244 my $mdc = shift; # Metadata config to look up 245 my $name = shift; # Name of item to look ip 246 247 # Iterate through the array of hashes 248 foreach my $item (@$mdc) { 249 if ($item->{name} eq $name) { 250 if ($item->{type} eq "STR") { 251 # Redirect 252 return _mdLookupMDwithRedirect($mdc, $item->{value}); 253 } 254 carp "$name within metadata is not of type METADATA.\n" unless $item->{class} eq "metadata"; 255 return $item->{value}; 256 } 257 } 258 259 carp "Unable to find $name within metadata.\n"; 260 return undef; 261 } 262 263 241 264 1; 242 265
Note:
See TracChangeset
for help on using the changeset viewer.
