Enable Catalyst::Utils::home() to find home within Dist::Zilla built dists.
Florian Ragwitz [Wed, 28 Oct 2009 23:54:56 +0000 (23:54 +0000)]
Courtesy of nperez.

Changes
lib/Catalyst/Utils.pm

diff --git a/Changes b/Changes
index fe2309c..f19b84f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -15,6 +15,8 @@
       switch off (deprecated) regex fallback for component resolution.
     - Added an nginx-specific behavior to the FastCGI engine to allow
       proper PATH_INFO and SCRIPT_NAME processing for non-root applications
+    - Enable Catalyst::Utils::home() to find home within Dist::Zilla built
+      distributions
 
 5.80013 2009-09-17 11:07:04
 
index 05248fc..cc3f326 100644 (file)
@@ -172,8 +172,9 @@ sub home {
             # pop off /lib and /blib if they're there
             $home = $home->parent while $home =~ /b?lib$/;
 
-            # only return the dir if it has a Makefile.PL or Build.PL
-            if (-f $home->file("Makefile.PL") or -f $home->file("Build.PL")) {
+            # only return the dir if it has a Makefile.PL or Build.PL or dist.ini
+            if (-f $home->file("Makefile.PL") or -f $home->file("Build.PL")
+                or -f $home->file("dist.ini")) {
 
                 # clean up relative path:
                 # MyApp/script/.. -> MyApp