Changeset 2362 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Conf.pm
- Timestamp:
- Feb 25, 2019, 12:20:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r2300 r2362 15 15 16 16 use strict; 17 use Carp 'confess';17 use Carp qw/cluck confess/; 18 18 use Data::Dumper; 19 19 use ProjectBuilder::Base; … … 185 185 # Read the content of the config file and cache it in the %h hash then available for queries 186 186 if ($PBCONFVER < 1) { 187 open(CONF,$cf) || c onfess "Unable to open $cf";187 open(CONF,$cf) || cluck "Unable to open $cf" && return($lh); 188 188 # This is the original conf file format for versions up to 0.14 189 189 while(<CONF>) { … … 331 331 confess "No configuration file defined to write into !" if (not defined $conffile); 332 332 confess "No hash defined to read from !" if (not defined $h); 333 open(CONF,"> $conffile") || c onfess "Unable to write into $conffile";333 open(CONF,"> $conffile") || cluck "Unable to write into $conffile" && return; 334 334 335 335 if ($PBCONFVER < 1) { … … 547 547 my $dest = shift; 548 548 549 open(ORIG,$orig) || c onfess "Unable to open $orig";549 open(ORIG,$orig) || cluck "Unable to open $orig" && return; 550 550 confess "Will not erase existing $dest while transforming $orig" if (-f $dest); 551 open(DEST,"> $dest") || c onfess "Unable to write into $dest";551 open(DEST,"> $dest") || cluck "Unable to write into $dest" && return; 552 552 print DEST "---\n"; 553 553 my $pbconfverbkp = $PBCONFVER;
Note:
See TracChangeset
for help on using the changeset viewer.