2008-07-24 Dominique Dumont v0.624
* lib/Config/Model/Value.pm and others: Modified to allow smooth
configuration data upgrades without requiring user input (if used
by packaging, this should really help in avoiding rpmsave or
dpkg-old files) (See migrate_from parameter)
* lib/Config/Model/ValueComputer.pm: added 'use_eval' parameter to
allow more complex computation like regexp in string or uniline
values
2008-07-18 Dominique Dumont
* lib/Config/Model/AutoRead.pm: Major changes to interface
Config::Model with Augeas (http://augeas.net). Changes are
compatible but new warnings are issued:
- 'syntax' is replaced by 'backend' to indicate that permanent
storage of configuration data is more than a matter of writing
a configuration file.
- introduced 'config_dir' and 'root' paramater so a backend can
specify a configuration dir (e.g. /etc/foo) and a pseudo-root
to perform tests (so the config file can land in my_root/etc/foo).
* lib/Config/Model/Dumper.pm (new): skip_auto_write now take a
storage backend name as a parameter instead of a boolean (See
AutoRead for explanations about backends)
* lib/Config/Model/Node.pm (set): New method to emulate (part of)
augeas API
(get): New method to emulate (part of) augeas API
* lib/Config/Model/Loader.pm (): Added load command '~' which was
forgotten. This command can delete hash or list
item. I.e. load("foo~") will delete element 'a' for hash 'foo'
(_load_list): command '=' now clear all values before storing the
set of values in the list.
* lib/Config/Model/AnyId.pm (clear_values): New method to clear
values without destroying underlying objects.
(set): New method to emulate (part of) augeas API
(get): New method to emulate (part of) augeas API
2008-06-20 Dominique Dumont
* lib/Config/Model/AutoRead.pm: Changed 'syntax' paramter to
'backend' as configuration data may be stored to files or through
dedicated libraries like Augeas, gconf ... Backend now can be
cds_file, perl_file, ini_file and custom
2008-05-19 Dominique Dumont v0.623
* Build.PL: Moved from Makefile.PL to Build.PL
2008-05-18 Dominique Dumont
* lib/Config/Model/CheckList.pm: added support for built_in
default list
2008-05-17 Dominique Dumont
* lib/Config/Model/SimpleUI.pm: Some cleanup. Added possibility to
add and element name to 'll' command
2008-05-15 Dominique Dumont
* config-edit: added "dev" and "experience" options. With "dev"
option, config-edit will add "lib" to @INC and look for models in
"lib"
2008-05-14 Dominique Dumont
* lib/Config/Model/Node.pm (fetch_element): Bails out if element
is hidden (this feature was forgotten)
2008-05-09 Dominique Dumont
* lib/Config/Model/Value.pm (submit_to_compute): Fix bug where a
compute variable in the form 'foo' => '- - &element' did not work
(new): allow_compute_override is deprecated in favor of
allow_override within the compute parameter (backward compatible
change)
2008-05-07 Dominique Dumont
* lib/Config/Model/AnyThing.pm (dump_as_data): dump_as_data can
now be called on all configuration elements. (before, it could
only be called on nodes)
2008-05-02 Domi <domi@bilbo.maison>
* lib/Config/Model/AutoRead.pm: Changed the way to specify auto
read and write for better clarity. Now they must be specified with
read_config => [ { syntax => 'ini'},
{ syntax => 'custom',
class => 'Mine',
function=>'my_read'
}
]
instead of
read_config => [ 'ini', { class => 'Mine',function=>'my_read'}]
likewise for write_config
2008-05-01 Domi <domi@bilbo.maison>
* lib/Config/Model.pm: Changed 'permission' to 'experience' and
'intermediate' to 'beginner' for better clarify. Changes are
backward compatible.
2008-04-29 Dominique Dumont
* lib/Config/Model/HashId.pm (move): New method to take into
account move within ordered hash
* lib/Config/Model/WarpedThing.pm (compute_bool): warp rule no
longer fail with eval $foo == 1 when $foo is undef
2008-04-18 Dominique Dumont v0.622
* Value.pm (fetch): added 'allow_undef' mode to allow reading
undefined mandatory value (fix morphing warped node containing
undefined mandatory values)
* Node.pm (copy_from): No longer die when copying undefined
mandatory value.
2008-04-16 Dominique Dumont
* AutoRead.pm (get_cfg_file_name): Do not use ':' in file
names. This breaks windows. Now use sub-directories
2008-04-15 Dominique Dumont
* Dumper.pm (dump_tree): skip undefined values in list element
* DumpAsData.pm (dump_as_data): idem
2008-04-14 Dominique Dumont
* Model.pm (list_class_element): New method to help debugging of
configuration models
2008-04-13 Dominique Dumont
* Model.pm (include_class): allow multiple includes
2008-04-11 Dominique Dumont
* AnyId.pm: Changed the way the cargo parameter are specified. Now
the cargo parameter holds all the information related to the
payload of the hash or list. Instead of having :
cargo_type => ... , cargo_args => {}, config_class_name => ...
you now have:
cargo => { type => ..., config_class_name => ..., <other_parm> => ... }
Model.pm provides a translation from the old way to the new way so
this change is (95%) backward compatible.
2008-04-08 Dominique Dumont
* CheckList.pm (set): Fix bug that prevented to use level or
permission or status parameter with check_list elements
2008-04-05 Domi <domi@bilbo.maison>
* Value.pm (pre_store): Fix bug that prevented to load models with
errors even in tolerant mode.
2008-04-03 Dominique Dumont 0.621
* Dumper.pm (dump_tree): Added auto_vivify parameter
* DumpAsData.pm (dump_as_data): By default, now provide full
dump (with default values). Added auto_vivify parameter
* Value.pm (fetch): Check for mandatory values even if fetching
only custom values
2008-04-02 Dominique Dumont
* Value.pm (): Cannot warp value_type anymore (this feature was
hard to use and encouraged too complex model).
2008-03-28 Dominique Dumont
* HashId.pm (swap): Fix swap problem which led to duplicated keys
in ordered hash
(move_after): New method
2008-03-22 Domi <domi@bilbo.maison>
* ListId.pm (swap): new method
(remove): New method, equivalent to splice (@list,$idx,1)
2008-03-20 Dominique Dumont v0.6201
* Makefile.PL: Removed dependency on Term::ReadLine::Gnu. This module
is just suggested (as well as Term::ReadLine::Perl)
2008-03-18 Dominique Dumont v0.620
* TermUI.pm: Fixed to work with Term::ReadLine::Gnu or
Term::ReadLine::Perl. Can also work in degraded mode without these
2 modules.
The command handling part was moved to SimpleUI.pm
* config-edit: added Simple UI mode so config-edit can be used
with stdin and stdout
2008-02-29 Dominique Dumont v0.619
* Value.pm: removed kludgy enum_integer value type
2008-02-27 Dominique Dumont
* Instance.pm (write_back): can override directory where config
data is written back (necessary for GUI menu like "save in dir
...")
2008-02-26 Dominique Dumont
* Node.pm (get_help): do not mangle description text (don't remove
spurious \s and \n. Leave that to user)
2008-02-12 Dominique Dumont v0.618
* AnyThing.pm (composite_name): new method to return a name
like element:index or element.
2008-02-08 Dominique Dumont
* CheckList.pm (): added refer_to and computed_refer_to accessors
2008-01-28 Dominique Dumont v0.617
* config-edit: added possibility to load Tk GUI (still under
development)
* Exception.pm (): Fixed misleading error message for
UnavailableElement exception
2008-01-25 Dominique Dumont
* Value.pm (): added "replace" parameter for enum Value. This
enables to specify a substitution when storing value.
2008-01-23 Dominique Dumont
* WarpedNode.pm (check): no longer die when trying to retrieve
warped out node, just return undef. This is necessary to be able
to load configuration files with important error (e.g. a xorg.conf
file with a wrong device driver: all driver option are no longer
valid.)
* Value.pm (check): Added doc for check.
* ObjTreeScanner.pm (permission): new method to get or set the
permission of the scanner (after creation).
2007-12-04 Dominique Dumont v0.616
* AutoRead.pm (read_ini): added capability to read configuration
data from ini file (See Config::Tiny)
(write_ini): can use ini files to store configuration data
(read_perl): added capability to read configuration data from a
perl data structure (see Config::Model::DumpAsData) from a .pl
(write_perl): can use perl file to store configuration data (.pl
file)
(auto_read_init): configuration model can specify cds (dump string
see Config::Model::Dumper), perl or ini with 'read_config' and
'write_config' parameter.
2007-11-15 Dominique Dumont v0.615
* config-edit: added '-force-load' option to load erroneous
configuration data. bad data is discarded.
* Value.pm : handle 'preset' mode to store values
(fetch):accept mode parameter ( [ custom | preset |
standard | default | non_built_in ] )
* Loader.pm (_load_list): When loading list, empty value are
considered as undef values. I.e 'list_a=a,,"",d' will
load ('a',undef,'','d') to lista element
* Instance.pm (new): added 'force_load' parameter to load
erronueus configuration data. In this case, wrong data will be
discarded.
(preset_start): new. Use this method, then load configuration data
that will be used as "preset data". You can use this feature to
load data discovered by an automatic mechanism, like hardware
scan.
(preset_stop): new. Stop preset mode. Then all data entered will
be considered as 'custom' data. These custom data can be compared
to 'default' or 'preset' data for audit purpose
(preset): new. Query if the instance is in 'preset' mode.
* Dumper.pm (dump_tree): changed 'full_dump' parameter (0|1) to
'mode' (full | preset)
(dump_tree): if a list contain undef values, they are dumped as
a_list=a,b,,d. Empty values are dumped as a_list=a,b,"",d
* CheckList.pm (store): work in preset mode
(set_checked_list_as_hash): accept a mode parameter ([ custom |
preset | standard | default ]) to be able to audit config data
(fetch): idem
2007-10-19 Dominique Dumont v0.614
* Value.pm: added 'uniline' value type for string with no embedded
newline. (no "\n")
2007-10-11 Dominique Dumont
* Model.pm (translate_id_names): new method to translate AnyId
parameter changes
* AnyId.pm: Changed some parameters: follow -> follow_keys,
allow -> allow_keys, allow_from -> allow_keys_from
2007-10-09 Dominique Dumont
* Model.pm (translate_id_default_info): provides backward
compatibility for AnyId parameter changes.
* AnyId.pm: default parameter is replaced by 'default_keys' and
'default_with_init'.
2007-09-25 Dominique Dumont v0.613
* IdElementReference.pm: Changes the API of IdElementReference so
that API is more explicit (Like the API change for
ValueComputer). This change is backward compatible (model
translation)
2007-09-20 Dominique Dumont
* ValueComputer.pm: Now compute paramater must use explicit
parameters for compute formula, variables and replace. Backward
compatibility is kept by translating old compute declaration in
Model.pm
2007-09-17 Dominique Dumont
* Model.pm (include_class): permission, level and description
parameters can also be declared within the element declaration.
(i.e. at the same level than 'type' )
* IdElementReference.pm (): A reference to a list will now take
into account the values of the list instead of the indexes of the
list. This makes more sense...
* CheckList.pm: Change the name of 'default' parameter to
'default_list' ('default' is still accepted but is deprecated)
2007-09-06 Dominique Dumont
* WarpedNode.pm: improved synopsis in doc
(load_data): new method (forgotten in 0.612)
* Model.pm: -doc: added synopsis
- inherit is deprecated in favor of include
- inherit_after is deprecated in favor of include_after
- Raise an exception if an element is declared twice in a
model (even through include mechanism: overriding an
included element leads to confusion)
2007-07-26 Dominique Dumont v0.612
* HashId.pm : can preserve hash key order (when created with
ordered => 1). New method to manipulate hash key order are swap,
move_up, move_down.
* Exception.pm :new error class Config::Model::Exception::LoadData
* AnyThing.pm (grab): added 'grab_non_available' parameter.
* AnyId.pm: added "ordered" parameter to create ordered hash
elements. I.e. hashes where the order of the keys is kept (like
Tie::IxHash)
2007-07-18 Dominique Dumont
* Value.pm (load_data): new method
* Node.pm (load_data): new method
(dump_as_data): new method
* Model.pm (inherit_class): added inherit_after parameter. In a
model, the order of the elements is important. This parameter
enable a model to inherit elements from another class and to place
them in a specific place among the original elements.
(load): returns the names of the class loaded by this method.
* ListId.pm (load_data): new method
* HashId.pm (load_data): new method
* CheckList.pm (load_data): new method
2007-07-03 Dominique Dumont v0.611
* WarpedThing.pm: Modified the way to specify complex warped
rules. The former way based on list of lists was confusing. Now
you can specify boolean expressions to find the warp rule to apply.
* Model.pm: Simplified config class inheritance mechanism: inherit
all or nothing. Added translation of legacy warp parameter (based
on list of lists) to new warp parameters (based on boolean
expressions). So the change done in WarpedThing is backward
compatible.
2007-06-06 Dominique Dumont v0.610
* Model.pm (inherit_class): Fix configuration class inheritance
mechanism
2007-06-04 Dominique Dumont
* Value.pm: can also warp help for enum value
2007-05-09 Dominique Dumont v0.609
* config-edit: renamed from config-model
2007-05-07 Dominique Dumont
* examples/fstab/fstab_test.pl (produce_fstab): added curses
interface example (need to install Config::Model::CursesUI to
work)
2007-05-04 Dominique Dumont
* config-model: added possibility to use the curses interface
provided by Config::Model::CursesUI (if this one is installed)
* ValueComputer.pm: Modified so compute may return an undef value
if one of the variable (extracted from the configuration data) of
the formula is undefined. In other word, propagate undef instead
of croaking.
* Searcher.pm: Lots of bug fixes
(get_searchable_elements): new method
(prepare): new method. Search is now done in 3 moves: create the
searcher object, prepare the search, and run the search
* Value.pm: removed unique_value parameter which was a bad idea
for a check list implementation. Moved reference handling into new
IdElementReference class
* IdElementReference.pm: New class extracted from Value object so
reference can be used also by CheckList
* CheckList.pm: re-wrote as a "check_list" type and not a "list"
type
2007-04-27 Dominique Dumont
* Instance.pm (reset_config): new method
(searcher): renamed search_element to
searcher. searcher retunrs a Config::Model::Searcher object.
* AnyThing.pm (searcher): renamed search_element to
searcher. searcher retunrs a Config::Model::Searcher object.
* AnyId.pm (copy): new method to deep-copy the content of a hash
or id element.
2007-04-13 Dominique Dumont
* Value.pm: moved out reference facility in
Config::Model::IdElementReference
2007-03-16 Dominique Dumont
* Value.pm (fetch_no_check): new method
2007-02-23 Dominique Dumont v0.608
* ObjTreeScanner.pm: Clarified call-back names.
2007-01-12 Dominique Dumont v0.607
* t/term_ui.t: Changed tests to try to load Term::ReadLine and
skip tests if Term::ReadLine cannot be loaded.
2007-01-11 Dominique Dumont v0.606
* config-model: Corrected wrong doc for options.
* Describe.pm: Small cosmetic changes in output.
2007-01-08 Dominique Dumont v0.605
* config-model: Now uses Log::Log4perl. (Still need to use
Log4perl for all *.pm files though). Now write config files back.
Added option to read and write config in test directories.
* *.pm: Changed e-mail address to reduce spam.
* *.pm: Small bug and doc fixes.
2006-12-08 Dominique Dumont
* Model.pm (load): Model files are expected to be delivered as
Perl module and are searched using @INC. (E.g. Xorg.pl model will
be searched as Config/Model/models/Xorg.pl in @INC elements)
* Exception.pm (full_message): Clarified error message of
RestrictedElement exception
* examples/fstab/fstab_test.pl: Clarified notifications shown to
user. Adapted to changes of 0.604
2006-12-06 Dominique Dumont v0.604
* Node.pm: added check_list in possible element of a node.
* Value.pm (set): Changed reference declaration: now value_type
must be set to 'reference' when using 'refer_to' parameter.
* WarpedThing.pm: can group rules declaration in warp argument to
save typing
* WizardHelper.pm: adapted for ObjTreeScanner changes
2006-12-05 Dominique Dumont
* ObjTreeScanner.pm: Modified the callback signature so the user
does no longer have to play with closures.
- added check_list_cb for CheckList elements
- improved doc
- added callback example in doc
* AutoRead.pm (auto_write_init): bug fix in auto_write functions
* AnyId.pm (new): New allow and allow_from parameters to set
"allowed" keys of a hash or list. This list of allowed keys can be
fixed or dynamic.
* AnyThing.pm (root): new method. Returns the root node of the
configuration tree.
(grab): bug fix so hash identifier can contain white spaces when
calling grab (e.g. InputDevice:"Configured Mouse")
* CheckList.pm: New class to implement a check list.
* Describe.pm: adapted for ObjTreeScanner changes and new
CheckList element type
* Dumper.pm: idem
* Report.pm: idem
2006-10-19 Dominique Dumont v0.603
* Value.pm (set): forbids to specify both 'refer_to' and
'value_type' in value declaration
2006-10-11 Dominique Dumont
* Loader.pm (load): Accepts now to load configuration data where
index can contain white space. (e.g. Monitor:"Hercules Pro")
* AnyId.pm: changed 'element_args' to 'cargo_args'. Changed
'element_class' to 'cargo_class'. Added 'follow' parameter so a
hash key can mimic the keys of another hash in the configuration
tree.
* TermUI.pm: removed debug print. This makes auto-completion much
easier to understand ;-)
2006-09-26 Dominique Dumont
* Value.pm (set_default): added built_in default
parameter. Built_in default parameter are not written in
configuration files but can be used to audit configuration data.
* AutoRead.pm (auto_read_init): bug fix: override of read_dir was
not taken into account
(auto_write_init): idem for write_dir
2006-09-22 Dominique Dumont
* Instance.pm: added doc for the possibility to specify where to
read or write the configuration files.
2006-09-21 Dominique Dumont
* AnyId.pm (move): also change index value when moving items.
2006-09-07 Dominique Dumont v0.602
* config-model: added -help and -man options to command line
* Model.pm (load): model file now must return an array ref and not
invoke Model methods. See t/big_model.pm for an example
(load): can load model file for model class that contain '::'. In
this case the model file is searched in a sub-directory just like
a perl class (E.g Model::Foo -> Model/Foo.pm)
* HashId.pm (create_default): can initialise children nodes while
creating default keys. (Necessary to be able to write a
configuration model for Xorg)
* AnyId.pm (move): new method
2006-07-20 Dominique Dumont v0.601
* config-model: new program. This programs can be invoked to
modify configuration files (provided the corresponding model is
available in /etc/config-model.d). (Still shaky. Don't run as
root)
2006-07-19 Dominique Dumont
* Node.pm (get_type): new method
(get_cargo_type): new method
(get_element_name): added type and cargo_type parameters to filter
returned element depending on their type or cargo (contained) type
(describe): new method. Uses new Describe.pm file
* Value.pm (get_type): new method
(get_cargo_type): new method
2006-07-18 Dominique Dumont
* Model.pm (load): new method. Model can load model declaration
from /etc/config-model.d. The model must be valid perl script that
ends with an array ref containing configuraiton class declaration
like the one accepted by create_config_class
* ListId.pm (get_type): new method
* HashId.pm (get_type): new method
* Exception.pm : Added WrongType exception for new grab parameters
* AnyThing.pm (get_type): New method
(grab): added strict, autoadd, type parameter.
* AnyId.pm (get_cargo_type): new method.
(config_class_name): new mehtod
* Describe.pm: New file. Provides a human readable description of
a configuration node.
2006-06-15 Dominique Dumont v0.507
* TermUI.pm: New file. Provides a shell like interactive user
interface.
* Node.pm: Now inherit AutoRead class
* Instance.pm: Adapted for auto read/write.
2006-06-12 Dominique Dumont
* AutoRead.pm: New file. Provides node the capabilities to load
config data when creating a configuration node.
2006-05-19 Dominique Dumont v0.506
* examples/fstab/FstabModel.pl: added Fstab example with its fstab
configuration model. This example includes a small program that
use this model to show some ways to extract configuration
informations.
2006-05-17 Dominique Dumont
* Report.pm: new file. Provides report and audit facility for
Node.pm
* Node.pm (report): new method
(audit): new method
* Model.pm (create_config_class): added inheritance of
configuration models.
* HashId.pm (_get_all_indexes): sort returned indexes
* Dumper.pm (dump_tree): fix list dump which did not work
* AnyId.pm (fetch_all_values): new method
2006-04-21 Dominique Dumont v0.505
* WizardHelper.pm: New file. This class helps to create wizard
widget for config models
* Makefile.PL: ValueFormula is no longer compiled at build-time
but on the fly at run-time. Hopefully this will fix Windows
problem and ease integration downstream for a minor performance
penalty at start time.
2006-04-10 Dominique Dumont v0.504
* Searcher.pm: Added search element feature. This feature provides
a way to search for a configuration element in a configuration
tree. The search can be launcher from an instance or any node of a
configuration tree. Getting to searched target can be manual or
automatic (with call-backs provided by user)
2006-03-21 Dominique Dumont
* Makefile.PL: Changed grammar pre-compilation to add a "1;" at
the end of ValueFormulaParser.pm (Makes Windows happy)
2006-03-16 Dominique Dumont v0.503
* Makefile.PL (MY::postamble): Corrected CPAN dependencies