- fixed bug reported by Stefano di Sandro <stedis@ulis.it>: in
 	   OOP mode (extended access) the obj() method returned the whole
	   config object if the given key does not exist. Now it returns
	   a new empty object.

	 - added patch by David Dick <david_dick@iprimus.com.au> which
	   sets $/ if it is unset.

	 - added patch by David Dick <david_dick@iprimus.com.au> which
	   calls the binmode() function in case the modules is being
	   used under win32 systems. Read perldoc -f binmode for more
	   informations on this issue.

	 - added feature suggested by Chase Phillips <cmp@uiuc.edu>:
	   the new() method has a new parameter -Tie which takes the
	   name of a Tie class that each new hash should be based off
	   of. This makes it possible to create a config hash with
	   ordered contents across nested structures.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@46 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:28:06 +00:00
parent 66621adfb8
commit 8167848582
4 changed files with 114 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
#
# Config::General::Extended - special Class based on Config::General
#
# Copyright (c) 2000-2001 Thomas Linden <tom@daemon.de>.
# Copyright (c) 2000-2003 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 = "1.9";
$Config::General::Extended::VERSION = "1.10";
sub new {
@@ -54,7 +54,8 @@ sub obj {
}
}
else {
return $this->SUPER::new( -ExtendedAccess => 1, -ConfigHash => $this->{config}, %{$this->{Params}} );
# even return an empty object if $key does not exist
return $this->SUPER::new( -ExtendedAccess => 1, -ConfigHash => {}, %{$this->{Params}} );
}
}
@@ -521,7 +522,7 @@ values under the given key will be overwritten.
=head1 COPYRIGHT
Copyright (c) 2000-2002 Thomas Linden
Copyright (c) 2000-2003 Thomas Linden
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -539,7 +540,7 @@ Thomas Linden <tom@daemon.de>
=head1 VERSION
1.9
1.10
=cut