line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OAuth::Lite2::Formatter::FormURLEncoded; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1397
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'OAuth::Lite2::Formatter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
|
|
184
|
use OAuth::Lite2::Util qw( |
9
|
|
|
|
|
|
|
build_content |
10
|
1
|
|
|
1
|
|
109
|
parse_content); |
|
1
|
|
|
|
|
2
|
|
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
1
|
|
sub name { "form" } |
13
|
0
|
|
|
0
|
1
|
|
sub type { "application/x-www-form-urlencoded" } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub format { |
16
|
0
|
|
|
0
|
1
|
|
my ($self, $hash) = @_; |
17
|
0
|
|
|
|
|
|
return build_content($hash); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub parse { |
21
|
0
|
|
|
0
|
1
|
|
my ($self, $content) = @_; |
22
|
0
|
|
|
|
|
|
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 |
63
|
|
|
|
|
|
|
L |
64
|
|
|
|
|
|
|
L |
65
|
|
|
|
|
|
|
L |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHOR |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE |
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
|
|
|
|
|
|
|
1; |