[cgiapp] profiling
William Bulley
web at umich.edu
Thu Nov 4 11:32:00 EDT 2010
According to Jason Purdy <jason at journalistic.com> on Thu, 11/04/10 at 11:24:
>
> If you're testing just the main runmode, it's pretty easy:
>
> --
> use Test::More qw/ no_plan /;
> use MyApp;
> $ENV{'CGI_APP_RETURN_ONLY'} = 1;
> my $app = MyApp->new;
> my $html = $app->run;
> --
>
> Save that as a test script and then run it with DProf:
>
> perl -d:DProf 01-basic.t
>
> If you need to emulate a specific runmode or user data, add in a CGI
> instance with the parameters:
>
> my $cgi = CGI->new( { rm => 'other_runmode', form_field_1 => 'data' } );
> my $app = MyApp->new( QUERY => $cgi );
Easy for you! :-)
Thanks!
BTW, I'm not familiar with the Test::* series of modules (yet).
Regards,
web...
--
William Bulley Email: web at umich.edu
72 characters width template ----------------------------------------->|
More information about the cgiapp
mailing list