blib/lib/Froody/Server/Apache.pm

filter: Statementstmt 44.1% 15 / 34 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 62.5% 5 / 8 Podpod 100% 3 / 3 totaltotal 44.2% 23 / 52 CC 5 SCAR 25.8
CC
5
Cov
38%
send_header
30.0
request_class
2.0
send_body
2.0
CRAP 13.3
« blib/lib/Froody/Dispatch.pm ↑ Summary blib/lib/Froody/Walker.pm »
1 =head1 NAME
2  
3 Froody::Apache
4  
5 =head1 DESCRIPTION
6  
7 Froody::Apache
8  
9 =head2 Methods
10  
11 =over
12  
13 =cut
14  
15 package Froody::Server::Apache;
16 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use base qw( Froody::Server );
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶eval q{
Subroutine BEGIN: called CC=1 SCAR=1.2
21 use Apache::Constants;
22 use Apache::Cookie;
23 };
24  
25 2 ▶use Froody::Request::Apache;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 0 ▶sub request_class { "Froody::Request::Apache" }
Subroutine request_class: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub send_header {
Subroutine send_header: not called CC=5 SCAR=34.0
Pod documented
29 0 my $class = shift;
30 0 my $response = shift;
31 0 my $content_type = shift;
32  
33 0 my $r = Apache->request();
34  
35 0 ▶ if (my $cookies = $response->cookie) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $cookies = $response->cookie) 0 0 0
36 0 warn "Baking cookies";
37 0 ▶ for my $c ( ref($cookies) ? @$cookies : ($cookies) ) {
Branch: 1 branch
BranchTrueFalseTotal
ref $cookies ? : 0 0 0
38 0 my $cookie = Apache::Cookie->new( $r, %{ $c } );
39 0 $cookie->bake;
40 }
41 }
42 0 $r->header_out("Cache-Control" => "no-cache");
43 0 ▶ $r->send_http_header($content_type || 'application/xml');
Condition0%0/2
$content_type || 'application/xml'
l!l
00
MC/DC0%0/1
$content_type || 'application/xml'
$content_type
Truth table0%0/2
A
A= $content_type
Aresult
11
00
44 }
45  
46 0 ▶sub send_body {
Subroutine send_body: not called CC=1 SCAR=6.9
Pod documented
47 0 my $class = shift;
48 0 my $bytes = shift;
49  
50 0 my $r = Apache->request();
51 0 $r->print($bytes)
52 }
53  
54 =back
55  
56 =head1 BUGS
57  
58 None known.
59  
60 Please report any bugs you find via the CPAN RT system.
61 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody>
62  
63 =head1 AUTHOR
64  
65 Copyright Fotango 2005. All rights reserved.
66  
67 Please see the main L<Froody> documentation for details of who has worked
68 on this project.
69  
70 This module is free software; you can redistribute it and/or modify it under
71 the same terms as Perl itself.
72  
73 =head1 SEE ALSO
74  
75 L<Froody>, L<Froody::Request>
76  
77 =cut
78  
79 2 1;
« blib/lib/Froody/Dispatch.pm ↑ Summary blib/lib/Froody/Walker.pm »