Output redirection debugging mod_perl with Komodo

Posted by kevinw on 2006-07-10 16:26
OS: All / Any | Product: Komodo | tags: debugging komodo modperl output stdout
Question: 

When I debug my mod_perl application using Komodo's remote debugging facilities, the output from my script goes to the console of the web browser rather than my browser. How do I make this work the way I expect?

Answer: 

Have you ever tried debugging a mod_perl app in Komodo only to find that your output is going to the controlling terminal of the webserver, rather than your web browser? The reason this happens on some configurations is not well understood, but the solution is simple.

Rather than using Perl's print() function, use the print() method of the mod_perl request. In other words, if your request object is $r, then $r->print() is the way to go.