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
This commit is contained in:
Thomas von Dein
2009-10-10 16:21:31 +00:00
parent d50bae5acf
commit 8a7ed54c44
7 changed files with 193 additions and 48 deletions

View File

@@ -24,7 +24,13 @@ use vars qw(@ISA @EXPORT);
use strict;
$Config::General::Extended::VERSION = "1.6";
$Config::General::Extended::VERSION = "1.7";
sub new {
croak "Deprecated method Config::General::Extended::new() called.\n"
."Use Config::General::new() instead and set the -ExtendedAccess flag.\n";
}
sub obj {
@@ -36,14 +42,14 @@ sub obj {
my($this, $key) = @_;
if (exists $this->{config}->{$key}) {
if (!$this->{config}->{$key}) {
return $this->new( () ); # empty object!
return $this->SUPER::new( -ExtendedAccess => 1, -ConfigHash => {} ); # empty object!
}
else {
return $this->new( $this->{config}->{$key} );
return $this->SUPER::new( -ExtendedAccess => 1, -ConfigHash => $this->{config}->{$key} );
}
}
else {
return $this->new( $this->{config} );
return $this->SUPER::new( -ExtendedAccess => 1, -ConfigHash => $this->{config} );
}
}
@@ -263,7 +269,7 @@ Config::General::Extended - Extended access to Config files
use Config::General;
$conf = new Config::General(
-file => 'configfile',
-ConfigFile => 'configfile',
-ExtendedAccess => 1
);
@@ -490,7 +496,7 @@ Thomas Linden <tom@daemon.de>
=head1 VERSION
1.6
1.7
=cut