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

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Jun 7 00:48:55 EDT 2007


Author: trs
Date: Thu Jun  7 00:48:54 2007
New Revision: 3382

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

Log:
 r21781 at zot:  tom | 2007-06-07 00:45:50 -0400
 Only squelch "can't locate" errors relating to the class we're trying to require.  If it's something else, it's likely a module use'd by the module we're requiring.


Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm	(original)
+++ jifty/trunk/lib/Jifty/Util.pm	Thu Jun  7 00:48:54 2007
@@ -241,11 +241,11 @@
     if ($UNIVERSAL::require::ERROR) {
         my $error = $UNIVERSAL::require::ERROR;
         $error =~ s/ at .*?\n$//;
-        if ($args{'quiet'} and $error =~ /^Can't locate/) {
+        if ($args{'quiet'} and $error =~ /^Can't locate \Q$class\E/) {
             return 0;
         }
-        elsif ( $UNIVERSAL::require::ERROR !~ /^Can't locate/) {
-                die $UNIVERSAL::require::ERROR;
+        elsif ( $UNIVERSAL::require::ERROR !~ /^Can't locate \Q$class\E/) {
+            die $UNIVERSAL::require::ERROR;
         } else {
             Jifty->log->error(sprintf("$error at %s line %d\n", (caller(1))[1,2]));
             return 0;


More information about the Jifty-commit mailing list