[cgiapp] profiling
Jason Purdy
jason at journalistic.com
Thu Nov 4 11:24:55 EDT 2010
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 );
- Jason
William Bulley wrote:
> According to Jason Purdy <jason at journalistic.com> on Thu, 11/04/10 at 11:16:
>> You can emulate the request by using the cgiapp module directly with a
>> test script and then profile it's execution.
>
> Can you elaborate on this for my edification? I am somewhat new to the
> CGI::App world.
>
> Regards,
>
> web...
>
> --
> William Bulley Email: web at umich.edu
>
> 72 characters width template ----------------------------------------->|
>
> ##### CGI::Application community mailing list ################
> ## ##
> ## To unsubscribe, or change your message delivery options, ##
> ## visit: http://lists.openlib.org/mailman/listinfo/cgiapp ##
> ## ##
> ## Web archive: http://lists.openlib.org/pipermail/cgiapp/ ##
> ## Wiki: http://cgiapp.erlbaum.net/ ##
> ## ##
> ################################################################
More information about the cgiapp
mailing list