At this later date in 2017, I have one thing to add to this topic based on my recent similar experience. It is obvious to me that the old obsolete Perl code of 1990 should experience strange errors when running in mod_perl, as clearly and briefly explained in ( http://www.fifi.org/cgi-bin/man2html/usr/share/man/ man3 / mod_perl_traps.3pm.gz ). Other documentation also shows that mod_perl was created to speed up perl server code up to 35 times due to thread reuse, but some old Perl CGI methods should be avoided to make this work clean.
Which is theoretically BIG! But not always ...
My one caveat is the perl_mod community of guru enthusiasts. When you decide how to run obsolete perl, don’t automatically suggest using mod_perl and thus force a consistent set of unexpected code changes on unsuspecting obsolete perl code.
Instead, first determine if the executable should work at its maximum efficiency (in a reusable reusable environment), or if the very good old-fashioned single-stream CGI.
Like in my case. In 1998, I wrote a very small CGI perl on-line ordering system. One of the first of its kind. Now (in 2017), I wanted to deploy it simply to demonstrate the old code that I wrote (for example, a resume element). It will never be launched except as a demonstration.
So mod_perl is OVERKILL, but SysAdmins on my new hosting site insisted that I install mod_perl, which, as I understood it, was his common habit, but later it became clear that they really knew nothing about what mod_perl does for the old CGI perl system. But at that time I wasn’t either. So, I did as they asked, and only then found out about the mod_perl errors when I fell into them one by one.
If I had not just loaded mod_perl, none of these errors would have occurred, since the standard server configuration was old-fashioned CGI.
Caveat Emptor.
source share