X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FBase.pm;h=869d47475459f35083402ebbfb10a8c88eea18bb;hb=b18987fe030c042bea8c545094098a6157e93f11;hp=ec25476b1b70be7a35ff129bd0f34eaba48c71fa;hpb=4f6748f101647dd3344339b19510947df6836412;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index ec25476..869d474 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -92,8 +92,8 @@ sub new { sub config { my $self = shift; $self->_config( {} ) unless $self->_config; - if ( $_[0] ) { - my $config = $_[1] ? {@_} : $_[0]; + if ( @_ ) { + my $config = @_ > 1 ? {@_} : $_[0]; while ( my ( $key, $val ) = each %$config ) { $self->_config->{$key} = $val; }