Changeset 2263 in ProjectBuilder for devel/pb/lib/ProjectBuilder/Filter.pm


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

Fix the merge of YAML conf files in pb_conf_cache
(Up to 3 levels of keys for now)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Filter.pm

    r2260 r2263  
    7070my $pbos = shift;
    7171my $ptr = undef; # returned value pointer on the hash of filters
    72 my $h;
     72my $lh;
    7373
    7474pb_log(2,"Entering pb_get_filters - pbpkg: $pbpkg - pbos: ".Dumper($pbos)."\n");
     
    108108    foreach my $f (@ffiles) {
    109109        pb_log(3,"DEBUG processing filter file $f\n");
    110         $h = pb_conf_cache($f,$h);
    111     }
    112     $ptr = $h->{"filter"};
     110        $lh = pb_conf_cache($f,$lh);
     111        pb_log(2, "filter hash is:\n".Dumper($lh)."\n");
     112    }
     113    $ptr = $lh->{"filter"};
    113114
    114115    # TODO: find a place to document it. Why not in this file as pod and also documenting filters ?
    115116    # Handle transform
    116     if (defined $h->{transform}) {
    117         while (my ($out_key,$spec) = each %{$h->{transform}}) {
     117    if (defined $lh->{transform}) {
     118        while (my ($out_key,$spec) = each %{$lh->{transform}}) {
    118119            die "Unknown transform for $out_key '$spec' expected <out-key> <transform>" unless $spec =~ /^([\w\-]+)\s+(.+)$/;
    119120            my ($in_key, $expr) = ($1, $2);
Note: See TracChangeset for help on using the changeset viewer.