I have been experimenting with CGI::Session and find it promising, but I'm having difficulty with the new() method and Class::DBI. I can't find any documentation supporting the use of Class::DBI objects with the new() constructor. The docs state that the CGI::Session new() method requires three arguments(dataset name, a session id, and a hashref) but no explanation is provided for the third arg, the hashref. Can anyone shed some light on this? I'm not even able to figure out what that third arg does from the docs. It sometimes appears to point to a storage location for session data and at other times the hashref appears to contain option/value pairs.
Examples from the docs:
my $session = new CGI::Session(
"driver:MySQL", undef, {Directory=>"/tmp"}
);
my $session = new CGI::Session(
"driver:MySQL", undef, {Handle=>"$dbh"}
);
/Examples
my $session = new CGI::Session(
"driver:MySQL", undef, {Class::DBI=>"TableObject"}
);
I'm trying to figure out what would go in place of the pseudo code "{Class::DBI=>"TableObject"}" in the above example. What goes here to use the table object?
Can anyone provide sources of additional documentation or examples?
Thank you for sharing your Perl knowledge.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.