in reply to Interactive debug of CGI.pm script with requests from a browser

Last time I was going to write a CGI program, I was pointed to template toolkit in #perl irc channel. I recommend switching to that system (or other template based system). It made me gain many time.

I don't have any tip about debugging cgi with perl debugger. I use print STDERR / Data::Dumper for that.

  • Comment on Re: Interactive debug of CGI.pm script with requests from a browser

Replies are listed 'Best First'.
Re^2: Interactive debug of CGI.pm script with requests from a browser
by chrestomanci (Priest) on Jul 08, 2011 at 21:40 UTC

    Thanks for your comment. I agree that Template Toolkit (or TT2 as it is frequently known) is nice, and for a new project I would use it, or go all the way and use Catalyst, Plack or suchlike.

    The problem is that this is an old project and I can't refactor the code because I don't have a clear idea of what alot of it does. The approach I finally took was a combination of the Eclipse EPIC debugger, printf debugging to insert debug messages into the generated HTML, and the plain old perl debugger where I watch html fragments printed into my console as I debug interactively.

    Brothers I thank you.