Commit Graph

15 Commits

Author SHA1 Message Date
Thomas von Dein
d50bae5acf 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@27 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:20:41 +00:00
Thomas von Dein
76502a240e i 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@26 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:20:14 +00:00
Thomas von Dein
c3eced799c 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@25 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:19:00 +00:00
Thomas von Dein
cbe885c7b9 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@24 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:18:30 +00:00
Thomas von Dein
31144f9e4f 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@23 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:18:02 +00:00
Thomas von Dein
0073500add 1.33 - fixed bug in _parse_value() which caused perl to complain
with "Use of uninitialized value in..." if a value was
	   empty.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@22 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:17:43 +00:00
Thomas von Dein
f9c0a5a8f3 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(). 


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@21 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:17:24 +00:00
Thomas von Dein
c9f8ce58b0 i 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@19 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:15:53 +00:00
Thomas von Dein
2ae16df3ad 1.30: - fixed typo, which made 1.29 unusable (undefined var %config)
- added code to check if unknown parameters to new()
	   has been supplied.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@18 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:15:02 +00:00
Thomas von Dein
5dabbe586a 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@17 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:14:41 +00:00
Thomas von Dein
b906f49050 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@16 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:14:18 +00:00
Thomas von Dein
2c5ee3d876 1.27: - "make test" complained about uninitialized value
in :146, which is now fixed.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@15 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:13:50 +00:00
Thomas von Dein
60c541d1c0 i 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@14 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:12:40 +00:00
Thomas von Dein
dd1ed568a1 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.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@13 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:11:48 +00:00
Thomas von Dein
95195c0038 i 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).


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@12 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:11:25 +00:00