19 Commits

Author SHA1 Message Date
217d61e51e [re-]added META.json 2025-01-08 09:00:48 +01:00
1c67c21412 sort MANIFEST and add CI test to test the tarball to avoid #5 2025-01-08 08:23:00 +01:00
Paul Walrath
e3216b2ee8 fix tests 2025-01-07 20:36:10 +00:00
Thomas von Dein
a49de35c81 fix rt.cpan.org#115326, added IFDefine support, fix POD indentation
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@111 be1acefe-a474-0410-9a34-9b3221f2030f
2016-07-08 08:46:02 +00:00
Thomas von Dein
7a48e048cf fixed rt.cpan.org#113671: recognize BOM at start of a utf8 file
fixed rt.cpan.org#112857: Same Line Closing Block Breaks Parser



git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@110 be1acefe-a474-0410-9a34-9b3221f2030f
2016-04-18 13:09:45 +00:00
Thomas von Dein
1875861621 added missing test include
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@107 be1acefe-a474-0410-9a34-9b3221f2030f
2015-10-23 06:57:23 +00:00
Thomas von Dein
176b3e91d2 fix rt.cpan.org#95325
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@101 be1acefe-a474-0410-9a34-9b3221f2030f
2014-05-04 13:27:01 +00:00
Thomas von Dein
045aed9c39 Splat with 2.45
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@74 be1acefe-a474-0410-9a34-9b3221f2030f
2010-04-08 15:47:22 +00:00
Thomas von Dein
b75401d426 2.42
- dist tarball for 2.41 missed t/Tie/LxHash.pm. Dammit.
          the File to the MANIFEST.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@68 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:46:05 +00:00
Thomas von Dein
e2819aa525 2.41
- 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
2009-10-10 16:45:27 +00:00
Thomas von Dein
f85e18462c 2.37
- "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
2009-10-10 16:42:58 +00:00
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
ef504ee7f4 2.29
- applied patch by brian@kronos.com via rt.cpan.org
	   #11211.
	
	 - applied patch by plasmaball@pchome.com.tw via
	   rt.cpan.org #5846

	 - added new files to MANIFEST file.

 	 - added example.cfg to show the config format.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@55 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:32:11 +00:00
Thomas von Dein
8f517dd929 2.25
- 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
2009-10-10 16:30:01 +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
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
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