On Sun, 2003-08-24 at 18:12, Stas Bekman wrote:
Harold Martin wrote:
On Sun, 2003-08-24 at 17:21, Stas Bekman wrote:
Harold Martin wrote:
Hello, When I try to start up Apache, I get the error: [error] syntax error at /usr/lib/perl5/site_perl/5.8.0/ProMP3.pm
line 8,
near "compile qw(:common)" Compilation failed in require at
/etc/httpd/promp3/promp3.handler.pl
line 6. BEGIN failed--compilation aborted at
/etc/httpd/promp3/promp3.handler.pl
line 6. Compilation failed in require at (eval 1) line 1.
ProMP3.pm's has: use Apache2 (); use Apache::compat; use Apache::ServerUtil (); use strict; use vars qw($VERSION); use DBI; use Apache::Const -compile qw(:common);
where did you find an example of this?
It should be:
use Apache::Const -compile => qw(:common);
or:
use Apache::Const -compile, qw(:common);
The form I used is from the Apache::Const page http://perl.apache.org/docs/2.0/api/Apache/Const.html#C__common_
Ah thank you, I've fixed that.
Using either of the two other lines results in the error: [error] Can't locate # in @INC ...
What's that all about?
Please post a short test example and a full error message as a part of
a
proper bug report as explained here: http://perl.apache.org/bugs/
Is there any other way to figure what's wrong? The code isn't mine, but someone else's, so I'm really not a whole lot of use there. As for posting an example, it's the same as from http://sourceforge.net/project/showfiles.php?group_id=12829 but just modified slightly according to the porting guidelines. I've only changed and added a few use statements and changed the constants from the m_p 1 form to the m_p 2 from. I've attached the two pieces of code that I modified (the module and the handler) for you.
Sorry Harold, it doesn't work this way. You ask for help, I ask you for the additional details as described at http://perl.apache.org/bugs/, instead you dump on us 80k of code. I understand that you may not be able to write a short script since you aren't familiar with that code, but at least sending the output of t/REPORT is the least you have to do.
Nevertheless I did try the attached files and I can't reproduce this problem with the latest cvs. Try upgrading your mod_perl to the latest cvs version, I have no idea which version you have.
One thing that for sure is wrong with that code is that you either use 'Apache::compat' and you don't replace Apache::Constants with Apache::Const, or you don't use 'Apache::compat' and then in addition to what you have added (i.e. use Apache::Const -compile => qw(:common);), you need to s/Apache::Constants/Apache::Const/g in the code.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html