[Catalyst-commits] r6921 - trunk/Catalyst-Plugin-ConfigLoader-Remote/lib/Catalyst/Plugin/ConfigLoader

jshirley at dev.catalyst.perl.org jshirley at dev.catalyst.perl.org
Tue Sep 18 18:54:17 GMT 2007


Author: jshirley
Date: 2007-09-18 18:54:16 +0100 (Tue, 18 Sep 2007)
New Revision: 6921

Modified:
   trunk/Catalyst-Plugin-ConfigLoader-Remote/lib/Catalyst/Plugin/ConfigLoader/Remote.pm
Log:
Better handling of config... now to think of paranoid options

Modified: trunk/Catalyst-Plugin-ConfigLoader-Remote/lib/Catalyst/Plugin/ConfigLoader/Remote.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader-Remote/lib/Catalyst/Plugin/ConfigLoader/Remote.pm	2007-09-18 17:26:35 UTC (rev 6920)
+++ trunk/Catalyst-Plugin-ConfigLoader-Remote/lib/Catalyst/Plugin/ConfigLoader/Remote.pm	2007-09-18 17:54:16 UTC (rev 6921)
@@ -64,8 +64,13 @@
     # Load up the other files that are coming in.
     my @files = $c->next::method();
 
+    my $config = $c->config->{'Plugin::ConfigLoader::Remote'};
+
+    return @files unless ref $config eq 'HASH' and
+                         ref $config->{files} eq 'ARRAY';
+
     my @incoming_files =
-        @{ $c->config->{'Plugin::ConfigLoader::Remote'}->{files} };
+        @{ $config->{files} };
 
     # replace everything in @files that is a URI object with a downloaded copy
     foreach my $arg ( @incoming_files ) {




More information about the Catalyst-commits mailing list