[Jifty-commit] r4567 - in jifty/trunk: lib
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Nov 29 12:01:51 EST 2007
Author: sartak
Date: Thu Nov 29 12:01:51 2007
New Revision: 4567
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty.pm
Log:
r45754 at onn: sartak | 2007-11-29 12:01:43 -0500
Add a trigger to Jifty.pm to be run after all initialization (so plugins can use the database handle, or anything else)
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Thu Nov 29 12:01:51 2007
@@ -5,6 +5,8 @@
use IPC::PubSub 0.22;
use Data::UUID;
use encoding 'utf8';
+use Class::Trigger;
+
BEGIN {
# Work around the fact that Time::Local caches TZ on first require
local $ENV{'TZ'} = "GMT";
@@ -238,6 +240,10 @@
# Run the App::start() method if it exists for app-specific initialization
$app->start()
if $app->can('start');
+
+ # For plugins that want all the above initialization, but want to run before
+ # we begin serving requests
+ Jifty->call_trigger('ready');
}
# Explicitly destroy the classloader; if this happens during global
More information about the Jifty-commit
mailing list