Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If anyone can help I would be verry happy.
Using apache with mod_perl to use embperl.
Created a simple file editor. Opens file (with flock EX lock on) then reads file and allows to edit and re-submit. If I use embpgci it works fine only if I open the file with the embpcgi to start with. If I use mod_perl then it dosent save and leavs a blank file. I am using debian and I checked www-data owns all the files with write permisions for owner. The weird part is if I restart apache mid request then the mod_perl works... I am thinking this could be an issue with the lock?
One possible source of "wierdness" with mod_perl is the good old "nested subroutines" problem. I think what can happen with EmbPerl is each EmbPerl construct appears internally as a sub. (tho I have been known to be wrong in the past). Look in your error log - see it there is any "Variable $x will not stay shared at . . ." messages.