- 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
- fixed bug with not working -IncludeRelative setting when
including a config file. It were only included from the
location relative to the underlying config if it were
non-existent. reported by Dmitry Koteroff <dmitry@koteroff.ru>.
- applied patch by Danial Pearce <danial@infoxchange.net.au>
which adds the -BackslashEscape parameter to enable
general escaping of special characters using the
backslash.
- fixed bug reported by Harold van Oostrom <cpan@lanceerplaats.nl>:
according to the documentation one can call new() with
a hash-ref as its single parameter which would then
used as the config. This didn't work and were fixed.
- added feature suggested by Eric Andreychek <eric@openthought.net>:
now block statements like this are allowed: "<directory blah/>"
which is called an explicit empty block. This generates just
an empty hash-ref and saves writing. In fact, internally it
will be converted to:
<directory blah>
</directory>
- fixed Makefile.PL: it cleans now files generated by 'make test'
properly. reported by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
- updated MANIFEST (in fact I did this some years ago the last time!)
also reported by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@51 be1acefe-a474-0410-9a34-9b3221f2030f
- fixed Bug #3869 (rt.cpan.org) reported by
"Mike Depot" <mdepot@comcast.net>
- applied patch by Roland Huss <Roland.Huss@consol.de>,
which fixes a bug with the -Tie option, sub-hashes of
named blocks were not properly created (in fact, not
tied).
- added documentation to Interpolated.pm that it does not
interpolate variables in keys, see bug #3773 (rt.cpan.org).
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@50 be1acefe-a474-0410-9a34-9b3221f2030f
- applied patch by Michael Gray <mjg17@eng.cam.ac.uk> which
fixes a bug in the Interpolate.pm submodule. A second variable,
when immediately following the first, did not get interpolated,
i.e. ${var1}${var2}.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@42 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
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
Peter Sergeant <pete@clueball.com> reported this
mis-behavior. The problem was that the whole hash
was feeded to ::Interpolated.pm, but as we all
know, perl hashes doesn't preserve the order. So,
in our case the module sometimes was unable to
resolve variablenames, because they were stored
in a different location as it occured in the config.
The change is, that Config::General now calls
::Interpolate.pm (new sub: _interpolate()) itself
directly on a per-key/value pair basis. The internal
varstack is now stored on $this globally. So, now
a variable will be known when it occurs. period :-
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@37 be1acefe-a474-0410-9a34-9b3221f2030f
ignore undefined variables and replaces such occurences
with the emppty string.
- applied patch by Stefan Moser <sm@open.ch>, which fixes
some weird bevavior if -MergeDuplicateOptions was turned
on, the parser croaked regardless -MergeDuplicateBlocks
was set or not. Now the two options behave almost independent
from each other, which allows one to merge duplicate
blocks but duplicate options not.
- changed behavior of setting -MergeDuplicateOptions which
implied in previous versions -AllowMultiOptions to be
false. Now this will only be done if the user does not
set -AllowMultiOptions by himself. This allows one to
have duplicate blocks which will be turned into an
array but duplicate options to be merged.
- applied patch by Matthias Pitzl <matthias@izb.net>, which
fixes a bug at parsing apache-like include directive
(Include ...). It did not properly trim unnecessary whitespaces
so that the filename to be included became invalid. This
bug espessially occurred if one saved a hash containing
a key/value pair like this: "Include" => "/etc/grs.cfg",
which was then saved as "Include /etc/grs.cfg", the
parser returned " /etc/grs.cfg" which, of course, does
not exists. odd...
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@34 be1acefe-a474-0410-9a34-9b3221f2030f
module populates now uses of uninitialized variables in
config files itself instead of just letting perl die().
The other suggestion of the RFE was declined.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@30 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
caused a beloved "use of uninitialized ..." message.
Reported by Danial Pearce <danial@infoxchange.net.au>.
- Removed all deprecated methods (in fact, they are still
there for shouting out a warn that its deprecated. But
the pod sections are removed. These are NoMultiOptions()
and save().
- added two new parameters to new(): -InterPolateVars and
-ExtendedAccess, which allows one to use the functionalites
of the supplied submodules without the need to decide
for one of them. This makes it possible to use variable
interpolation and oop access in the same time. Suggested
by Jared Rhine <jared@wordzoo.com>.
- added new parameter -BaseHash which makes it possible
to supply your own hash which stores the parsed contents
of the config. This can be a tied hash o the like.
Suggested by Jared Rhine <jared@wordzoo.com> too.
- switched to release 2.00 because the above is a major
change.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@26 be1acefe-a474-0410-9a34-9b3221f2030f
- added contributed sub module Config::General::Interpolated
by "Wei-Hon Chen" <plasmaball@pchome.com.tw> with
help from "Autrijus Tang" <autrijus@autrijus.org>
which makes it possible to use variables inside
config files.
- _read() accepts now c-comments inside c-comments if
they are on a single line.
- _read() is now more tolerant to here-identifiers
(the ends of here-docs), whitespaces right after
such an identifier are allowed (i.e. "EOF ").
- _read() does now behave somewhat different with
C-comments, they will be the first thing being
processed in a config, so the parser really
ignores everything inside C-comments. Previously
it did not do that, for example here-docs has
not been ignored.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@16 be1acefe-a474-0410-9a34-9b3221f2030f