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

Jifty commits jifty-commit at lists.jifty.org
Tue Mar 17 10:56:43 EDT 2009


Author: alexmv
Date: Tue Mar 17 10:56:42 2009
New Revision: 6599

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

Log:
 r43238 at kohr-ah:  chmrr | 2009-03-17 10:02:24 -0400
 Allow us to skip the try_to_require in ->app_class, saving two method calls and some overhead


Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm	(original)
+++ jifty/trunk/lib/Jifty.pm	Tue Mar 17 10:56:42 2009
@@ -340,12 +340,17 @@
 
 By the time you get it back, the class will have already been required
 
+Is you pass a hashref as the first argument, it will be treated as
+configuration parameters.  The only existing parameter is C<require>,
+which defaults to true.
+
 =cut
 
 sub app_class {
     shift;
+    my $args = (ref $_[0] ? shift : { require => 1 });
     my $val = join('::', Jifty->config->framework('ApplicationClass'), @_);
-    Jifty::Util->try_to_require($val);
+    Jifty::Util->try_to_require($val) if $args->{require};
     return $val;
 }
 


More information about the Jifty-commit mailing list