Revision history for Perl extension Catalyst::Plugin::ConfigLoader.
+ - Fix issue with 2 character app names that are kept in versioned
+ directories (e.g. app called QX in QX-2.1.5/)
- bump dep on Config::Any to use the -ForceArray Config::General option
(caelum)
|| $c->config->{ 'Plugin::ConfigLoader' }->{ file }
|| $c->path_to( $prefix );
- my ( $extension ) = ( $path =~ m{\.(.{1,4})$} );
+ my ( $extension ) = ( $path =~ m{\.([^/\.]{1,4})$} );
if ( -d $path ) {
$path =~ s{[\/\\]$}{};
--- /dev/null
+use strict;
+use warnings;
+use Test::More;
+
+{
+ package QX;
+ use strict;
+ use warnings;
+ use Path::Class ();
+
+ use base 'Catalyst::Plugin::ConfigLoader';
+
+ sub config { {} }
+ sub path_to { shift; Path::Class::dir('/home/foo/QX-0.9.5/' . shift); }
+}
+
+my $app = bless {}, 'QX';
+my ($path, $extension) = $app->get_config_path;
+is $path, '/home/foo/QX-0.9.5/qx';
+is $extension, undef;
+
+done_testing;
+