blib/lib/OAuth/Lite2/Formatter/Text.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 4 / 4 totaltotal 80.6% 25 / 31 SCAR 0.1
CC
1
Cov
79%
format
2.0
parse
2.0
BEGIN
1.0
CRAP 1.0
« blib/lib/OAuth/Lite2/Signer/Algorithm/HMAC_SHA1.pm ↑ Summary blib/lib/OAuth/Lite2/Agent/PSGIMock.pm »
1 package OAuth::Lite2::Formatter::Text;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 ▶use parent 'OAuth::Lite2::Formatter';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 8 use OAuth::Lite2::Util qw(
9 build_content
10 8 ▶ parse_content);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 ▶sub name { "text" }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
13 8 ▶sub type { "text/plain" }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
14  
15 sub format {
16 0 ▶ my ($self, $hash) = @_;
Subroutine format: not called CC=1 SCAR=6.9
Pod documented
17 0 return build_content($hash);
18 }
19  
20 sub parse {
21 0 ▶ my ($self, $content) = @_;
Subroutine parse: not called CC=1 SCAR=6.9
Pod documented
22 0 return parse_content($content)->as_hashref_mixed;
23 }
24  
25  
26 =head1 NAME
27  
28 OAuth::Lite2::Formatter::Text - OAuth 2.0 text/plain formatters store
29  
30 =head1 SYNOPSIS
31  
32 my $formatter = OAuth::Lite2::Formatter::Text->new;
33 my $obj = $formatter->parse( $string );
34 $string = $formatter->format( $obj );
35  
36 =head1 DESCRIPTION
37  
38 DEPRECATED.
39 OAuth 2.0 text/plain formatter
40  
41 =head1 METHODS
42  
43 =head2 name
44  
45 Accessor for name of this format, "text".
46  
47 =head2 type
48  
49 Accessor for content-type of this format, "text/plain".
50  
51 =head2 format( $object )
52  
53 my $formatted_string = $formatter->format( $obj );
54  
55 =head2 parse( $formatted_string )
56  
57 my $obj = $formatter->parse( $formatted_string );
58  
59  
60 =head1 SEE ALSO
61  
62 L<OAuth::Lite2::Formatter>
63 L<OAuth::Lite2::Formatters>
64 L<OAuth::Lite2::Formatter::FormURLEncoded.pm>
65 L<OAuth::Lite2::Formatter::JSON>
66 L<OAuth::Lite2::Formatter::XML>
67  
68 =head1 AUTHOR
69  
70 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
71  
72 =head1 COPYRIGHT AND LICENSE
73  
74 Copyright (C) 2010 by Lyo Kato
75  
76 This library is free software; you can redistribute it and/or modify
77 it under the same terms as Perl itself, either Perl version 5.8.8 or,
78 at your option, any later version of Perl 5 you may have available.
79  
80 =cut
81  
82 8 1;
« blib/lib/OAuth/Lite2/Signer/Algorithm/HMAC_SHA1.pm ↑ Summary blib/lib/OAuth/Lite2/Agent/PSGIMock.pm »