[Jifty-commit] r6882 - jifty/trunk/lib
Jifty commits
jifty-commit at lists.jifty.org
Thu Apr 23 21:55:30 EDT 2009
Author: sartak
Date: Thu Apr 23 21:55:30 2009
New Revision: 6882
Modified:
jifty/trunk/lib/Jifty.pm
Log:
Try harder to avoid loading a prereq_plugin multiple times
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Thu Apr 23 21:55:30 2009
@@ -202,7 +202,13 @@
my $plugin_obj = $class->new(%options);
push @plugins, $plugin_obj;
foreach my $name ($plugin_obj->prereq_plugins) {
- next if grep { $_ eq $name } @plugins_to_load;
+ my $this_class = qr/^(?:Jifty::Plugin::|\Q$app_plugin\E)?\Q$name\E$/;
+
+ next if grep { $_ =~ $this_class } @plugins_to_load;
+
+ # already loaded plugin objects
+ next if grep { ref($_) =~ $this_class } @plugins;
+
push @plugins_to_load, {$name => {}};
}
}
More information about the Jifty-commit
mailing list