Re: [cgiapp] Re: Testing Methods
Thanks to everyone for the input on this! It will likely take me a while to digest and try out these ideas. Mark - can you provide any example code as I'm not sure I follow your suggestion? The 'HTML::Template::Dumper' return value sounds useful, but I'm uncertain how to implement this... cheers, mike 2009/5/20 Mark Stosberg m...@summersault.com: On Wed, 13 May 2009 20:14:36 +0100 Mike Tonks fluffym...@googlemail.com wrote: Hi All, Can anyone recommend a method or point me to some examples for testing CGI::App run modes? In addition to using CGI_APP_RETURN_ONLY, you can also create a tiny sub-class of CGI::App-based module, so that html_tmpl_class returns 'HTML::Template::Dumper'. Then you'll get back a data structure of template instead of an HTML page, and this makes testing the values you send to the template easier. Mark # CGI::Application community mailing list ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Re: Testing Methods
Michael Peters writes: Mark Stosberg wrote: In addition to using CGI_APP_RETURN_ONLY, you can also create a tiny sub-class of CGI::App-based module, so that html_tmpl_class returns 'HTML::Template::Dumper'. Then you'll get back a data structure of template instead of an HTML page, and this makes testing the values you send to the template easier. Not to take too much away from this, but it doesn't test your template logic. Now most of my templates are very simple, it's still logic and can therefore have bugs. There's: http://search.cpan.org/~hartzell/Test-WWW-Mechanize-CGIApp-0.05/ g. # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Re: Testing Methods
Hi Folks On Tue, 2009-05-19 at 22:02 -0400, Mark Stosberg wrote: On Wed, 13 May 2009 20:14:36 +0100 Mike Tonks fluffym...@googlemail.com wrote: Hi All, Can anyone recommend a method or point me to some examples for testing CGI::App run modes? In addition to using CGI_APP_RETURN_ONLY, you can also create a tiny sub-class of CGI::App-based module, so that html_tmpl_class returns 'HTML::Template::Dumper'. Then you'll get back a data structure of template instead of an HTML page, and this makes testing the values you send to the template easier. And you can use HTML::Revelation to see the HTML rather than the browser's rendering of the content. -- Ron Savage r...@savage.net.au http://savage.net.au/index.html # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
[cgiapp] Re: Testing Methods
On Wed, 13 May 2009 20:14:36 +0100 Mike Tonks fluffym...@googlemail.com wrote: Hi All, Can anyone recommend a method or point me to some examples for testing CGI::App run modes? In addition to using CGI_APP_RETURN_ONLY, you can also create a tiny sub-class of CGI::App-based module, so that html_tmpl_class returns 'HTML::Template::Dumper'. Then you'll get back a data structure of template instead of an HTML page, and this makes testing the values you send to the template easier. Mark # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Re: Testing Methods
Mark Stosberg wrote: In addition to using CGI_APP_RETURN_ONLY, you can also create a tiny sub-class of CGI::App-based module, so that html_tmpl_class returns 'HTML::Template::Dumper'. Then you'll get back a data structure of template instead of an HTML page, and this makes testing the values you send to the template easier. Not to take too much away from this, but it doesn't test your template logic. Now most of my templates are very simple, it's still logic and can therefore have bugs. -- Michael Peters Plus Three, LP # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####