srins has asked for the wisdom of the Perl Monks concerning the following question:

hi,
i have an module called hiGuiUserProfileBrowser which will be using modules like
package hiUserProfile; our @ISA ="hiObject"; require Exporter; require hiObject; use Data::Dumper; use hiXMLGen; use hiXMLDOMParser; use hiUiCCD;
where i will be using use hiGuiUserProfileBrowser in my
hiGuiUserProfileBrowser.cgi
when i hit this page ie hiGuiUserProfileBrowser.cgi,its very slow in response ,where i am using powerful apache server.
use hiUiCCD;
module will be using another module which will have connection/disconnection to an different oracle server and related oracle query functions apis.
since the page is slow i decided to convert my cgi files in to mod_perl application page.Do i need to modify any code when converting from cgi file to mod_perl.Do i need to configure anything in apache for converting to mod_perl.Any ideas and suggestions regarding this issue.

how to convert my existing cgi page to mod_perl.

Thanks,
srins.

Replies are listed 'Best First'.
Re: how to convert my existing cgi page to mod_perl.
by strat (Canon) on Dec 01, 2005 at 10:32 UTC
Re: how to convert my existing cgi page to mod_perl.
by grantm (Parson) on Dec 04, 2005 at 07:54 UTC

    The oddly named Apache::Registry is designed to allow Perl code written in CGI-style to be executed by mod_perl. Couple that with Apache::DBI to provide persistent database connections and you should see a significant speedup for very little effort.

    One 'gotcha' with the Apache::Registry approach is that you should not use 'my' for variables which are global to your script. If you can't avoid globals, use 'our' instead. Within subroutines, use 'my' as usual. Make sure you have your script running cleanly under use strict and use warnings before you try under Apache::Registry.