This is even more horrible, but stops catalyst.pl from being bork in checkouts
Tomas Doran [Tue, 30 Jun 2009 23:53:59 +0000 (23:53 +0000)]
lib/Catalyst/Helper.pm

index 004dd22..50f9fd9 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 {