fixed path to comptest.tt
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index 004dd22..17495c0 100644 (file)
@@ -36,8 +36,9 @@ Catalyst::Helper - Bootstrap a Catalyst application
 sub get_sharedir_file {
     my ($self, @filename) = @_;
     my $dist_dir;
-    if (-d "inc/.author") { # Can't use sharedir if we're in a checkout
-                            # this feels horrible, better ideas?
+    if (-d "inc/.author" && -f "lib/Catalyst/Helper.pm"
+            ) { # Can't use sharedir if we're in a checkout
+                # this feels horrible, better ideas?
         $dist_dir = 'share';
     }
     else {
@@ -451,7 +452,7 @@ sub _mk_compclass {
 sub _mk_comptest {
     my $self = shift;
     my $test = $self->{test};
-    $self->render_sharedir_file( 'comptest.tt', "$test" );  ## wtf do i rename this to?
+    $self->render_sharedir_file( 't', 'comptest.tt', "$test" );  ## wtf do i rename this to?
 }
 
 sub _mk_images {