Changeset 14575
- Timestamp:
- Aug 20, 2007, 3:53:13 PM (19 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
r14400 r14575 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.6 3 2007-08-01 20:50:32 jhoblittExp $3 # $Id: Config.pm,v 1.64 2007-08-21 01:53:13 price Exp $ 4 4 5 5 package PS::IPP::Config; … … 29 29 metadataLookupStr 30 30 metadataLookupMD 31 metadataLookupBool 31 32 caturi 32 33 ); … … 881 882 } 882 883 884 # Lookup the metadata, checking the type is BOOL 885 sub metadataLookupBool 886 { 887 my $mdc = shift; # Metadata config to look up 888 my $name = shift; # Name of item to look ip 889 890 unless (defined $mdc and defined $name) { 891 carp "Programming error"; 892 exit($PS_EXIT_PROG_ERROR); 893 } 894 895 # Iterate through the array of hashes 896 foreach my $item (@$mdc) { 897 if ($item->{name} eq $name) { 898 carp "$name within metadata is not of type BOOL.\n" unless $item->{class} eq "bool"; 899 return $item->{value}; 900 } 901 } 902 903 carp "Unable to find $name within metadata.\n"; 904 return undef; 905 } 906 883 907 # Lookup the metadata, checking the type is MD; may be redirection 884 908 sub _mdLookupMDwithRedirect
Note:
See TracChangeset
for help on using the changeset viewer.
