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

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Sep 13 23:19:06 EDT 2007


Author: sterling
Date: Thu Sep 13 23:19:05 2007
New Revision: 4113

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

Log:
 r12105 at riddle:  andrew | 2007-09-13 22:14:55 -0500
 Make find_plugins() sensitive to wantarray.


Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm	(original)
+++ jifty/trunk/lib/Jifty.pm	Thu Sep 13 23:19:05 2007
@@ -409,7 +409,9 @@
 sub find_plugin {
     my $self = shift;
     my $name = shift;
-    return grep { $_->isa($name) } Jifty->plugins;
+
+    my @plugins = grep { $_->isa($name) } Jifty->plugins;
+    return wantarray ? @plugins : $plugins[0];
 }
 
 =head2 class_loader


More information about the Jifty-commit mailing list