Re: Prototype mismatch using mod_perl
by RMGir (Prior) on Aug 08, 2011 at 11:37 UTC
|
I'm just guessing, but it sounds like you're getting a mixture of libs from 2 different versions of perl.
Any chance you've got a PERL5LIB environment variable, are passing a -I path to your script, or are using 'use lib' statements that hard code /usr/share/perl5?
| [reply] |
|
|
I'm not a perl professional , but I didn't used or changed the things you are mentioned.
we use standard red hat 6 installation with perl 5.10.1 and apache 2.2 that came with the distro.
I added mod_perl , that the only thing I added manually.
Other things are added automaticly using CPAN util.
| [reply] |
|
|
I added mod_perl , that the only thing I added manually.
Other things are added automaticly using CPAN util. So why did you add mod_perl manually? Perhaps something went wrong there? Did you run all tests when installing mod_perl? What results did you get?
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |
Re: Prototype mismatch using mod_perl
by pemungkah (Priest) on Aug 08, 2011 at 17:43 UTC
|
First: have you looked at the line indicated? Is it calling the indicated function correctly, or was there a braino when it was written?
Second: is the line indicated doing what you want it to do? Are you sure? Completely? Do you have a test that proves it is doing what you wanted?
If you are 100% sure that the call is correct as it stands, add a leading ampersand to the call to the subroutine to tell Perl to ignore the prototype:
# Prototype mismatch was occurring here:
&index::encode(...);
Do not just do this to "make it go away". You may have a real problem (in fact, you almost certainly do!). Be sure you don't before you change anything.
Seriously. I considered whether or not to tell you this because I'm not sure you're going to do the legwork to ensure it's OK. | [reply] [d/l] |
|
|
Of course I know what it's doing and why it's there.
I have these errors on all modules that I added to the scripts except the CGI module.
All the scripts are working and checked .
It's something strange that came with the mod_perl , never get these kind of errors on mod_cgi.
I will check that solution tomorrow
Thanks a lot !
| [reply] |
|
|
If you ask me, it sounds like your OS released a new version of mod_perl that doesn't play well with your existing scripts. So, if that's the case, what does that mean? Maybe there's a problem with your distro's latest release of mod_perl. I'm guessing we're talking about Linux so I'd start by checking out my distro's bug tracker to see if anyone else is having mod_perl issues. Maybe you got bumped from mod_perl 1.xx to mod_perl 2.xx which is very different.
If the above is wrong, take a close look at what changed in your environment. Whatever it was that changed is most likely the culprit.
In a pinch, if none of the above helps, you might try a manual build of mod_perl to see where the problem lies. If your build works, then the distro has a problem, if not, you should at least get some build errors to point you in the right direction.
Of course, if you're running windows, very little of the above may apply. But I'd still look for a recent mod_perl update to be the problem.
| [reply] |
|
|
|
|
| [reply] |
|
|
That bug in mod_perl
The problem is in use Encode qw(encode decode);
The problem , that is modules redefining functions and ModPerl::RunPerl can't handle this in right way.
(read the post under, it's bug in mod_perl).
I must to find way to get rid of this messages !
thanks
| [reply] [d/l] |
|
|
You can import 'nothing' and then use full function names to get rid of these messages
use Encode();
Encode::encode();
Encode::decode();
| [reply] [d/l] |