- 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
This commit is contained in:
Thomas von Dein
2009-10-10 16:36:29 +00:00
parent 57244f6eea
commit 80bcb7ddae
10 changed files with 251 additions and 58 deletions

View File

@@ -1,7 +1,7 @@
#
# Config::General::Extended - special Class based on Config::General
#
# Copyright (c) 2000-2005 Thomas Linden <tom@daemon.de>.
# Copyright (c) 2000-2006 Thomas Linden <tom@daemon.de>.
# All Rights Reserved. Std. disclaimer applies.
# Artificial License, same as perl itself. Have fun.
#
@@ -23,7 +23,7 @@ use vars qw(@ISA @EXPORT);
use strict;
$Config::General::Extended::VERSION = "2.01";
$Config::General::Extended::VERSION = "2.02";
sub new {
@@ -225,7 +225,12 @@ sub keys {
#
my($this, $key) = @_;
if (!$key) {
return map { $_ } keys %{$this->{config}};
if (ref($this->{config}) eq "HASH") {
return map { $_ } keys %{$this->{config}};
}
else {
return ();
}
}
elsif (exists $this->{config}->{$key} && ref($this->{config}->{$key}) eq "HASH") {
return map { $_ } keys %{$this->{config}->{$key}};
@@ -571,7 +576,7 @@ values under the given key will be overwritten.
=head1 COPYRIGHT
Copyright (c) 2000-2005 Thomas Linden
Copyright (c) 2000-2006 Thomas Linden
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -589,7 +594,7 @@ Thomas Linden <tom@daemon.de>
=head1 VERSION
2.01
2.02
=cut

View File

@@ -2,13 +2,13 @@
# Config::General::Interpolated - special Class based on Config::General
#
# Copyright (c) 2001 by Wei-Hon Chen <plasmaball@pchome.com.tw>.
# Copyright (c) 2000-2005 by Thomas Linden <tom@daemon.de>.
# Copyright (c) 2000-2006 by Thomas Linden <tom@daemon.de>.
# All Rights Reserved. Std. disclaimer applies.
# Artificial License, same as perl itself. Have fun.
#
package Config::General::Interpolated;
$Config::General::Interpolated::VERSION = "2.06";
$Config::General::Interpolated::VERSION = "2.07";
use strict;
use Carp;
@@ -92,6 +92,9 @@ sub _interpolate {
elsif ($this->{InterPolateEnv}) {
# may lead to vulnerabilities, by default flag turned off
$con . $ENV{$var};
if (defined($ENV{$var})) {
$con . $ENV{$var};
}
}
else {
if ($this->{StrictVars}) {
@@ -294,7 +297,7 @@ L<Config::General>
=head1 COPYRIGHT
Copyright 2001 by Wei-Hon Chen E<lt>plasmaball@pchome.com.twE<gt>.
Copyright 2002-2004 by Thomas Linden <tom@daemon.de>.
Copyright 2002-2006 by Thomas Linden <tom@daemon.de>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -303,7 +306,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
=head1 VERSION
2.06
2.07
=cut