Changeset 2434 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Conf.pm


Ignore:
Timestamp:
Sep 6, 2019, 3:35:27 PM (5 years ago)
Author:
Bruno Cornec
Message:

force explicit analysis of boolean and when using cluck

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Conf.pm

    r2426 r2434  
    185185# Read the content of the config file and cache it in the %h hash then available for queries
    186186if ($PBCONFVER < 1) {
    187     open(CONF,$cf) || cluck "Unable to open $cf" && return($lh);
     187    open(CONF,$cf) || (cluck "Unable to open $cf" && return($lh));
    188188    # This is the original conf file format for versions up to 0.14
    189189    while(<CONF>) {
     
    337337confess "No configuration file defined to write into !" if (not defined $conffile);
    338338confess "No hash defined to read from !" if (not defined $h);
    339 open(CONF,"> $conffile") || cluck "Unable to write into $conffile" && return;
     339open(CONF,"> $conffile") || (cluck "Unable to write into $conffile" && return);
    340340
    341341if ($PBCONFVER < 1) {
     
    553553my $dest = shift;
    554554
    555 open(ORIG,$orig) || cluck "Unable to open $orig" && return;
     555open(ORIG,$orig) || (cluck "Unable to open $orig" && return);
    556556confess "Will not erase existing $dest while transforming $orig" if (-f $dest);
    557 open(DEST,"> $dest") || cluck "Unable to write into $dest" && close(ORIG) && return;
     557open(DEST,"> $dest") || (cluck "Unable to write into $dest" && close(ORIG) && return);
    558558print DEST "---\n";
    559559my $pbconfverbkp = $PBCONFVER;
Note: See TracChangeset for help on using the changeset viewer.