examples/hello-world/app.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
« blib/lib/Web/Machine/I18N/en.pm ↑ Summary examples/yapc-talk-examples/030-postback.psgi »
1 #!perl
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Web::Machine;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 {
9 package HelloWorld::Resource;
10 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶ use parent 'Web::Machine::Resource';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶ sub content_types_provided { [{ 'text/html' => 'to_html' }] }
Subroutine content_types_provided: called CC=1 SCAR=0.0
16  
17 1 ▶ sub to_html {
Subroutine to_html: called CC=1 SCAR=0.0
18 1 join "" =>
19 '<html>',
20 '<head>',
21 '<title>Hello World Resource</title>',
22 '</head>',
23 '<body>',
24 '<h1>Hello World</h1>',
25 '</body>',
26 '</html>'
27 }
28 }
29  
30 2 Web::Machine->new( resource => 'HelloWorld::Resource' )->to_app;
« blib/lib/Web/Machine/I18N/en.pm ↑ Summary examples/yapc-talk-examples/030-postback.psgi »