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


Ignore:
Timestamp:
Aug 30, 2017, 5:07:45 PM (7 years ago)
Author:
Bruno Cornec
Message:

Add support for conf file value being empty strings

File:
1 edited

Legend:

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

    r2263 r2264  
    561561$PBCONFVER = $pbconfverbkp;
    562562
     563pb_log(0,"Converting v0 conf file $orig to v1 conf file $dest\n");
    563564# We can't just write the YAML if we want to ckeep comments !
    564565while (<ORIG>) {
     
    578579                foreach my $k (keys %{$lh0->{$param}}) {
    579580                    pb_log(2,"Handling key $k\n");
    580                     print DEST "  $k: $lh0->{$param}->{$k}\n";
     581                    if ($lh0->{$param}->{$k} =~ /^\s*$/) {
     582                        print DEST "  $k: !!str \"\"\n";
     583                    } else {
     584                        print DEST "  $k: $lh0->{$param}->{$k}\n";
     585                    }
    581586                }
    582587                $lh1->{$param} = 1;
Note: See TracChangeset for help on using the changeset viewer.