[Catalyst] Merging configs
Bill Moseley
moseley at hank.org
Fri Mar 9 15:41:54 GMT 2007
On Fri, Mar 09, 2007 at 11:16:00AM -0400, Brian Cassidy wrote:
> http://dev.catalystframework.org/browser/trunk/Catalyst-Runtime/lib/Catalyst/Utils.pm#L263
>
> for reference, the config() routine:
>
> http://dev.catalystframework.org/browser/trunk/Catalyst-Runtime/lib/Catalyst/Component.pm#L88
Oops, I looked at an old version of Component.pm that does (did) this:
sub config {
my $self = shift;
$self->_config( {} ) unless $self->_config;
if (@_) {
my $config = @_ > 1 ? {@_} : $_[0];
while ( my ( $key, $val ) = each %$config ) {
$self->_config->{$key} = $val;
}
}
return $self->_config;
}
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list