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

Jifty commits jifty-commit at lists.jifty.org
Sat Jan 10 02:23:33 EST 2009


Author: alexmv
Date: Sat Jan 10 02:23:32 2009
New Revision: 6225

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

Log:
 r40451 at kohr-ah:  chmrr | 2009-01-10 02:23:26 -0500
  * Don't call ->plugins _twice_, since Module::Pluggable doesn't cache at all, and stat is expensive


Modified: jifty/trunk/lib/Jifty/ClassLoader.pm
==============================================================================
--- jifty/trunk/lib/Jifty/ClassLoader.pm	(original)
+++ jifty/trunk/lib/Jifty/ClassLoader.pm	Sat Jan 10 02:23:32 2009
@@ -366,9 +366,9 @@
     # Construct the list of models for the application for later reference
     my %models;
     for ($self->plugins) {
-        Jifty::Util->require($_);  
+        Jifty::Util->require($_);
+        $models{$_} = 1 if /^($base)::Model::(.*)$/ and not /Collection(?:$||\:\:)/;
     }
-    $models{$_} = 1 for grep {/^($base)::Model::(.*)$/ and not /Collection(?:$||\:\:)/} $self->plugins;
     $self->models(sort keys %models);
 
     # Load all those models and model-related actions, notifications, and events


More information about the Jifty-commit mailing list