Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Prototype mismatch using mod_perl

by pemungkah (Priest)
on Aug 08, 2011 at 17:43 UTC ( [id://919288]=note: print w/replies, xml ) Need Help??


in reply to Prototype mismatch using mod_perl

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.

Replies are listed 'Best First'.
Re^2: Prototype mismatch using mod_perl
by AlfaProject (Beadle) on Aug 08, 2011 at 19:52 UTC
    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 !

      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.

        I found that the developers of mod_perl don't support anymore ModPerl::PerlRun
        That was the answer to the guy that had same problem as me.
        https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=124591
        Not fun at all, that thing working on our production server.
Re^2: Prototype mismatch using mod_perl
by AlfaProject (Beadle) on Aug 09, 2011 at 11:17 UTC
    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
      You can import 'nothing' and then use full function names to get rid of these messages
      use Encode(); Encode::encode(); Encode::decode();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://919288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found