Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Familiar module vs. TMTOWTDI

by TheoPetersen (Priest)
on Jun 20, 2001 at 20:46 UTC ( #90075=perlmeditation: print w/replies, xml ) Need Help??

I was stuck on a tough problem at work a little while ago, and had a nice Perl moment in its resolution.

I'm cleaning up a buggy shopping cart app, and stripping out inconsistent use of hidden fields and cookies in the process, replacing it all with a hash of session data a la Apache::Session. The app uses MySQL and DBI, so of course I headed straight for CPAN to download Apache::Session::MySQL. That module seemed to have a problem with the old version of DBD::mysql installed, so I started looking at the upgrade list...

Unfortunately this site runs in a virtual server environment that makes some upgrades a challenge -- old version of Perl and various libraries, and fear on my part that I could break working sites if I made large changes. I had trouble with mismatched MySQL header files and libraries (don't ask me how my predecessor got DBD::mysql installed previously, but the old version works fine). I struggled with the issue for a few hours, and considered ripping out the session code and trying to get the cookies and hiddens to play well together.

Then the nice moment occurred; with one exception I've always used Apache::Session::MySQL, but there are several implementations. Sure enough, Apache::Session::DB_File installed just fine, and with a few code mutations everything worked as planned.

I made a mental note to not be so fixated in my approaches to problems; if a familiar module doesn't work (because of the environment or because of the nature of the problem) chances are there's still other solutions waiting for us on CPAN.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://90075]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2018-04-21 14:29 GMT
Find Nodes?
    Voting Booth?