[Jifty-commit] r637 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Feb 27 02:19:28 EST 2006


Author: jesse
Date: Mon Feb 27 02:19:27 2006
New Revision: 637

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

Log:
 r24772 at truegrounds:  jesse | 2006-02-27 02:16:05 -0500
 * UNIVERSAL::require is _heavy_. (It does an eval without bothering to check %INC. The wrapper now fixes it


Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm	(original)
+++ jifty/trunk/lib/Jifty/Util.pm	Mon Feb 27 02:19:27 2006
@@ -164,12 +164,13 @@
     my $self = shift;
     my $class = shift;
 
+    my $path =  join('/', split(/::/,$class)).".pm";
+   return 1 if $INC{$path};
     $class->require;
     if ($UNIVERSAL::require::ERROR) {
-        my $error = $UNIVERSAL::require::ERROR;
+       my $error = $UNIVERSAL::require::ERROR;
         $error =~ s/ at .*?\n$//;
-        Jifty->log->error(sprintf("$error at %s line %d\n",
-                                 (caller)[1,2]));
+        Jifty->log->error(sprintf("$error at %s line %d\n", (caller)[1,2]));
         return 0;
     }
     return 1;


More information about the Jifty-commit mailing list