Before I send it to mod_perl list I put it here because the problem
mainly concerns C::A.
No, not really. To the degree that you are having problems with
Apache::Reload, this is a mod_perl/Apache::Reload problem.
But the problem that the error message you gave us pertains to a basic
Perl syntax problem.
In Tester.pm, try:
use base 'CGI::Application';
(i.e. You forgot the quotes around CGI::Application.)
Apart from that, to use Apache::Reload, you need to put a reference to
it in *every* file that you want to have reloaded. Also, put
PerlModule Apache::Reload
In your httpd.conf file.
But don't trust me. I'm a bit fuzzy on this stuff. (It's been way too
long since I've had to do it.) Read the Apache::Reload man page.
Cheers,
Richard
There is a testing environment:
tester.cgi:
==============
#!/usr/local/bin/perl -w
use Tester;
my $webapp = Tester->new();
$webapp->run();
==============
Tester.pm:
==============
package Tester;
use base CGI::Application;
use strict;
use Apache::Reload;
print STDERR "Version: 1\n";
1;
==============
There is no problem when I run script in CGI mode and in MOD_PERL mode.
I can make changes and Apache::Reload has no problems to recompile it.
A weird things come when I change the order of 'use base C::A;' and 'use
strict;' lines in Tester.pm - 'use strict;' first and 'use base C::A'
later. There is no problem in CGI mode and at the first compilation in
MOD_PERL mode. But when I make a change, the script can't be recompiled.
I got the message in error_log:
[Tue Jan 27 13:33:50 2004] [error] Unknown error
Compilation failed in require at /path/perl/test/tester.cgi line 2.
BEGIN failed--compilation aborted at /path/perl/test/tester.cgi line 2.
What is happening? Why is the order of importing modules significant?
What module is responsible for that? Apache::Reload or C:A?
Best regards,
Wojciech Pietron
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|