[Jifty-commit] r5316 - in jifty/trunk: lib
Jifty commits
jifty-commit at lists.jifty.org
Wed Apr 16 17:41:15 EDT 2008
Author: alexmv
Date: Wed Apr 16 17:41:10 2008
New Revision: 5316
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty.pm
Log:
r29946 at kohr-ah: chmrr | 2008-04-16 17:40:37 -0400
* Give a way for scripts to not make var/mason/* dirs
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Wed Apr 16 17:41:10 2008
@@ -132,6 +132,15 @@
database or do something extreme like that; most of Jifty expects the
handle to exist. Defaults to false.
+=item no_views
+
+If this is set to true, does not initialize any of the view handling
+components of Jifty. This is useful if you are running a command-line
+script, and not want the overhead associated with it. This also
+prevents the mason cache files from being created, which may be the
+right thing if your script is running as a privileged user. Defaults
+to false.
+
=item logger_component
The name that Jifty::Logger will log under. If you don't specify anything
@@ -150,6 +159,7 @@
no_handle => 0,
pre_init => 0,
logger_component => undef,
+ no_views => 0,
@_
);
@@ -230,7 +240,7 @@
qw/Jifty::Model::Metadata Jifty::Model::Session/;
# Configure the request handler and action API handler
- Jifty->handler(Jifty::Handler->new());
+ Jifty->handler(Jifty::Handler->new()) unless $args{no_views};
Jifty->api(Jifty::API->new());
# We can only require view classes once we have our models and actions set.
More information about the Jifty-commit
mailing list