You don't need to re-use
modules and pragmas, though I doubt that's causing your troubles. I'd remove them from within your subroutines anyway, because they're not doing anything for you. (Move 'use DBI' to the start of the program, or say require
I saw segfaults with mod_perl due to the interaction of XML::Parser and the trimmed-down Expat shipped with Apache. I had to rebuild Apache and disable Expat linkings (with 1.3.20, it's something like --disable-rule=EXPAT) to fix it, but it worked correctly after that.
I'd suggest revising your code, testing again, testing with a very very simple "Hello, World!" mod_perl program, and then trying the recompile. Unless someone comes up with a better suggestion, that is.