Fix the RV of the first call to ->config
Yuval Kogman [Wed, 10 May 2006 20:35:29 +0000 (20:35 +0000)]
lib/Catalyst/Component.pm

index 5f1e83a..1b601fe 100644 (file)
@@ -102,8 +102,7 @@ sub config {
     my $self = shift;
     my $config = $self->_config;
     unless ($config) {
-        $self->_config( {} );
-        $config = {};
+        $self->_config( $config = {} );
     }
     if (@_) {
         $config = { %{$config}, %{@_ > 1 ? {@_} : $_[0]} };