bumb 2.53, couple of small fixes, spelling fixes.

git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@98 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2014-04-30 12:17:56 +00:00
parent 62ed80bef2
commit 010403fd8a
5 changed files with 65 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
#
# Config::General::Extended - special Class based on Config::General
#
# Copyright (c) 2000-2013 Thomas Linden <tlinden |AT| cpan.org>.
# Copyright (c) 2000-2014 Thomas Linden <tlinden |AT| cpan.org>.
# All Rights Reserved. Std. disclaimer applies.
# Artistic License, same as perl itself. Have fun.
#
@@ -23,7 +23,7 @@ use vars qw(@ISA @EXPORT);
use strict;
$Config::General::Extended::VERSION = "2.06";
$Config::General::Extended::VERSION = "2.07";
sub new {
@@ -314,7 +314,17 @@ sub configfile {
return $this->{configfile};
}
sub find {
my $this = shift;
my $key = shift;
return undef unless $this->exists($key);
if (@_) {
return $this->obj($key)->find(@_);
}
else {
return $this->obj($key);
}
}
sub AUTOLOAD {
#
@@ -557,12 +567,36 @@ If no key name was supplied, then the keys of the object itself will be returned
You can use this method in B<foreach> loops as seen in an example above(obj() ).
=item delete ('key')
=item delete('key')
This method removes the given key and all associated data from the internal
hash structure. If 'key' contained data, then this data will be returned,
otherwise undef will be returned.
=item find(@list)
Given a list of nodes, ->find will search for a tree that branches in
just this way, returning the Config::General::Extended object it finds
at the bottom if it exists. You can also search partway down the tree
and ->find should return where you left off.
For example, given the values B<find (qw (A B C))> and the following
tree (</end> tags ommitted for brevity):
<A>
<FOO>
...
<B>
<BAZ>
...
<C>
BAR = shoo
B<find()> will find the object at I<C> with the value BAR = shoo and
return it.
=back
@@ -606,7 +640,7 @@ values under the given key will be overwritten.
=head1 COPYRIGHT
Copyright (c) 2000-2013 Thomas Linden
Copyright (c) 2000-2014 Thomas Linden
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -623,7 +657,7 @@ Thomas Linden <tlinden |AT| cpan.org>
=head1 VERSION
2.06
2.07
=cut

View File

@@ -2,7 +2,7 @@
# Config::General::Interpolated - special Class based on Config::General
#
# Copyright (c) 2001 by Wei-Hon Chen <plasmaball@pchome.com.tw>.
# Copyright (c) 2000-2013 by Thomas Linden <tlinden |AT| cpan.org>.
# Copyright (c) 2000-2014 by Thomas Linden <tlinden |AT| cpan.org>.
# All Rights Reserved. Std. disclaimer applies.
# Artistic License, same as perl itself. Have fun.
#
@@ -340,7 +340,7 @@ L<Config::General>
=head1 COPYRIGHT
Copyright 2001 by Wei-Hon Chen E<lt>plasmaball@pchome.com.twE<gt>.
Copyright 2002-2013 by Thomas Linden <tlinden |AT| cpan.org>.
Copyright 2002-2014 by Thomas Linden <tlinden |AT| cpan.org>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.