OAuth/Lite2/Formatter/FormURLEncoded.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 4 / 4 totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« OAuth/Lite2/Client/Token.pm ↑ Summary OAuth/Lite2/Formatter/JSON.pm »
1 package OAuth::Lite2::Formatter::FormURLEncoded;
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(
Subroutine BEGIN: called CC=1 SCAR=0.0
9 build_content
10 8 parse_content);
11  
12 9 ▶sub name { "form" }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
13 9 ▶sub type { "application/x-www-form-urlencoded" }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
14  
15 1 ▶sub format {
Subroutine format: called CC=1 SCAR=0.0
Pod documented
16 1 my ($self, $hash) = @_;
17 1 return build_content($hash);
18 }
19  
20 1 ▶sub parse {
Subroutine parse: called CC=1 SCAR=0.0
Pod documented
21 1 my ($self, $content) = @_;
22 1 return parse_content($content)->as_hashref_mixed;
23 }
24  
25  
26 =head1 NAME
27  
28 OAuth::Lite2::Formatter::FormURLEncoded - OAuth 2.0 form-urlencoded formatters store
29  
30 =head1 SYNOPSIS
31  
32 my $formatter = OAuth::Lite2::Formatter::FormURLEncoded->new;
33 my $obj = $formatter->parse( $string );
34 $string = $formatter->format( $obj );
35  
36 =head1 DESCRIPTION
37  
38 DEPRECATED.
39 OAuth 2.0 form-urlencoded formatter
40  
41 =head1 METHODS
42  
43 =head2 name
44  
45 Accessor for name of this format, "form".
46  
47 =head2 type
48  
49 Accessor for content-type of this format, "application/x-www-form-urlencoded".
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::JSON>
65 L<OAuth::Lite2::Formatter::XML>
66  
67 =head1 AUTHOR
68  
69 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
70  
71 =head1 COPYRIGHT AND LICENSE
72  
73 Copyright (C) 2010 by Lyo Kato
74  
75 This library is free software; you can redistribute it and/or modify
76 it under the same terms as Perl itself, either Perl version 5.8.8 or,
77 at your option, any later version of Perl 5 you may have available.
78  
79 =cut
80  
81 8 1;
« OAuth/Lite2/Client/Token.pm ↑ Summary OAuth/Lite2/Formatter/JSON.pm »