[Catalyst-commits] r11544 - in
trunk/Catalyst-Plugin-Session-Store-DBIC: .
lib/Catalyst/Plugin/Session/Store
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Oct 16 13:06:05 GMT 2009
Author: rafl
Date: 2009-10-16 13:06:04 +0000 (Fri, 16 Oct 2009)
New Revision: 11544
Modified:
trunk/Catalyst-Plugin-Session-Store-DBIC/Makefile.PL
trunk/Catalyst-Plugin-Session-Store-DBIC/lib/Catalyst/Plugin/Session/Store/DBIC.pm
Log:
Port to new session config key.
Modified: trunk/Catalyst-Plugin-Session-Store-DBIC/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBIC/Makefile.PL 2009-10-16 08:32:42 UTC (rev 11543)
+++ trunk/Catalyst-Plugin-Session-Store-DBIC/Makefile.PL 2009-10-16 13:06:04 UTC (rev 11544)
@@ -11,7 +11,7 @@
'Carp' => 0,
'Catalyst' => '5.65', # For setup_finished
'Catalyst::Exception' => 0,
- 'Catalyst::Plugin::Session::Store::Delegate' => '0.04',
+ 'Catalyst::Plugin::Session::Store::Delegate' => '0.05',
'Class::Accessor::Fast' => 0,
'DBIx::Class' => '0.07000', # For find with unique constraints
'MIME::Base64' => 0,
Modified: trunk/Catalyst-Plugin-Session-Store-DBIC/lib/Catalyst/Plugin/Session/Store/DBIC.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBIC/lib/Catalyst/Plugin/Session/Store/DBIC.pm 2009-10-16 08:32:42 UTC (rev 11543)
+++ trunk/Catalyst-Plugin-Session-Store-DBIC/lib/Catalyst/Plugin/Session/Store/DBIC.pm 2009-10-16 13:06:04 UTC (rev 11544)
@@ -41,7 +41,7 @@
__PACKAGE__->config(
# ... other items ...
- session => {
+ 'Plugin::Session' => {
dbic_class => 'DBIC::Session', # Assuming MyApp::Model::DBIC
expires => 3600,
},
@@ -72,7 +72,7 @@
return $c->next::method unless @_;
# Try to determine id_field if it isn't set
- unless ($c->config->{session}->{id_field}) {
+ unless ($c->_session_plugin_config->{id_field}) {
my $model = $c->session_store_model;
my $rs = ref $model ? $model
: $model->can('resultset_instance') ? $model->resultset_instance
@@ -83,7 +83,7 @@
message => __PACKAGE__ . qq/: Primary key consists of more than one column; please set id_field manually/
) if @primary_columns > 1;
- $c->config->{session}->{id_field} = $primary_columns[0];
+ $c->_session_plugin_config->{id_field} = $primary_columns[0];
}
$c->next::method(@_);
@@ -97,7 +97,7 @@
=cut
sub session_store_dbic_class {
- shift->config->{session}->{dbic_class} || 'DBIC::Session';
+ shift->_session_plugin_config->{dbic_class} || 'DBIC::Session';
}
=head2 session_store_dbic_id_field
@@ -107,7 +107,7 @@
=cut
sub session_store_dbic_id_field {
- shift->config->{session}->{id_field} || 'id';
+ shift->_session_plugin_config->{id_field} || 'id';
}
=head2 session_store_dbic_data_field
@@ -117,7 +117,7 @@
=cut
sub session_store_dbic_data_field {
- shift->config->{session}->{data_field} || 'session_data';
+ shift->_session_plugin_config->{data_field} || 'session_data';
}
=head2 session_store_dbic_expires_field
@@ -127,7 +127,7 @@
=cut
sub session_store_dbic_expires_field {
- shift->config->{session}->{expires_field} || 'expires';
+ shift->_session_plugin_config->{expires_field} || 'expires';
}
=head2 session_store_model
@@ -226,7 +226,7 @@
=head1 CONFIGURATION
The following parameters should be placed in your application
-configuration under the C<session> key.
+configuration under the C<Plugin::Session> key.
=head2 dbic_class
More information about the Catalyst-commits
mailing list