- fixed rt.cpan.org#61302, now croak if the config file
parameter is a directory and directory include is not
turned on.
- fixed rt.cpan.org#60429 META.yml typo
- added new option -AllowSingleQuoteInterpolation, which
turns on interpolation for variables inside single quotes.
- added test case for the new option
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@91 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#40925, $indichar replaced by internal
configuration variable EOFseparator, which contains
a 256 bit SHA checksum of the date I fixed the bug.
This will prevent future conflicts hopefully. In addition
it makes it possible to make it customizable, if neccessary,
in a future release.
- fixed rt.cpan.org#42721, return undef for empty values
- fixed rt.cpan.org#42331, return undef for empty objects
- fixed rt.cpan.org#44600, comments after blockname
causes parser failure.
- fixed rt.cpan.org#42287, whitespace at beginning or end
of a quoted value gets lost after save().
- fixed rt.cpan.org#46184, variables that were not previously
defined are deleted when -InterPolateEnv is enabled.
- fixed bug in config loader for FileHandle objects, it
supports now any compatible object. Hint by Ingo Schmiegel.
- applied spelling- and speedup patches by Ville Skyttä.
- applied documentation patch by Jordan Macdonald.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@69 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#38635. apache-like include now supports
quoted strings.
- fixed rt.cpan.org#41748. saving config with -tie enabled
now keeps the tie as documented.
- added unit test for -tie. For this to work, a copy of
Tie::LxHash module is delivered with Config::General
source, but will not installed, in fact, it is only
used for 'make test' (number 50)
- fixed rt.cpan.org#39159. documentation of functional interface
now reflects that qw$method) is now required.
- applied patch by AlexK fixing rt.cpan.org#41030:
if files are included by means of a glob pattern having the -IncludeGlob
option activated, paths specified by the -ConfigPath option are being
neglected when trying to spot the files. This patch fixes this
- applied patch by fbicknel, fixes rt.cpan.org#41570:
An array of scalars (eg: option = [1,2,3]) cannot
be used for interpolation (which element shall we use?!), so
we ignore those types of lists and don't build a __stack for them.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@67 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed SplitDelimiter parser regex, it does no more consider
non-whitespaces (\S+?) as the option name but anything
before the delimiter (.+?), this fixes bug rt.cpan.org#36607,
the fix of 2.39 were not sufficient. Thanks to
Jeffrey Ratcliffe for pointing it out.
- added new parameter -SaveSorted. The default value is 0,
that means configs will be saved unsorted (as always),
however if you want to save it sorted, turn this parameter
to 1. Thanks to Herbert Breunung for the hint.
- added complexity test, which checks a combination
of various complex features of the parser.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@66 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#35122. This one was one of the most
intriguing bugs I've ever observed in my own code. The
internal temporary __stack hashref were copied from one
subhash to another to enable inheritance of variables.
However, the hashes were copied by reference, so once a
value changed later, that value were overwritten because
the __stack in question were just a reference. I introduced
a simple function _copy() which copies the contents of
the __stack by value, which solved the bug.
Conclusion: beware of perl hash refs!
- fixed rt.cpan.org#36607, accept whitespaces in heredoc
names if split delimiter is gues (equalsign or whitespace)
- fixed rt.cpan.org#34080 (typo)
- fixed rt.cpan.org#35766. Variables inside single quoted
strings will no more interpolated (as the docu states).
Also added test case for this.
- fixed bug rt.cpan.org#33766. Checking for defined not true
in ::Extended::AUTOLOAD().
- added -UTF8 flag, which opens files in utf8 mode
(suggested by KAORU, rt.cpan.org#35583)
I decided not to add a test case for this, since perls
utf8 support is not stable with all versions.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@65 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#31529 variable inheritance failed
with multiple named blocks.
- fixed rt.cpan.org#33447, regex to catch variable
names were too strict, now - . + or : are allowed too.
- fixed rt.cpan.org#33385 and #32978 - using arrayrefs
as param to -String didn't work anymore (sic)
- fixed rt.cpan.org#33216 - variable stack were not properly
re-constructed for pre-existing variables if
-MergeDuplicateOptions is turned on.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@64 be1acefe-a474-0410-9a34-9b3221f2030f
- "fixed" rt.cpan.org#30199 - check for invalid and
unsupported structures, especially mixing blocks
and scalars with identical names.
- added checks to 'make test' to test for the above
checks.
- revoked patch of rt.cpan.org#27225, it broke running
code.
- fixed rt.cpan.org#30063 (and #27225!) by reimplementing
the whole interpolation code. The internal stack is
no more a class variable of the module but stored
directly within the generated config hash and cleaned
before returning to the user.
- added (modified) patch rt.cpan.org#30063 to check
if interpolation works with supplied default config
works.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@63 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#27271 - removed output file from
manifest.
- fixed rt.cpan.org#27225 - clear vars off the stack
if entering a new block, so old vars get not re-used.
- fixed rt.cpan.org#27110 - re-implemented support
for arrayref as -String parameter.
- fixed rt.cpan.org#24155 - relative include bug fixed.
- applied patch by GWYN, (see fixed rt.cpan.org#27622)
which allows the same file included multiple times.
there is no loop detection if turned on. new option
introduced: -IncludeAgain => 1 (default turned off).
- added support for -IncludeAgain to directory include
code too.
- the directory globbing code used slashes to join
directory and file names. changed this to use catfile()
instead.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@60 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed rt.cpan.org#24232 - import ENV vars only if defined
- fixed rt.cpan.org#20742 - dont' overwrite a var if re-defined
in current scope, interpolation failed for re-defined vars and used
the value of the var defined in outer scope, not the current one.
- fixed rt.cpan.org#17852 - a 0 as blockname were ignored. applied
patch by SCOP to t/run.t to test for 0 in blocks.
- applied most hints Perl::Critic had about Config::General:
o the functions ParseConfig SaveConfig SaveConfigString must
now imported implicitly. This might break existing code, but
is easily to fix.
o using IO::File instead of open().
o General.pm qualifies for "stern" level after all.
- added much more tests to t/run.t for 'make test'.
- using Test::More now.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@58 be1acefe-a474-0410-9a34-9b3221f2030f
- applied patches by Jason Rhinelander <jagerman@jagerman.com>:
o bugfix: multiple levels if include files didn't
work properly.
o new option -IncludeDirectories, which allows
to include all files of a directory. The directory
must be specified by -ConfigFile as usual.
o new option -IncludeGlob, which allows to
use globs (wildcards) to include multiple files.
o -ConfigPath can be speciefied using a single
scalar value instead of an array if there is only
one path.
o bugfix: quotes from quoted block names were
not removed properly.
o fixes and updates for tests (make test) for
the above patches.
Thanks a lot Jason.
- fixed number of tests in run.t
- applied suggestion by Eric Kisiel <eric.kisiel@adelphia.com>:
::Extended::keys() returns an empty hash if the
referring object is not hash.
- fixed bug #14770, "Use of uninitialized value.." during
environment variable interpolation.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@57 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed bug in save(), now blocks containing whitespaces
will be saved using quotes, in addition the parser observes
the quoting feature, added portion about this to the pod
doc. pointed out by Jeff Murphy <jcmurphy@jeffmurphy.org>.
- added internal list of files opened so far to avoid
reading in the same file multiple times.
Suggested by Michael Graham.
- added new method files() which returns the above list.
- added workaround for foolish perl installation on
debian systems (croak() doesn't work anymore as of
5.8.4, it's a shame!)
- applied patch by Michael Graham which fixes IncludeRelative
feature, now an included file is being included relative
to the calling config file, not the first one.
- added 'make test' targets for files() and include
stuff. (by Michael too)
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@54 be1acefe-a474-0410-9a34-9b3221f2030f
- applied patch by Robb Canfield <robb@canfield.com>,
which fixes a bug in the variable interpolation
scheme. It did not interpolate blocks nor
blocknames. This patch fixes this. Patch slightly
modified by me(interpolation on block and blocknames).
- enhanced test for variable interpolation to
reflect this.
- added check if a named block occurs after the underlying
block is already an array, which is not possible.
perl cannot add a hashref to an array. i.e.:
<bl>
a = 1
</bl>
<bl>
b = 1
</bl>
<bl blubber>
c = 1
</bl>
As you can see, "<bl>" will be an array, and "blubber"
cannot be stored in any way on this array.
The module croaks now if such construct occurs.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@41 be1acefe-a474-0410-9a34-9b3221f2030f
<folarte@peoplecall.com>, which caused _parse to
ignore blocks with the name "0":
<0> .. </0>, because it checked just if $block (the name
between < and >) is true, and from the perl point
of view "0" is not. Changed it to check for defined.
Normally I avoid using 'defined' but in this case
it will not be possible that $block contains the
empty string, so defined is ok here.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@40 be1acefe-a474-0410-9a34-9b3221f2030f
by the -DefaultConfig parameter was ignored by
the new interpolation code, this has been fixed.
- fixed another bug in the new interpolation code,
which made variable global, the variable scope
were ignored. Now a special constructed hash
exists, which makes sure, that variables only
valid within its correct scope.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@38 be1acefe-a474-0410-9a34-9b3221f2030f
after the last patch for allowing whitespaces in
option names, it had a problem with here-docs which
contained equal signs. option/value splitting resulted
in weird output.
- as a side effect of the bug fix below it is now
possible to use equal signs inside quoted values, which
will then be ignored, thus not used for splitting
the line into an option/value assignment.
- added a new test, which tests for all possible notations
of option/value lines.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@29 be1acefe-a474-0410-9a34-9b3221f2030f
whitespaces in option names.
- changed the save() calls in the test script (t/run.t)
to save_file()
- removed new() from ::Interpolated and ::Extended.
This may break existing code (they will need to
move to the flags of Config::General::new() ), but
this decision must be made. The problem was that
both the old way of directly using the subclasses
and the enw way did not work together. So, now
subclasses are only method holders and used by
Config::General on request. Direct use of subclasses
is prohibited. (you receive a warning if you do).
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@28 be1acefe-a474-0410-9a34-9b3221f2030f
bit better to understand.
- added new parameter -DefaultConfig, which can hold a hashref
or a string, which will be used to pre-define values
of the resulting hash after parsing a config.
Thanks to Mark Hampton <mark.hampton@qualis.com> for the
suggestion.
- added new parameter -MergeDuplicateOptions, which allows
one to overwrite duplicate options, which is required,
if you turn on -DefaultConfig, because otherwise a
array would be created, which is probably not what you
wanted.
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::Extended::keys(), which allows to
retrieve the keys of the object itself (which was not
directly possible before)
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::Extended::value(), which allows to
set a value to a (perlish-) nontrue value. This was a
bug.
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::_parse_value, which fixes a bug in
this method, which in prior versions caused values of
"0" (zero digit) to be wiped out of the config.
- added tests in t/run.t for the new default config feature.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@25 be1acefe-a474-0410-9a34-9b3221f2030f
could happen, in 1.29 it was "lost". However -
I added it again now.
- added patch by Peder Stray <peder@linpro.no> to
the _store() method, which makes it possible to catch
arrays of hashes to be stored correctly.
- cleaned up the t/run.t testscript to reflect the
changes (in fact I did not touch it since 1.18 or so).
- added test number 16 to test variable interpolation
using ::Interpolated in t/run.t.
- fixed bug with new() parameter -AllowMultiOptions which
generated a croak() if set to something other than "no".
- changed Extended::save() to reflect the API change,
it calls now save_file().
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@21 be1acefe-a474-0410-9a34-9b3221f2030f
- added -String parameter to new(), which allows
one to supply the whole config as a string.
- added -MergeDuplicateBlocks option, which causes
duplicate blocks to be merged.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@14 be1acefe-a474-0410-9a34-9b3221f2030f
option itself, if more than one of this particular
option occured.
- added -UseApacheInclude feature, contributed by
Thomas Klausner <domm@zsi.at>
- fixed bug with multiple options stuff, which did not
work with blocks or named blocks. Pointed out by
Thomas Klausner <domm@zsi.at>, who meant it being
feature request, but in fact it was a bug (IMHO).
- Config::General does now contain also it's OO-sister
Config::General::Extended, which is from now on
no more available as an extra module, because it
lived a shadowy existence.
- finally(!) created a Changelog file (this one, yes).
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@12 be1acefe-a474-0410-9a34-9b3221f2030f