blib/lib/Net/HTTP/Spore/Middleware/Format/Text.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 4 / 4 totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
encode
1.0
decode
1.0
CRAP 1.0
↑ Summary
1 package Net::HTTP::Spore::Middleware::Format::Text;
2 1 $Net::HTTP::Spore::Middleware::Format::Text::VERSION = '0.01';
3 # ABSTRACT: middleware for Text format
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 extends 'Net::HTTP::Spore::Middleware::Format';
6  
7 1 ▶sub encode { $_[1] }
Subroutine encode: called CC=1 SCAR=0.0
Pod documented
8 2 ▶sub decode { $_[1] }
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
9 2 ▶sub accept_type { ( 'Accept' => 'text/plain' ) }
Subroutine accept_type: called CC=1 SCAR=0.0
Pod documented
10 1 ▶sub content_type { ( 'Content-Type' => 'text/plain' ) }
Subroutine content_type: called CC=1 SCAR=0.0
Pod documented
11  
12 1 1;
13  
14 __END__
15  
16 =pod
17  
18 =encoding UTF-8
19  
20 =head1 NAME
21  
22 Net::HTTP::Spore::Middleware::Format::Text - middleware for Text format
23  
24 =head1 VERSION
25  
26 version 0.01
27  
28 =head1 SYNOPSIS
29  
30 my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
31 $client->enable('Format::Text');
32  
33 =head1 DESCRIPTION
34  
35 Net::HTTP::Spore::Middleware::Format::Text is a middleware to handle
36 requests in C<text/plain> format. It will set the appropriate
37 B<Accept> header in your request. If the request method is PUT or
38 POST, the B<Content-Type> header will also be set to C<text/plain>.
39  
40 It is intended for use with L<Net::HTTP::Spore>; see their
41 documentation for more information. This particular module may be
42 deleted if it eventually gets merged into the main Net:HTTP::Spore
43 module.
44  
45 =head1 BUGS
46  
47 Please report any bugs or feature requests on the bugtracker website
48 https://github.com/gempesaw/Net-HTTP-Spore-Middleware-Format-Text/issues
49  
50 When submitting a bug or request, please include a test-file or a
51 patch to an existing test-file that illustrates the bug or desired
52 feature.
53  
54 =head1 AUTHOR
55  
56 Daniel Gempesaw <gempesaw@gmail.com>
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 This software is copyright (c) 2015 by Daniel Gempesaw.
61  
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64  
65 =cut
↑ Summary