>> Firstly it is not using locking
Yeah, that's right. Might this be an issue? I've never worked with this Module before.
>> secondly it performs no error checking (eg. the return values from retrieve and particularly store are never tested)
On the "Userlist" we check if the Perl-Storage File exists. Then we get all userids from the CMS and we check if they exists in the Perl-Storage. If yes show it's data otherwise we display a fixed string.
if ( $storage->{$id} ) {
# show userid + timestamp
} else {
# show userid + "never logged in"
}
On the "Useraction" we only check if the Perl-Storage file exists. Since this kind of system is only adding/overwriting data and not deleting anything we would add an entry to the Perl-Storage if it's existing otherwise overwrite it.
I just read in the documentation "The routine returns undef for I/O problems or other internal error, a true value otherwise. Serious errors are propagated as a die exception." so I'll add proper error checking now.
>>it would be good to know which version of Storable your environment is using
Apache-Overview states Storable Version 2.56
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.