[cgiapp] Odd little bug

Richard Jones ra.jones at dpw.clara.co.uk
Tue Jul 13 11:02:36 EDT 2010


On 13/07/2010 15:27, Jerry Kaidor wrote:
>     The sessions table is also used by my old code, and these large numbers
> break it.  Is there any way to tell CAP::Session to not initialize the
> auto-increment ID field?

Have a look at 
http://search.cpan.org/~markstos/CGI-Session-4.42/lib/CGI/Session/Driver/mysql.pm

To use different column names, change the 'create table' statement, and 
then simply do this:

     $s = new CGI::Session('driver:mysql', undef,
     {
         TableName=>'session',
         IdColName=>'my_id',
         DataColName=>'my_data',
         DataSource=>'dbi:mysql:project',
     });

If that's likely to be any use to you, you just need to find a way of 
getting that config past CAP::Session.
-- 
Richard Jones


More information about the cgiapp mailing list