Re: ModPerl::RegistryLoader

Jiří Pavlovský <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 21.7.2011 18:41, Perrin Harkins wrote:
>> So I was looking a solution and found ModPerl::RegistryLoader. I'm just not
>> sure I understand it completely. Is this the "compile once at startup"
>> solution?
> Yes, that's what it's for.
Thanks, so I'm on correct track
>
>> Do I just put " my $rlbb = ModPerl::RegistryLoader->new();" into
>> my startup file?
> Well, you need more than that.  Please read the man page and try it
> out, and if you get stuck, come back and ask questions about the
> specifics.

I did RTFM, but the man page was not clear to me, so I asked on the list.

Anyway, now I tried to implement something along the lines suggested in 
the synopsis:

    sub trans {
        my $uri = shift;
               return File::Spec->catfile(MY_DOC_ROOT, $uri);
    }
    my $rl = ModPerl::RegistryLoader->new(
        package => 'ModPerl::RegistryPrefork',
        trans   => \&trans,
    );

....
# these $apps are of the form '/cgi-bin/script.pl'
    foreach my $app (@apps) {
        $rl->handler($app);
    }

In addition I've few Location directives in httpd.conf to load few other 
scripts.

However this doesn't work as Apache is segfaulting.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.