Updated -short auto-detection
Sebastian Riedel [Mon, 21 Nov 2005 15:43:51 +0000 (15:43 +0000)]
lib/Catalyst/Helper.pm

index dc30f1d..9bbf398 100644 (file)
@@ -136,9 +136,8 @@ sub mk_component {
         $type              = 'C' if $type =~ /controller/i;
         my $appdir = File::Spec->catdir( split /\:\:/, $app );
         my $test_path =
-          File::Spec->catdir( $FindBin::Bin, '..', 'lib', $appdir,
-            'Controller' );
-        $type = $self->{long_type} if -d $test_path;
+          File::Spec->catdir( $FindBin::Bin, '..', 'lib', $appdir, 'C' );
+        $type = $self->{long_type} unless -d $test_path;
         $self->{type}  = $type;
         $self->{name}  = $name;
         $self->{class} = "$app\::$type\::$name";