[Jifty-commit] r5258 - in jifty/trunk: lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Sat Apr 5 22:32:46 EDT 2008


Author: jesse
Date: Sat Apr  5 22:32:40 2008
New Revision: 5258

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Util.pm

Log:
 r29338 at 31b:  jesse | 2008-04-05 16:30:59 -1000
 * Added a JIFTY_APP_ROOT environment variable for forcing an app root even if we're in another directory


Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm	(original)
+++ jifty/trunk/lib/Jifty/Util.pm	Sat Apr  5 22:32:40 2008
@@ -118,10 +118,11 @@
 
 =head2 app_root
 
-Returns the application's root path.  This is done by searching upward
-from the current directory, looking for a directory which contains a
-C<bin/jifty>.  Failing that, it searches upward from wherever the
-executable was found.
+Returns the application's root path.  This is done by returning
+$ENV{'JIFTY_APP_ROOT'} if it exists.  If not, Jifty tries searching
+upward from the current directory, looking for a directory which
+contains a C<bin/jifty>.  Failing that, it searches upward from
+wherever the executable was found.
 
 It C<die>s if it can only find C</usr> or C</usr/local> which fit
 these criteria.
@@ -131,7 +132,7 @@
 sub app_root {
     my $self = shift;
 
-
+    return $ENV{'JIFTY_APP_ROOT'} if ($ENV{'JIFTY_APP_ROOT'});
     return $APP_ROOT if ($APP_ROOT);
     
     my @roots;


More information about the Jifty-commit mailing list