ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Config.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Config.pm (file contents):
Revision 1.3 by root, Thu Aug 13 15:29:59 2009 UTC vs.
Revision 1.4 by root, Sun Aug 30 18:51:49 2009 UTC

60 60
61sub config { 61sub config {
62 \%CFG 62 \%CFG
63} 63}
64 64
65sub find_profile($) { 65sub _find_profile($) {
66 my ($name) = @_;
67
68 if (defined $name) {
69 my $profile = $CFG{profile}{$name};
70 return _find_profile ($profile->{parent}), %$profile;
71 } else {
72 return %CFG;
73 }
74}
75
76sub find_profile($;%) {
77 my ($name, %kv) = @_;
78
66 +{ 79 +{
67 %CFG, 80 %kv,
68 %{ $CFG{profile}{$_[0]} }, 81 _find_profile $name,
69 } 82 }
70} 83}
71 84
72load; 85load;
73END { save } 86END { save }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines