Commit Graph

13 Commits

Author SHA1 Message Date
Thomas von Dein
0b78a916bb 2.34
- 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
2009-10-10 16:40:22 +00:00
Thomas von Dein
72fdf51f16 2.32
- 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
2009-10-10 16:38:28 +00:00
Thomas von Dein
80bcb7ddae 2.31
- 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
2009-10-10 16:36:29 +00:00
Thomas von Dein
c0eafd9b8f 2.28
- 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
2009-10-10 16:31:34 +00:00
Thomas von Dein
cc6bb346f7 2.14 - fixed bug reported by Francisco Olarte Sanz
<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
2009-10-10 16:26:19 +00:00
Thomas von Dein
39d25e3738 2.12 - fixed cpan bugid #1768, stuff inside a hash given
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
2009-10-10 16:25:41 +00:00
Thomas von Dein
f5ac2b6b75 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.


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


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@28 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:21:31 +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
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
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
Thomas von Dein
1ffbf95665 1.22: - added a new option to new(): -LowerCaseNames, which
lowercases all option-names (feature request)


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




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