AgeCommit message (Collapse)AuthorFiles
2019-08-28Version 1.05HEADv1.05masterSergey Poznyakoff2
2019-08-28Add new testcaseSergey Poznyakoff1
2019-08-28Re-implement case-insensitive lookupsSergey Poznyakoff10
* lib/Config/ (new): Use the lexicon method to store the new lexicon. Create the root node. (root,mangle_key): New method. (lexicon): Deep-copy the passed lexicon and preprocess its keys using the _clone_lexicon method. (_clone_lexicon): Auxiliary method for lexicon. (describe_keyword): New method. (all methods): Pass the "$self" argument to the Config::AST::Node::Section constructor calls. (add_node): Preprocess key names using mangle_key. (DESTROY): Destroy the tree to break circular references. * lib/Config/AST/ New file. * lib/Config/AST/Node/ (new): First argument is mandatory: a reference to the root node or the owning Config::AST object. (is_leaf,is_section): Provide definitions. (root): New method. (subtree): Use root->mangle_key to prepare the lookup key. * lib/Config/AST/ (is_section): Return 0 * lib/Config/AST/Node/ Likewise. * t/02conf01.t: The "root" name is now reserved and cannot be used in direct addressing. * t/02merge.t: Pass obligatory argument to the Config::AST::Node::Section constructor. * lib/Config/AST/ Use L<> for cross-references. * lib/Config/AST/Node/ Likewise.
2019-08-27Provide overloads for the Follow classSergey Poznyakoff1
* lib/Config/AST/ Provide overloads
2019-08-27Version 1.04v1.04Sergey Poznyakoff2
2019-08-27Two auxiliary methodsSergey Poznyakoff1
* lib/Config/ (error_count,success): New methods.
2019-08-27Declare DESTROY in Null (follow-up to 058e552b)Sergey Poznyakoff1
* lib/Config/AST/Node/ (DESTROY): Add method.
2019-08-27Improve commit / lint APISergey Poznyakoff1
* lib/Config/ (commit): Take optional keyword arguments. (lint): The argument (reference to a lexicon) is optional.
2019-08-27Provide DESTROY method along with AUTOLOADv1.03Sergey Poznyakoff3
2019-08-23Version 1.02v1.02Sergey Poznyakoff7
2019-08-23Rewrite direct access engineSergey Poznyakoff6
This changes the syntax of direct addressing. To access the node a.b.c, one can simply write $cfg->a->b->c Node names cannot coincide with existing method names, as the latter will take precedence. * lib/Config/ (AUTOLOAD): Bootstrap direct addressing mechanism. * lib/Config/AST/ New module. * lib/Config/AST/Node/ (AUTOLOAD): Remove. * t/01conf12.t: Use new direct addressing syntax. * t/02conf01.t: Likewise. * lib/Config/AST/Node/ Use fallback instead of explicitly overloading particular operators.
2019-08-22Overload operators for Value and Null classesSergey Poznyakoff9
* lib/Config/AST/Node/ Rewrite overloads. * lib/Config/AST/Node/ Likewise. * t/03ovr.t: New test. * t/01conf06.t: Remove unused dependencies. * t/01conf07.t: Likewise. * t/01conf13.t: Likewise. * t/01conf14.t: Likewise. * t/02conf01.t: Likewise. * t/02merge.t: Likewise.
2019-08-20Fix repository URLv1.01Sergey Poznyakoff3
2019-08-20Version 1.0v1.00Sergey Poznyakoff5
* Changes: New file. * LICENSE: New file. * README: New file. * lib/Config/ Update docs.
2019-08-20Minor fixSergey Poznyakoff1
* lib/Config/ Fix the misguiding documentation
2019-08-19New method: lexicon.Sergey Poznyakoff1
2018-07-10Write PODSergey Poznyakoff7
2018-07-10Rename to Config::ASTSergey Poznyakoff19
2018-07-09Switch to Text::Locus instead of the local versionSergey Poznyakoff10
* lib/Config/Tree/ Remove. * t/00locus.t: Remove. * Makefile.PL: Require Text::Locus * lib/Config/ Use Text::Locus * lib/Config/Tree/ Likewise. * lib/Config/Tree/Node/ Likewise. * lib/Config/Tree/Node/ Likewise. * t/01conf10.t: Likewise. * t/02merge.t: Likewise. * t/ Likewise.
2018-05-05Rewrite the value method of Node::Value.Sergey Poznyakoff6
* lib/Config/ (get): Simplify. Context dependency moved to Value. (canonical): New method. * lib/Config/Tree/ (canonical): New method. * lib/Config/Tree/Node/ (value): In list context, return dereferenced value (if appropriate). * t/02merge.t: Use the canonical method. * t/ (canonical): Rewrite using method from the superclass.
2018-05-04BugfixSergey Poznyakoff1
* lib/Config/ (add_node): untaint always returns undef
2018-05-04Implement as_hash in Config::Tree::Node::SectionSergey Poznyakoff3
* lib/Config/ (add_node): Untaint values that matched re or passed the check function. (as_hash): Delegate to tree->as_hash * lib/Config/Tree/Node/ (as_hash): New method. * t/01conf12.t: Test Section::as_hash.
2018-05-04Implement "direct addressing"Sergey Poznyakoff6
An experimental feature that allows the programmer to access configuration settings as if they were methods of the configuration class. E.g. the following setting 45 can be accessed as $cfg->tree->Foo->Bar->Baz (Keyword names are capitalized to help distinguish them from the regular methods. Also a dash in the setting name should be represented as __ when using it as a method. Thus 'temp-dir' would become Temp__dir). * lib/Config/ (subtree): New method. * lib/Config/Tree/ (is_leaf, is_null): New methods. Overload bool, eq, and "". * lib/Config/Tree/Node/ New module. * lib/Config/Tree/Node/ Implement AUTOLOAD for accessing settings as methods. * lib/Config/Tree/Node/ Implement as_string.
2018-01-22Improve error checkingSergey Poznyakoff20
* lib/Config/ Use add_locus for location aggregation. (add_node): Catch uses of values where sections are expected. * lib/Config/Tree/ (locus): Create empty locus if none was set explicitly. * lib/Config/Tree/Node/ (merge): New method. * t/01conf15.t: New testcase. * t/02merge.t: New testcase. * t/*.t: Reorder tests.
2018-01-20Add more filesSergey Poznyakoff3
2018-01-20Catch more errors.Sergey Poznyakoff5
Detect undefined mandatory sections declared via intermediate wildcards (e.g. load.*.param). * lib/Config/ (error): Change the check for locus. (_fixup): catch more errors. (flatten): Rewrite via Node->flatten. * lib/Config/Tree/ (flatten): New method. * t/ Minor fix. * t/conf13.t: New testcase. * t/conf14.t: New testcase.
2018-01-17Implement as_hash method. Assorted fixes.Sergey Poznyakoff5
2017-12-03Implement add_node and add_value methodsSergey Poznyakoff3
2017-12-03Initial commitSergey Poznyakoff19

Return to:

Send suggestions and report system problems to the System administrator.