My Catalyst session table uses a CLOB field (Oracle) to store the
session data, so at some point I need to set $dbh->{LongReadLen} to a
reasonable value. I found a place in
Catalyst::Plugin::Session::Store::DBIC where I can check for a config
value and set LongReadLen locally. Here's a diff -u:
--- DBIC.pm 2006-09-16 15:36:27.000000000 -0400
+++ DBIC_new.pm 2007-08-28 14:47:40.000000000 -0400
@@ -191,6 +191,20 @@
return ($accessor, @args);
}
+=head2 get_session_data
+
+Retrieve the specified session from the backend store, setting
+$dbh->{LongReadLen} according to the C<maxlength> value in config.
+
+=cut
+
+sub get_session_data {
+ my ( $c, $key ) = @_;
+ local
$c->session_store_delegate->model->result_source->storage->dbh
+ ->{LongReadLen} = $c->config->{session}->{maxlength} || 0;
+ return $c->NEXT::get_session_data($key);
+}
+
=head2 delete_session_data
Delete the specified session from the backend store.
Any thoughts? Is the plugin maintainer on this list, or should I
cross-post to the Catalyst list?
Thanks,
Jason
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]