From: Brian Cassidy Date: Tue, 22 Apr 2008 19:35:28 +0000 (+0000) Subject: die() instead of silently skip files with extensions we can't handle X-Git-Tag: v0.20~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-ConfigLoader.git;a=commitdiff_plain;h=1da5b36d4352150acc96b1fe8e576731bb0eee63 die() instead of silently skip files with extensions we can't handle --- diff --git a/Changes b/Changes index f0a843e..81090a5 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,9 @@ Revision history for Perl extension Catalyst::Plugin::ConfigLoader. - - Updated pod with new example 0.20 Wed Feb 06 2008 - sort configs by filename for loading (RT #31498) + - Updated pod with new example + - die() instead of silently skip files with extensions we can't handle 0.19 Wed Nov 21 2007 - fixed suffix appending to explicit config paths diff --git a/lib/Catalyst/Plugin/ConfigLoader.pm b/lib/Catalyst/Plugin/ConfigLoader.pm index 00e6a6b..04ac7e3 100644 --- a/lib/Catalyst/Plugin/ConfigLoader.pm +++ b/lib/Catalyst/Plugin/ConfigLoader.pm @@ -126,7 +126,8 @@ sub find_files { my @files; if ( $extension ) { - next unless grep { $_ eq $extension } @extensions; + die "Unable to handle files with the extension '${extension}'" + unless grep { $_ eq $extension } @extensions; ( my $local = $path ) =~ s{\.$extension}{_$suffix.$extension}; push @files, $path, $local; }