bumped version
[catagits/Catalyst-Plugin-ConfigLoader.git] / lib / Catalyst / Plugin / ConfigLoader.pm
index 760c57e..f5c416b 100644 (file)
@@ -10,7 +10,7 @@ use Module::Pluggable::Fast
     require => 1;\r
 use Data::Visitor::Callback;\r
 \r
-our $VERSION = '0.08';\r
+our $VERSION = '0.1';\r
 \r
 =head1 NAME\r
 \r
@@ -68,8 +68,12 @@ sub setup {
             my $config = $loader->load( $_ );\r
 \r
             $c->log->debug( "Loaded Config $_" ) if $c->debug;\r
-           _fix_syntax( $config );\r
-            $c->config( $config ) if $config;\r
+            \r
+            next if !$config;\r
+\r
+            _fix_syntax( $config );\r
+            \r
+            $c->config( $config );\r
         }\r
     }\r
 \r
@@ -152,7 +156,11 @@ sub _fix_syntax {
         map +{\r
             prefix => $_ eq 'Component' ? '' : $_ . '::',\r
             values => delete $config->{ lc $_ } || delete $config->{ $_ }\r
-        }, qw( Component Model View Controller )\r
+        },\r
+        grep {\r
+            ref $config->{ lc $_ } || ref $config->{ $_ }\r
+        }\r
+        qw( Component Model M View V Controller C )\r
     );\r
 \r
     foreach my $comp ( @components ) {\r