Changeset 1495 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Env.pm


Ignore:
Timestamp:
May 7, 2012, 4:44:13 AM (12 years ago)
Author:
Bruno Cornec
Message:

r4735@localhost: bruno | 2012-05-07 03:46:39 +0200

  • Conf.pm largely rewritten to cache all conf files into a local $h hash in which conf files are added in reverse order.

The new pb_conf_hash stores a configuration file into a hash structure passed in parameter.
pb_conf_add now triggers the computation of the hash structure with pb_conf_cache and adds it to the main $h hash.
pb_conf_read_if now just uses the content in the $h hash to return its table.
pb_conf_get_in_hash_if function added to do the same as pb_conf_read_if on the cached $h hash instead of a configuration file.
pb_conf_get_if now uses pb_conf_get_in_hash_if and the $h hash without re-reading conf files
pb_conf_add_last_in_hash adds the content of a hash behind the content of the $h main hash (was done in pb_conf_get before)
pb_env_init now calls pb_conf_init to have PBPROJ defined when needed.
pb seems to work with this new version (builds itself)

  • Add a new getconf option to pb in order to see the state of the current configuration parameters (now in memory)
File:
1 edited

Legend:

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

    r1469 r1495  
    145145my $tag;
    146146
     147pb_conf_init($proj);
    147148pb_env_init_pbrc();
    148149
     
    151152# Could be with env var PBPROJ
    152153# or option -p
    153 # if not define take the first in conf file
     154# if not defined take the first in conf file
    154155#
    155156if ((defined $ENV{'PBPROJ'}) &&
Note: See TracChangeset for help on using the changeset viewer.