File Coverage

lib/Drogo/Response.pm
Criterion Covered Total %
statement 6 16 37.5
branch n/a
condition n/a
subroutine 2 9 22.2
pod 6 7 85.7
total 14 32 43.7


line stmt bran cond sub pod time code
1             package Drogo::Response;
2              
3 1     1   7 use Drogo::Guts;
  1         262  
  1         201  
4 1     1   7 use strict;
  1         2  
  1         239  
5              
6             sub new
7             {
8 0     0 0   my $class = shift;
9 0           my $self = {};
10 0           bless($self);
11 0           return $self;
12             }
13              
14             =head3 $self->print(...)
15              
16             Output via http.
17              
18             =cut
19              
20 0     0 1   sub print { Drogo::Guts::print(@_) }
21              
22             =head3 $self->header_set('header_type', 'value')
23              
24             Set output header.
25              
26             =cut
27              
28 0     0 1   sub header_set { Drogo::Guts::header_set(@_) }
29              
30             =head3 $self->header('content-type')
31              
32             Set content type.
33              
34             =cut
35              
36 0     0 1   sub header { Drogo::Guts::header(@_) }
37              
38              
39             =head3 $self->headers
40              
41             Returns hashref of response headers
42              
43             =cut
44              
45 0     0 1   sub headers { Drogo::Guts::headers(@_) }
46              
47             =head3 $self->location('url')
48              
49             Redirect to a url (sets the Location header out).
50              
51             =cut
52              
53 0     0 1   sub location { Drogo::Guts::location(@_) }
54              
55             =head3 $self->status(...)
56              
57             Set output status... (200, 404, etc...)
58             If no argument given, returns status.
59              
60             =cut
61              
62 0     0 1   sub status { Drogo::Guts::status(@_) }
63              
64             =head1 AUTHORS
65              
66             Bizowie
67              
68             =head1 COPYRIGHT AND LICENSE
69              
70             Copyright (C) 2013 Bizowie
71              
72             This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
73              
74             =cut
75              
76             1;