[Jifty-commit] r2392 - in jifty/branches/template-declare: .

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Dec 16 19:17:05 EST 2006


Author: jesse
Date: Sat Dec 16 19:17:05 2006
New Revision: 2392

Modified:
   jifty/branches/template-declare/   (props changed)
   jifty/branches/template-declare/lib/Jifty/ClassLoader.pm

Log:
 r46165 at pinglin:  jesse | 2006-12-13 19:24:18 -0600
 * Force the classloader to try harder to require toplevel things and spit out relevant warnings. 
   (We no-longer swallow view-layer compile errors)


Modified: jifty/branches/template-declare/lib/Jifty/ClassLoader.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/ClassLoader.pm	(original)
+++ jifty/branches/template-declare/lib/Jifty/ClassLoader.pm	Sat Dec 16 19:17:05 2006
@@ -206,13 +206,18 @@
     return unless ($base); 
     Jifty::Util->require($base);
     Jifty::Util->require($base."::CurrentUser");
+    eval { 
     Jifty::Module::Pluggable->import(
-        search_path =>
-          [ map { $base . "::" . $_ } 'Model', 'Action', 'Notification', 'Event', 'View' ],
+        search_path => [ $base,  map { $base . "::" . $_ } ('Model', 'Action', 'Notification', 'Event', 'View' )],
         require => 1,
         except  => qr/\.#/,
         inner   => 0
     );
+    };
+    
+    if ($@) {
+        warn "$@";
+    }
     my %models;
     $models{$_} = 1 for grep {/^($base)::Model::(.*)$/ and not /Collection$/} $self->plugins;
     $self->models(sort keys %models);


More information about the Jifty-commit mailing list