[Catalyst-commits] r11583 - in
trunk/Catalyst-Plugin-Session-Store-DBI: .
lib/Catalyst/Plugin/Session/Store t/lib
autarch at dev.catalyst.perl.org
autarch at dev.catalyst.perl.org
Fri Oct 16 19:26:45 GMT 2009
Author: autarch
Date: 2009-10-16 19:26:45 +0000 (Fri, 16 Oct 2009)
New Revision: 11583
Modified:
trunk/Catalyst-Plugin-Session-Store-DBI/Makefile.PL
trunk/Catalyst-Plugin-Session-Store-DBI/lib/Catalyst/Plugin/Session/Store/DBI.pm
trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestApp.pm
trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppCDBI.pm
trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBIC.pm
trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBICSchema.pm
Log:
Get config from ->_session_plugin_config method.
Change test classes to use Plugin::Session as config key
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/Makefile.PL 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/Makefile.PL 2009-10-16 19:26:45 UTC (rev 11583)
@@ -4,7 +4,7 @@
all_from 'lib/Catalyst/Plugin/Session/Store/DBI.pm';
requires 'Catalyst::Runtime' => '5.49';
-requires 'Catalyst::Plugin::Session' => '0.05';
+requires 'Catalyst::Plugin::Session' => '0.27';
requires 'DBI';
requires 'MIME::Base64';
requires 'Storable';
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/lib/Catalyst/Plugin/Session/Store/DBI.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/lib/Catalyst/Plugin/Session/Store/DBI.pm 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/lib/Catalyst/Plugin/Session/Store/DBI.pm 2009-10-16 19:26:45 UTC (rev 11583)
@@ -95,7 +95,7 @@
sub prepare {
my $c = shift;
- my $cfg = $c->config->{session};
+ my $cfg = $c->_session_plugin_config;
# If using DBIC/CDBI, always grab their dbh
if ( $cfg->{dbi_dbh} ) {
@@ -118,10 +118,10 @@
$c->NEXT::setup_session(@_);
- $c->config->{session}->{dbi_table} ||= 'sessions';
+ $c->_session_plugin_config->{dbi_table} ||= 'sessions';
- unless ( $c->config->{session}->{dbi_dbh}
- || $c->config->{session}->{dbi_dsn}
+ unless ( $c->_session_plugin_config->{dbi_dbh}
+ || $c->_session_plugin_config->{dbi_dsn}
) {
Catalyst::Exception->throw(
message => 'Session::Store::DBI: No session configuration found, '
@@ -130,7 +130,7 @@
}
# Pre-generate all SQL statements
- my $table = $c->config->{session}->{dbi_table};
+ my $table = $c->_session_plugin_config->{dbi_table};
$c->_session_sql( {
get_session_data =>
"SELECT session_data FROM $table WHERE id = ?",
@@ -154,7 +154,7 @@
sub _session_dbi_connect {
my $c = shift;
- my $cfg = $c->config->{session};
+ my $cfg = $c->_session_plugin_config;
if ( $cfg->{dbi_dsn} ) {
@@ -178,7 +178,7 @@
sub _session_dbic_connect {
my $c = shift;
- my $cfg = $c->config->{session};
+ my $cfg = $c->_session_plugin_config;
if ( $cfg->{dbi_dbh} ) {
if ( ref $cfg->{dbi_dbh} ) {
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestApp.pm 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestApp.pm 2009-10-16 19:26:45 UTC (rev 11583)
@@ -9,7 +9,7 @@
our $db_file = "$FindBin::Bin/tmp/session.db";
__PACKAGE__->config(
name => __PACKAGE__,
- session => {
+ 'Plugin::Session' => {
expires => 3600,
dbi_dsn => "dbi:SQLite:$db_file",
}
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppCDBI.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppCDBI.pm 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppCDBI.pm 2009-10-16 19:26:45 UTC (rev 11583)
@@ -8,7 +8,7 @@
__PACKAGE__->config(
name => __PACKAGE__,
- session => {
+ 'Plugin::Session' => {
expires => 3600,
dbi_dbh => 'TestAppCDBI::Model::CDBI',
}
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBIC.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBIC.pm 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBIC.pm 2009-10-16 19:26:45 UTC (rev 11583)
@@ -8,7 +8,7 @@
__PACKAGE__->config(
name => __PACKAGE__,
- session => {
+ 'Plugin::Session' => {
expires => 3600,
dbi_dbh => 'TestAppDBIC::Model::DBIC',
}
Modified: trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBICSchema.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBICSchema.pm 2009-10-16 18:02:06 UTC (rev 11582)
+++ trunk/Catalyst-Plugin-Session-Store-DBI/t/lib/TestAppDBICSchema.pm 2009-10-16 19:26:45 UTC (rev 11583)
@@ -8,7 +8,7 @@
__PACKAGE__->config(
name => __PACKAGE__,
- session => {
+ 'Plugin::Session' => {
expires => 3600,
dbi_dbh => 'TestAppDBICSchema::Model::DBIC',
}
More information about the Catalyst-commits
mailing list