[Catalyst-commits] r7099 - trunk/Config-Any/lib/Config

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Thu Nov 8 16:21:13 GMT 2007


Author: bricas
Date: 2007-11-08 16:21:13 +0000 (Thu, 08 Nov 2007)
New Revision: 7099

Modified:
   trunk/Config-Any/lib/Config/Any.pm
Log:
more code updates, before i look in depth at the _load() routine

Modified: trunk/Config-Any/lib/Config/Any.pm
===================================================================
--- trunk/Config-Any/lib/Config/Any.pm	2007-11-08 14:48:34 UTC (rev 7098)
+++ trunk/Config-Any/lib/Config/Any.pm	2007-11-08 16:21:13 UTC (rev 7099)
@@ -5,7 +5,6 @@
 
 use Carp;
 use Module::Pluggable::Object ();
-use English qw(-no_match_vars);
 
 our $VERSION = '0.09';
 
@@ -15,7 +14,7 @@
 
 =head1 VERSION
 
-This document describes Config::Any version 0.0.8
+This document describes Config::Any version 0.09
 
 =head1 SYNOPSIS
 
@@ -49,7 +48,7 @@
 
 =cut
 
-=head2 load_files( )
+=head2 load_files( \%args )
 
     Config::Any->load_files( { files => \@files } );
     Config::Any->load_files( { files => \@files, filter  => \&filter } );
@@ -95,7 +94,7 @@
     return $class->_load( $args );
 }
 
-=head2 load_stems( )
+=head2 load_stems( \%args )
 
     Config::Any->load_stems( { stems => \@stems } );
     Config::Any->load_stems( { stems => \@stems, filter  => \&filter } );
@@ -141,7 +140,7 @@
 
     my %files         = map { $_ => 1 } @$files_ref;
     my %force_plugins = map { $_ => 1 } @$force_plugins_ref;
-    my $enforcing     = keys %force_plugins ? 1 : 0;
+    my $enforcing = keys %force_plugins ? 1 : 0;
 
     my $final_configs     = [];
     my $originally_loaded = {};
@@ -176,7 +175,7 @@
             my $config;
             eval { $config = $loader->load( $filename, $driver_args ); };
 
-            next if $EVAL_ERROR;    # if it croaked or warned, we can't use it
+            next if $@;         # if it croaked or warned, we can't use it
             next if !$config;
             delete $files{ $filename };
 
@@ -186,7 +185,8 @@
             push @$final_configs, { $filename => $config };
         }
     }
-    $final_configs;
+
+    return $final_configs;
 }
 
 =head2 finder( )
@@ -237,7 +237,7 @@
 
 =over
 
-=item C<no files specified> or C<no stems specified>
+=item C<No files specified!> or C<No stems specified!>
 
 The C<load_files()> and C<load_stems()> methods will issue this warning if
 called with an empty list of files/stems to load.




More information about the Catalyst-commits mailing list