examples/yapc-talk-examples/130-tracing-header.psgi

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« examples/yapc-talk-examples/100-add-caching.psgi ↑ Summary
1 #!perl
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Web::Machine;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =pod
9  
10 =cut
11  
12 {
13 package YAPC::NA::2012::Example130::Resource;
14 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 1 ▶ use parent 'Web::Machine::Resource';
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 ▶ sub content_types_provided { [ { 'text/html' => 'to_html' } ] }
Subroutine content_types_provided: called CC=1 SCAR=0.0
20  
21 1 ▶ sub to_html { '<html><body><h1>Hello World</h1></body></html>' }
Subroutine to_html: called CC=1 SCAR=0.0
22 }
23  
24 1 Web::Machine->new(
25 1 resource => 'YAPC::NA::2012::Example130::Resource',
26 tracing => 1
27 )->to_app;
« examples/yapc-talk-examples/100-add-caching.psgi ↑ Summary