On Wed, Oct 10, 2001 at 08:33:08PM -0400, Tom Allison wrote:
> I'm trying to do a dselect installation of Apache mod_perl DBI and a few
> other little goodies...
> When I start Apache I get:
> [error] Can't locate Apache.pm in @INC (@INC
> contains.../usr/share/perl/5.6.1...) at (eval 1) line 3.
> locate Apache.pm results in:
> None of whom are referenced in the @INC variable.
You're on testing, right? This has all been fixed for ages in unstable,
but hasn't been able to propagate through to testing for various other
libapache-mod-perl (1.25-5) unstable; urgency=low
* Adjust install directories and dependencies as per the latest perl
policy (Closes: #95519).
* Revert the child_num patch, according to upstream's opinion.
* Build with perl 5.6.1, and matching build dependencies.
-- Daniel Jacobowitz <firstname.lastname@example.org> Mon, 21 May 2001 15:05:50 -0700
> First -- FYI for the maintainer of libapache-mod-perl -- this is
> actually in 5.6.0 and 5.6.0/Bundle which seems redundant....
Bundles are different beasts. See 'perldoc CPAN' for clues.
> I have a bunch of questions about this and hopefully some of them can
> get answered here.
> what's the difference between the apache-mod-perl and the CGI? I assume
> it's a matter of having the perl execute independently (CGI and Longer
> Time) rather than have perl "waiting in the wings" for an apache driven
> request (Faster but more memory used over a normal Apache configuration).
That's a reasonably accurate summary of the benefits - 'man mod_perl'
will tell you more once you have it installed. DBI is a situation where
mod_perl can achieve very substantial wins, as Perl scripts can then
keep their database connections alive between requests.
> Is there any programming difference between these with respect to the
> .pl files?
There are several interfaces you can use. Apache::PerlRun lets you run
CGI scripts essentially unmodified, but doesn't cache scripts. This
gives you some performance improvement by avoiding forking a separate
process. Apache::Registry lets you run CGI scripts largely unmodified
and caches the result of compiling those scripts inside itself, but you
have to make sure that your code cleans up after itself and doesn't rely
on, say, variables being uninitialized when it starts and everything
automatically being cleaned up when it finishes.
Finally, you can use the Apache/mod_perl API directly if you so desire,
but that's a (slightly) more complicated affair which you can safely
avoid right at first.
For more details, see 'man cgi_to_mod_perl' and http://perl.apache.org/,
especially the excellent mod_perl Guide at
Colin Watson [email@example.com]
- From: Tom Allison <firstname.lastname@example.org>