perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jk jk" <>
Subject Problem with RequestRec and Headers
Date Fri, 21 Sep 2007 20:23:00 GMT
I'm trying to port a preexisting CGI app to mod_perl2 and could use some

Here goes a test case that should illustrate my problem:

The code pasted below loads the page properly the first time it's accessed.
However, upon multiple reloads in firefox, the headers either disappear
altogether or the page is downloaded in the download manager.  I assume this
is because the wrong $r object is being accessed by the request?  In any
case, I'm at a loss and would really appreciate some input.  Thanks in

File: tester.cgi

use strict;
use lib qw(.....);

use testme::testmod;

my $r = shift;

my $object = testme::testmod->instance($r);

File: testme/

package testme::testmod;

use Apache2::RequestUtil;
use strict;

use base qw /Class::Singleton/;

sub printme{

    my ( $self, $args ) = @_;

    my $r = Apache2::RequestUtil->request;


    print "A Page of Rendered HTML\n";

sub _new_instance{

    my ( $class, $r ) = @_;

    my $self = {};

    bless $self, $class;

    $self->{r} = $r;

    return ( $self );



View raw message