File Coverage

blib/lib/HTTP/Throwable/Role/NoBody.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 3 0.0
total 15 18 83.3


line stmt bran cond sub pod time code
1             package HTTP::Throwable::Role::NoBody 0.028;
2             our $AUTHORITY = 'cpan:STEVAN';
3              
4 4     4   3024 use Moo::Role;
  4         11  
  4         30  
5              
6 27     27 0 82 sub body { return }
7              
8             sub body_headers {
9 27     27 0 104 my ($self, $body) = @_;
10              
11             return [
12 27         129 'Content-Length' => 0,
13             ];
14             }
15              
16 55     55 0 28194 sub as_string { $_[0]->status_line }
17              
18 4     4   1742 no Moo::Role; 1;
  4         28  
  4         20  
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             HTTP::Throwable::Role::NoBody - an exception with no body
27              
28             =head1 VERSION
29              
30             version 0.028
31              
32             =head1 OVERVIEW
33              
34             This is a very simple role, implementing the required C, C,
35             and C for L.
36              
37             When an HTTP::Throwable exception uses this role, its PSGI response will have
38             no entity body. It will report a Content-Length of zero. It will stringify to
39             its status line.
40              
41             =head1 PERL VERSION
42              
43             This library should run on perls released even a long time ago. It should work
44             on any version of perl released in the last five years.
45              
46             Although it may work on older versions of perl, no guarantee is made that the
47             minimum required version will not be increased. The version may be increased
48             for any reason, and there is no promise that patches will be accepted to lower
49             the minimum required perl.
50              
51             =head1 AUTHORS
52              
53             =over 4
54              
55             =item *
56              
57             Stevan Little
58              
59             =item *
60              
61             Ricardo Signes
62              
63             =back
64              
65             =head1 COPYRIGHT AND LICENSE
66              
67             This software is copyright (c) 2011 by Infinity Interactive, Inc.
68              
69             This is free software; you can redistribute it and/or modify it under
70             the same terms as the Perl 5 programming language system itself.
71              
72             =cut
73              
74             __END__