[Jifty-commit] jifty branch, plack, updated. 2810860914a8294332ddabd1699f500c1f4e2af4
Jifty commits
jifty-commit at lists.jifty.org
Thu Jan 21 00:26:30 EST 2010
The branch, plack has been updated
via 2810860914a8294332ddabd1699f500c1f4e2af4 (commit)
from 9bf0c292bd1746d60a1a5b5905a03fc551e36a74 (commit)
Summary of changes:
lib/Jifty/Config.pm | 8 +++++++-
lib/Jifty/Plugin/Compat.pm | 23 +++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 2810860914a8294332ddabd1699f500c1f4e2af4
Author: Chia-liang Kao <clkao at clkao.org>
Date: Thu Jan 21 13:24:11 2010 +0800
Bump ConfigFileVersion, and load Compat plugin for old ones.
diff --git a/lib/Jifty/Config.pm b/lib/Jifty/Config.pm
index 1e33a11..6ff6fe2 100644
--- a/lib/Jifty/Config.pm
+++ b/lib/Jifty/Config.pm
@@ -534,7 +534,7 @@ See L<Jifty::Script::App>.
sub initial_config {
my $self = shift;
my $guess = $self->guess(@_);
- $guess->{'framework'}->{'ConfigFileVersion'} = 4;
+ $guess->{'framework'}->{'ConfigFileVersion'} = 5;
# These are the plugins which new apps will get by default
$guess->{'framework'}->{'Plugins'} = [
@@ -590,6 +590,12 @@ sub update_config {
);
}
+ if ( $config->{'framework'}->{'ConfigFileVersion'} < 5) {
+ unshift (@{$config->{'framework'}->{'Plugins'}},
+ { Compat => {}, }
+ );
+ }
+
return $config;
}
diff --git a/lib/Jifty/Plugin/Compat.pm b/lib/Jifty/Plugin/Compat.pm
index 23fda1c..c906f1d 100644
--- a/lib/Jifty/Plugin/Compat.pm
+++ b/lib/Jifty/Plugin/Compat.pm
@@ -6,6 +6,29 @@ use base 'Jifty::Plugin';
use Hook::LexWrap;
require Jifty::View::Mason::Handler;
+=head1 NAME
+
+Jifty::Plugin::Compat - Provide Jifty API compatibility
+
+=head1 SYNOPSIS
+
+# In your jifty config.yml under the framework section:
+
+ Plugins:
+ - Compat: {}
+
+=head1 DESCRIPTION
+
+This plugin provides Jifty API compatibility.
+
+=head2 ConfigVersion VERSION 5
+
+Provides Jifty::Handler->apache for apps prior to ConfigFileVersion 5.
+
+TODO: this should also rebind STDIN/STDOUT in the per-request hook.
+
+=cut
+
*Jifty::Handler::apache = sub {
return 'Jifty::Plugin::Compat::Apache';
};
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list