Can someone help me out by interpreting how exactly I'm supposed to use MySQL in conjunction with CGI::Session?

I've happily got it working with the default method, using files rather than a db, as demonstrated in the CGI::Session Cookbook * but I'm a bit baffled by the very sparse explanation in the MySQL variant.

I'm to use CGI::Session::MySQL? Or don't I need to, just use CGI::Session and tell it to use a MySQL driver? When I do so, I tell it a database handle, but ... then what? Should I connect to my database before I start using the module, it so that $dbh is already connected? I've tried that and it doesn't do anything, my sessions table in the db never contains any sessions.

Thanks in advance.

* The Cookbook has major glaring errors in it. It's lucky they're so glaring (filenames changing between open and close, arguments passed as sub($x, $y) in one place and as sub($y, $x) in another) or they'd be harder to fix. I wrote to the author and never heard back, who should I tell?



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print

In reply to CGI::Session::MySQL by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.