mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
which was missing.
- fixed a formatting error in the POD documentation.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@36 be1acefe-a474-0410-9a34-9b3221f2030f
421 lines
17 KiB
Plaintext
421 lines
17 KiB
Plaintext
2.10 - added -StrictVars documentation section to the POD,
|
||
which was missing.
|
||
|
||
- fixed a formatting error in the POD documentation.
|
||
|
||
2.09 - added bugfix in '#' comment parsing. If current state
|
||
was within a block, then /^ #/ was not ignored as
|
||
comment but instead added as variable. Reported by
|
||
Lupe Christoph <lupe@lupe-christoph.de>
|
||
|
||
- added -StrictObjects parameter support in the following
|
||
::Extended methods: hash() and value().
|
||
|
||
- added better parameter checks in the ::Extended::obj()
|
||
method. Its now no more possible to create a new (sub-)
|
||
object from an undefined key or a key which does not
|
||
point to a hash reference.
|
||
|
||
- simplified storing of ConfigFile and ConfigHash in new()
|
||
removed my variable $configfile.
|
||
|
||
- the original parameter list will now be saved, which is
|
||
required for ::Extended to create new objects with the
|
||
same config as their parents.
|
||
|
||
2.08 - added option -StrictVars, which causes Interpolate.pm to
|
||
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...
|
||
|
||
2.07 - fixed cpan bugid #1351, SaveConfig contained a deprecated
|
||
function call which caused the module to croak.
|
||
- added feature request, if in extended mode (OOP turned
|
||
on with -ExtendedAccess => 1 access to non-existent keys
|
||
caused a croak. While this is still the default behavior
|
||
it is now possible to turn this off using -StrictObjects => 0.
|
||
- added this to the related pod section in ::Extended.
|
||
- fixed bug in new() which caused a couple of errors
|
||
if the ConfigFile parameter is not set, or is set to
|
||
undef. In this case it will now simply create an empty
|
||
object.
|
||
- fixed related bug in save_file() which will save "" to
|
||
a file now if the config is uninitialized (i.e. the case
|
||
mentioned below arrived).
|
||
|
||
2.06 - added -SplitPolicy, -SplitDelimiter and -StoreDelimiter
|
||
- removed whitespace support in keys in the default parser
|
||
SplitPolicy 'guess', which was introduced in 2.02. Now
|
||
I (re-)use the old regex I used before. if you need
|
||
whitespaces in keys, use 'equalsign' as SplitPolicy.
|
||
- the write_scalar() method uses the StoreDelimiter for
|
||
separating options from values.
|
||
- added -CComments to make it possible to turn c-comment
|
||
parsing off.
|
||
- added support for FileHandle objects as parameter to the
|
||
-ConfigFile parameter. This makes it possible to use locking.
|
||
|
||
2.05 - fixed bug in ::Extended. It exported for some weird
|
||
reason I cant remember all of its methods. This included
|
||
keys() exists() and delete(), which are perl internals.
|
||
If one used keys() on a normal hash, then the ::Extended
|
||
own keys() were used instead of perls own one. I removed
|
||
the export line.
|
||
|
||
2.04 - added RFE from rt.cpan.org (ID: 1218). the ::Interpolate
|
||
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.
|
||
|
||
2.03 - fixed bug in the _parse() routine (better: design flaw).
|
||
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.
|
||
|
||
2.02 - added patch by Jens Heunemann, which allows to use
|
||
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).
|
||
|
||
|
||
2.01 - added -ConfigFile (in replace for -file) and
|
||
-ConfigHash (in replace for -hash) to get a consistent
|
||
parameter naming scheme. The old names are still
|
||
supported for backward compatibility, but no more
|
||
documented.
|
||
|
||
- the parameter -BaseHash has been dropped because
|
||
-DefaultConfig already has the capabilities of
|
||
defining a custom backing hash. The pod section for
|
||
-DefaultConfig has been enhanced to reflect this.
|
||
|
||
- README changed something. Removed the 'small' keyword,
|
||
because the module isn't really small anymore :-)
|
||
At least IMHO.
|
||
|
||
2.00 - fixed a bug in the ::Extended::keys() method, which
|
||
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.
|
||
|
||
1.36 - simplified new() parameter parsing, should be now a little
|
||
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.
|
||
|
||
|
||
|
||
1.35 - the here-doc identifier in saved configs will now created
|
||
in a way which avoids the existence of this identifier
|
||
inside the here-doc, which if it happens results in
|
||
weird behavior in the resulting config.
|
||
|
||
1.34 - Danial Pearce <danial@infoxchange.net.au> reported a bug
|
||
in _store(), which caused the module to create scalar
|
||
entries even if the entry contained newlines. While
|
||
Danial supplied a patch to fix this - thx(TM) - I
|
||
did not apply it, because I "outsourced" this kind of
|
||
stuff to the subroutine _write_scalar(), see next.
|
||
|
||
- added internal methods _write_scalar() and _write_hash()
|
||
to simplify _store(), which did the same thing more
|
||
than once, which is a good time to create a sub which
|
||
does the job.
|
||
|
||
- fixed cut'n paste bug in General/Extended.pm reported by
|
||
Danial Pearce <danial@infoxchange.net.au>, which caused
|
||
Config::General::Extended::is_scalar() to return true even
|
||
when the key you pass in is an array.
|
||
|
||
- added new method Config::General::Extended::delete() suggested
|
||
by Danial Pearce <danial@infoxchange.net.au>, which deletes
|
||
the given key from the config.
|
||
|
||
1.33 - fixed bug in _parse_value() which caused perl to complain
|
||
with "Use of uninitialized value in..." if a value was
|
||
empty.
|
||
|
||
|
||
1.32 - *argl* ... I forgot Interpolated.pm, don't know how that
|
||
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().
|
||
|
||
1.31: - i'm such a moron ... I forgot to do a make clean
|
||
in 1.30, pf. So this is 1.31, which is clean.
|
||
|
||
1.30: - fixed typo, which made 1.29 unusable (undefined var %config)
|
||
- added code to check if unknown parameters to new()
|
||
has been supplied.
|
||
|
||
1.29:
|
||
- added 2 procedural functions ParseConf and SaveConf
|
||
- added new parameters -AutoTrue and -FlagBits
|
||
- added save_file() which replaces save(), which was
|
||
weird implemented. If the user only supplied a hash
|
||
as parameter to save(), then the first key was
|
||
used as the filename and the rest was used
|
||
as a config hash (which was then of an uneven size).
|
||
- save_file() takes now instead of a hash a hash-ref
|
||
and a filename. And the hashref is optional, since
|
||
the object already contains a complete hash.
|
||
- new method save_string() added, which returns the
|
||
ready generated string instead of writing it to
|
||
disk. The user can then save it himself.
|
||
- POD updated.
|
||
|
||
1.28:
|
||
- 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.
|
||
|
||
1.27: - "make test" complained about uninitialized value
|
||
in :146, which is now fixed.
|
||
|
||
1.26: - added filehandle capability to -file.
|
||
- 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.
|
||
|
||
1.25: - include statements are now case insensitive
|
||
- include statements may now also being used with
|
||
indentation(leading and following whitespaces are
|
||
allowed)
|
||
- changed the end here-doc regexp from .+? to \S+?
|
||
so " <<include..." works as expected (this was a bug, imo)
|
||
- added new option -IncludeRelative (idea contributed
|
||
by Valerio_Valdez Paolini <paolini@students.cs.unibo.it>
|
||
and Anton Luht <luht@ank.ru> :-)
|
||
This allows to include files from the location of
|
||
the configfile instead from the working directory.
|
||
|
||
1.24: - AllowMultiOptions printed out the value and not the
|
||
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).
|
||
|
||
1.23: - fixed bug, which removed trailing or leading " even
|
||
no matching " was there.
|
||
|
||
1.22: - added a new option to new(): -LowerCaseNames, which
|
||
lowercases all option-names (feature request)
|
||
|
||
1.21: - lines with just one "#" became an option array named
|
||
"#" with empty entries, very weird, fixed
|
||
|
||
1.20: - added an if(exists... to new() for checking of the
|
||
existence of -AllowMultiOptions.
|
||
- use now "local $_" because it caused weird results
|
||
if a user used $_ with the module.
|
||
|
||
1.19: - you can escape "#" characters using a backslash: "\#"
|
||
which will now no more treated as a comment.
|
||
- comments inside here-documents will now remain in the
|
||
here-doc value.
|
||
|
||
history logs 1.17+1.18 are lost in space :-(
|
||
|
||
older history logs (stripped from CVS):
|
||
|
||
revision 1.16
|
||
date: 2000/08/03 16:54:58; author: jens; state: Exp; lines: +4 -1
|
||
An jedes File eine Sektion
|
||
# Local Variables: ***
|
||
# perl-master-file: ../../webmin/index.pl ***
|
||
# End: ***
|
||
|
||
rangeh<EFBFBD>ngt, damit ich mit C-c d das debugging von jedem File aus
|
||
einschalten kann
|
||
(siehe mein .emacs file)
|
||
----------------------------
|
||
revision 1.15
|
||
date: 2000/08/01 09:12:52; author: tom; state: Exp; lines: +57 -68
|
||
added comments to _open() and _parse()
|
||
----------------------------
|
||
revision 1.14
|
||
date: 2000/07/31 18:07:12; author: tom; state: Exp; lines: +44 -19
|
||
added <<include ... >> capability
|
||
----------------------------
|
||
revision 1.13
|
||
date: 2000/07/16 18:35:33; author: tom; state: Exp; lines: +135 -10
|
||
added here-doc and multi-line feature, updated perlpod
|
||
----------------------------
|
||
revision 1.12
|
||
date: 2000/07/14 14:56:09; author: tom; state: Exp; lines: +2 -2
|
||
bug fixed, it did not ignore options inside c-comments with a # comment
|
||
@ the end of line
|
||
----------------------------
|
||
revision 1.11
|
||
date: 2000/07/14 11:26:04; author: tom; state: Exp; lines: +42 -6
|
||
added C-Style comments and allow also comments after a statement.
|
||
----------------------------
|
||
revision 1.10
|
||
date: 2000/07/12 14:04:51; author: tom; state: Exp; lines: +2 -1
|
||
i woas ned
|
||
----------------------------
|
||
revision 1.9
|
||
date: 2000/07/12 10:59:53; author: jens; state: Exp; lines: +5 -3
|
||
hehe :)
|
||
----------------------------
|
||
revision 1.8
|
||
date: 2000/07/12 10:43:20; author: tom; state: Exp; lines: +5 -2
|
||
fixed bug in getall(), which doubled %config if called more than onse.
|
||
----------------------------
|
||
revision 1.7
|
||
date: 2000/07/12 09:09:33; author: tom; state: Exp; lines: +22 -24
|
||
100% Apache Config complete ;-) it supports now "named blocks"!
|
||
----------------------------
|
||
revision 1.6
|
||
date: 2000/07/11 23:43:03; author: tom; state: Exp; lines: +72 -19
|
||
added named block support (<server holland>)
|
||
----------------------------
|
||
revision 1.5
|
||
date: 2000/07/11 20:49:47; author: tom; state: Exp; lines: +2 -2
|
||
typo in pod corrected
|
||
----------------------------
|
||
revision 1.4
|
||
date: 2000/07/11 17:07:04; author: tom; state: Exp; lines: +61 -7
|
||
a config file can now contain an option more than once and will be
|
||
returned as array
|
||
----------------------------
|
||
revision 1.3
|
||
date: 2000/07/07 11:27:38; author: cvs; state: Exp; lines: +2 -2
|
||
folgende Parameterform geht jetzt auch:
|
||
parameter= blabla
|
||
|
||
vorher musste man
|
||
parameter = blabla
|
||
schreiben
|
||
----------------------------
|
||
revision 1.2
|
||
date: 2000/07/04 13:21:12; author: tom; state: Exp; lines: +9 -4
|
||
added better failurehandling in case of missing block start/end statements
|
||
----------------------------
|
||
revision 1.1
|
||
date: 2000/07/04 12:52:09; author: tom; state: Exp;
|
||
implemented module and method getall, works as expected.
|
||
|