Changeset 2077 in ProjectBuilder
- Timestamp:
- Apr 28, 2016, 8:05:36 PM (9 years ago)
- Location:
- devel
- Files:
-
- 14 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r2032 r2077 29 29 30 30 our @ISA = qw(Exporter); 31 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_write pb_conf_get pb_conf_get_if pb_conf_print pb_conf_get_all pb_conf_ cache);31 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_write pb_conf_get pb_conf_get_if pb_conf_print pb_conf_get_all pb_conf_get_hash pb_conf_cache); 32 32 ($VERSION,$REVISION) = pb_version_init(); 33 33 … … 115 115 my $lh = shift; 116 116 117 # Read the content of the config file and cache it in the %h hash further availble for queries117 # Read the content of the config file and cache it in the %h hash then available for queries 118 118 open(CONF,$cf) || confess "Unable to open $cf"; 119 119 while(<CONF>) { 120 120 next if (/^#/); 121 if (/^\s*([A-z0-9-_.]+)\s+([[A-z0-9-_. ]+)\s*=\s*(.*)$/) {121 if (/^\s*([A-z0-9-_.]+)\s+([[A-z0-9-_.\?\[\]\*\+\\]+)\s*=\s*(.*)$/) { 122 122 pb_log(3,"DEBUG: 1:$1 2:$2 3:$3\n"); 123 123 $lh->{$1}->{$2}=$3; … … 415 415 =item B<pb_conf_get_all> 416 416 417 This function returns an array wi rh all configuration parameters417 This function returns an array with all configuration parameters 418 418 419 419 =cut … … 422 422 423 423 return(sort keys %$h); 424 } 425 426 427 =item B<pb_conf_get_hash> 428 429 This function returns a pointer to the hash with all configuration parameters 430 431 =cut 432 433 sub pb_conf_get_hash { 434 435 return($h); 424 436 } 425 437
Note:
See TracChangeset
for help on using the changeset viewer.