mod-perl2 is an Apache2 web server module. The module improves the performance of Perl CGI scripts. Scripts are loaded into memory on the first invocation and added to the Apache process. On each subsequent invocation the script is run directly with no need for loading and parsing.
Questions tagged [mod-perl2]
162 questions
3
votes
1 answer
Too many DB connection with mod_perl2 moose application
I have a mod_perl2 based web app that requires a connection to a mysql database. I have implemented the SQL connection specifics in a moose role.
Simplified, the role looks as follows:
package Project::Role::SQLConnection;
use Moose::Role;
use…

Hartmut Behrens
- 175
- 7
3
votes
2 answers
Getting the body of an http POST request, using mod-perl 2
I am writing a quick script to munge a submitted file, and return that content to the user.
My test code looks like this:
#!/path/to/bin/perl
use strict;
use warnings;
use utf8;
use Apache2::RequestRec;
use Apache2::RequestIO;
my ( $xmlin,…

CodeGorilla
- 811
- 1
- 6
- 21
3
votes
2 answers
No coverage for runtime with Devel::Cover and ModPerl::Registry
When I'm running Devel::Cover with ModPerl::Registry, I get no coverage info except for BEGIN blocks. When I'm running the same script with Devel::Cover from command line or as a CGI, everything works alright (obviously).
How can I make Devel::Cover…

codeholic
- 5,680
- 3
- 23
- 43
3
votes
1 answer
using threads in mod_perl
I want to use threads with mod_perl,
as a sample I use following script:
use strict;
use warnings;
use threads;
sub doOperation{
my $vr = $_[0];
my $i = 0;
while($i < 10000000){
$i++
}
print…

swserg
- 692
- 1
- 5
- 18
3
votes
2 answers
Debug Apache 2.4 PerlAuthenHandler
I am trying to debug a problem that occured after an apache upgrade. I want to integrate redmine into my apache authentification/access control.
Here is my apache config:
AuthType Basic…

choeger
- 3,562
- 20
- 33
3
votes
3 answers
Browser Cache Control, Dynamic Content
Problem: I can't seem to get FireFox to cache images sent from a dynamic server
Setup: Static Apache Server with reverse proxy to a dynamic server (mod_perl2) at backend.
Here is the request URL for the server. It is sent to the the dynamic server,…

Michael Mikowski
- 1,269
- 1
- 10
- 21
3
votes
1 answer
How can I both get raw post data and use Apache2::Request to access parameters?
Apache2::Request doesn't seem to provide a way to get the raw post data; is there one that I am missing?
Alternatively, is there a way to read the post data separately (in a content handler - nothing should have messed with the post data before…

ysth
- 96,171
- 6
- 121
- 214
2
votes
2 answers
How can my Perl program tell if is running under mod_perl?
How can my Perl program tell if is running under mod_perl?
I'm thinking along the lines of global variables or environment variables.
I am only bothered about mod_perl >= 2.

zgpmax
- 2,777
- 15
- 22
2
votes
2 answers
Apache Location directive for dynamic content fails if nested path
I'm using Apache 2.2x. Most of the content is generated via mod_perl. So, it's dynamic content that has no filesystem mapping. Perfect use of < Location >.
Apache config:
SetHandler perl-script
PerlResponseHandler…

joe
- 758
- 1
- 10
- 16
2
votes
1 answer
How do I use mod_perl2 and Apache Bucket Brigades?
I'm writing an application to do proxying and rewriting of webpages on the fly and am pretty settled on using mod_perl2 - there is an existing implementation using mod_perl (v1) that I'm working from. In mod_perl2, there's this idea of…

Drew Stephens
- 17,207
- 15
- 66
- 82
2
votes
1 answer
How to intercept reply in Plack/Apache
Given the following handler (straight from
https://metacpan.org/pod/Plack::Handler::Apache2)
package My::ModPerl::Handler;
use Plack::Handler::Apache2;
sub get_app {
# magic!
}
sub handler {
my $r = shift; # Apache2::RequestRec
my $app…

az5112
- 590
- 2
- 11
2
votes
0 answers
Compile mod_perl2 for strawberry 5.30 on windows
I have a problem compiling mod_perl2 for strawberry5.30 and apache2.2 on Windows.
Version Details:
Running:
perl -v
prints the following version information:
This is perl 5, version 30, subversion 0 (v5.30.0) built for…

sydnej
- 21
- 2
2
votes
1 answer
How to enable perl debugger under mod_perl?
I want to make non-interactive debugging of my code. Code is running under httpd with mod_perl2 enable.
According official documentation I can do like
% setenv PERL5OPT -d
% setenv PERLDB_OPTS "NonStop=1 LineInfo=db.out AutoTrace=1 frame=2"
As far…

Paul Serikov
- 2,550
- 2
- 21
- 36
2
votes
1 answer
mod_perl 2 variable and process corruption
We've just ported a fairly large codebase from an ancient Perl 5.005.03 CGI environment to mod_perl 2, and now that it's undergoing a public beta there are a few, possibly related, issues we're encountering from time to time. These build up until we…

Sam Kington
- 1,202
- 11
- 14
2
votes
1 answer
Testing Strawberry Perl on the same server as ActivePerl
I'd like to try out Strawberry Perl 5.12 on a win2k3sp2 server that currently uses ActivePerl 5.10 and mod_perl2. I have a separate Apache service set up for development but remember seeing something about clearing all references in the Windows…

Kev
- 15,899
- 15
- 79
- 112