Updated PAR support
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index dc30f1d..c25dde9 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";
@@ -559,7 +558,7 @@ it under the same terms as Perl itself.
 __makefile__
 use inc::Module::Install;
 
-name('[% name %]');
+name('[% dir %]');
 abstract('Catalyst Application');
 author('[% author %]');
 version_from('[% path %]');
@@ -963,6 +962,8 @@ Catalyst [% long_type %].
 [% IF long_type == 'Controller' %]
 =head1 METHODS
 
+=cut
+
 #
 # Uncomment and modify this or add new actions to fit your needs
 #