Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Issue with ModPerl::Util::exit()

by danielv (Initiate)
on Aug 03, 2011 at 14:20 UTC ( #918274=perlquestion: print w/ replies, xml ) Need Help??
danielv has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a code with some parts that can't be changed. From one such a part called function which should return "Access denied" in case the test failed.

Return performed by exit(1);

This works fine ... till the modperl version was changed and instead of "Access denied" message I get:

"Software error: ModPerl::Util::exit: (120000) exit was called at ..."

I know that the correct way is to switch the exit to return but since I can't touch the caller this flow is impossible :(

As I can see the exit() function was changed from Apache::exit() to ModPerl::Util::exit() .

Does this change the source of my problem or I need to search deeper?

Is there any way to perform exit with saving original behavior?

Thanks a lot.

Comment on Issue with ModPerl::Util::exit()
Download Code
Re: Issue with ModPerl::Util::exit()
by moritz (Cardinal) on Aug 03, 2011 at 14:31 UTC
    I know that the correct way is to switch the exit to return but since I can't touch the caller this flow is impossible :(

    This is a bit like "I know how to make a phone call using a phone, but I'm not allowed to, so how can I make a phone call be only using a coffee mug?"

    Does this change the source of my problem

    No, the source of your problem still is that you're not allowed to touch outdated/broken software. Find a way to lift that restriction.

      This is a bit like "I know how to make a phone call using a phone, but I'm not allowed to, so how can I make a phone call be only using a coffee mug?"

      Quite a good example...

      No, the source of your problem still is that you're not allowed to touch outdated/broken software. Find a way to lift that restriction.

      This is very old code and I work for some company. No one doesn't take on himself to permit such a change... I am already got a negative answer when I try to do the change and asked to fix a problem without changing the core ...

      I need to find some backdoor way to solve that... I need a help ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://918274]
Approved by Perlbotics
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-12-18 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (42 votes), past polls