May 23, 2009, 7:13 AM
Post #1 of 1
These may be rookie questions, but here goes:
CGI::Session Installation and Use
- We asked the sys admin to install CGI::Session (4.1 or so). All he did was untar it (Linux system). So, he then copied the Session.pm file and directory to the perl/lib/CGI directory. (I may be a little off on these paths, but the essentials are here). In other words, he did not install it.
I then wrote code to use it, and all seems to be working as advertised, pretty much.
Will this causes some features not to work properly? I notice a few things, but need to review what is happening before I say that things don't work. For example, I find that:
- the find(\&purge) snippet did not work as it should have (I wrote code to delete day old sessions in /tmp, though).
- Documentation says calling new CGI::Session will check for the cookie and if it is not there, create it. I have had to manually create the cookie, though. Am I doing this as intended?
- I assume the cookie should persist and then be loaded when I leave the session web pages and return (even if I close the browser), however, I find I accumulate sessions in /tmp directory (so I wrote the code to purge them after 24 hours). Will the cookie persist for returning to the session?
That's all the issue for now. Session code seems to work so all is mostly okay.