Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: goto in CORE::GLOBAL::exit - is it safe?

by sgt (Deacon)
on Aug 30, 2007 at 15:40 UTC ( [id://636119]=note: print w/replies, xml ) Need Help??


in reply to goto in CORE::GLOBAL::exit - is it safe?

maybe I am not answering the question either and I apologize in advance...

Is seems somehow that it would be better to have a function my_exit() that would be able via switch to call normal exit() o fast_cgi_exit() supposing you'd like to test your code in non-CGI env. But then you need to filter all the code to do that. I don't know if it is an option.

looking at your solution with exit, why this goto EXPR, can't you just do ' *CORE::GLOBAL::exit = sub { fast_cgi_exit() }'

cheers --stephan

Replies are listed 'Best First'.
Re^2: goto in CORE::GLOBAL::exit - is it safe?
by powerman (Friar) on Aug 30, 2007 at 15:52 UTC
    What is fast_cgi_exit()? AFAIK there no such 'magical' function, so it's probably something I should write myself. Ok. How it should work? Remember, it may be executed inside several eval's, and I need to jump out from these evals into my FastCGI->Accept() (or CGI::Fast->new()) loop.

    Maybe I misunderstand you... can you please describe your idea about this funciton in more details, provide it pseudocode or point me to existing realization in some perl module?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2024-03-28 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found