I've setup Apache to listen on port 8080 and Included VH config file like so:
The config file dev8080/graq.conf contains the mod_perl handler definitions:<VirtualHost *:8080> ServerName test.graq.co.uk DocumentRoot /home/graq/html/ PerlOptions +Parent PerlSwitches -I/home/graq/lib -I/home/graq/test-lib ScriptAlias /cgi-events /home/graq/cgi-bin ErrorLog /var/log/httpd/graq8080_error_log CustomLog /var/log/httpd/graq8080_access_log combined SetEnv PERL5LIB /home/graq/lib:/home/graq/test-lib Include "/etc/httpd/conf/dev8080/graq.conf" Include "/etc/httpd/conf/dev8080/other.conf" </VirtualHost>
And here is the snippet from GRAQ::Menu... PerlModule GRAQ::Menu; ... <Location /_menu> SetHandler modperl PerlOptions +ParseHeaders PerlOptions +SetupEnv PerlResponseHandler GRAQ::Menu </Location> ...
Which I have as an alternative tried to setup as an Apache2::Filter.package GRAQ::Menu; use Apache2::Const; use Apache2::RequestRec (); use Apache2::RequestUtil (); sub handler { my ($r) = @_; # my $r = Apache2::RequestUtil->request(); $r->log_error( 'GRAQ::Menu::handler: START'); ... }
UPDATE To clarify further, the dev8080/other.conf config file has this definition:package GRAQ::Menu; use base qw(Apache2::Filter) ... sub handler :FilterRequestHandler() { my ($f) = @_; my $r = $f->r; ... }
/UPDATE<IfDefine MODPERL2> PerlOptions +GlobalRequest </IfDefine>
Can't locate object method "log_error" via package "Apache2::RequestRe +c" at /home/graq/lib/GRAQ/Menu.pm line 56.
This all used to work with liberal smatterings of <Perl> use lib 'home/graq/lib';</Perl> and I'm getting a little lost on exactly what effects my changes have had on the mod_perl environment.
I remember having this error when porting from mp1 to mp2, but can't find any notes on it or hints from the docs on what object I should have in handler...?
In reply to Re^3: Dynamic @INC under mod_perl2 (Apache2 VirtualHost)
by graq
in thread Dynamic @INC under mod_perl2 (Apache2 VirtualHost)
by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |