From: Florian Ragwitz Date: Wed, 28 Oct 2009 23:54:56 +0000 (+0000) Subject: Enable Catalyst::Utils::home() to find home within Dist::Zilla built dists. X-Git-Tag: 5.80014~15^2~2^2~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=b39b4848e504f57e74c06ea46059aa56351c2a11 Enable Catalyst::Utils::home() to find home within Dist::Zilla built dists. Courtesy of nperez. --- diff --git a/Changes b/Changes index fe2309c..f19b84f 100644 --- 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 diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index 05248fc..cc3f326 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -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