[Jifty-commit] r4591 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Nov 30 17:39:12 EST 2007
Author: sartak
Date: Fri Nov 30 17:39:10 2007
New Revision: 4591
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Everything.pm
Log:
r48455 at onn: sartak | 2007-11-30 17:39:02 -0500
Allow plugins to add new jifty commands. This requires an unreleased version of App::CLI, but otherwise works. Features usually come with a cost, and this one's cost is .02s on app startup. Worth it, IMO :)
Modified: jifty/trunk/lib/Jifty/Everything.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Everything.pm (original)
+++ jifty/trunk/lib/Jifty/Everything.pm Fri Nov 30 17:39:10 2007
@@ -89,6 +89,10 @@
#Jifty::Module::Pluggable->import(search_path => ['Jifty::Web::Form::Field'], require => 1, except => qr/\.#/);
#__PACKAGE__->plugins;
+# load commands defined in Jifty/Plugin/*/Command/*.pm
+Jifty::Module::Pluggable->import(search_path => ['Jifty::Plugin'], file_regex => qr{/Command/[^/]+}, require => 1);
+__PACKAGE__->plugins;
+
=head1 SEE ALSO
L<Jifty>
More information about the Jifty-commit
mailing list