Changeset 1904 in ProjectBuilder for devel/pb-modules
- Timestamp:
- Oct 9, 2014, 12:14:41 PM (10 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r1795 r1904 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_ get pb_conf_get_if pb_conf_print pb_conf_get_all);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); 32 32 ($VERSION,$REVISION) = pb_version_init(); 33 33 … … 222 222 } 223 223 return(@ptr); 224 } 225 226 =item B<pb_conf_write> 227 228 This function writes in the file passed ias first parameter the hash of values passed as second parameter 229 230 =cut 231 232 sub pb_conf_write { 233 234 my $conffile = shift; 235 my $h = $_; 236 237 open(CONF,"> $conffile") || confess "Unbale to wirte into $conffile"; 238 239 foreach my $p (keys %$h) { 240 foreach my $key ($p) { 241 print CONF "$p $key = $p->{$key}\n"; 242 } 243 } 244 close(CONF); 224 245 } 225 246
Note:
See TracChangeset
for help on using the changeset viewer.