[Catalyst-commits] r10356 - Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri May 29 08:56:30 GMT 2009


Author: t0m
Date: 2009-05-29 08:56:30 +0000 (Fri, 29 May 2009)
New Revision: 10356

Modified:
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
Log:
Should detect if we're in a checkout. I'm still not happy with this

Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-05-29 08:40:05 UTC (rev 10355)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-05-29 08:56:30 UTC (rev 10356)
@@ -32,8 +32,15 @@
 
 sub get_sharedir_file {
     my ($self, @filename) = @_;
-    my $file = file( dist_dir('Catalyst-Devel'), @filename);
-    warn $file;
+    my $dist_dir;
+    if (-d "inc/.author") { # Can't use sharedir if we're in a checkout
+                            # this feels horrible, better ideas?
+        $dist_dir = 'share';
+    }
+    else {
+        $dist_dir = dist_dir('Catalyst-Devel');
+    }
+    my $file = file( $dist_dir, @filename);
     my $contents = $file->slurp;
     return $contents;
 }




More information about the Catalyst-commits mailing list