line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::Agent::Dump; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use Any::Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
18162
|
use LWP::UserAgent; |
|
1
|
|
|
|
|
90538
|
|
|
1
|
|
|
|
|
15
|
|
5
|
1
|
|
|
1
|
|
1814
|
use Data::Dump qw(dump); |
|
1
|
|
|
|
|
6765
|
|
|
1
|
|
|
|
|
340
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has '_agent' => ( |
8
|
|
|
|
|
|
|
is => 'ro', |
9
|
|
|
|
|
|
|
default => sub { LWP::UserAgent->new, }, |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub get { |
13
|
0
|
|
|
0
|
0
|
|
my ( $self, $url ) = @_; |
14
|
0
|
|
|
|
|
|
dump($url); |
15
|
0
|
|
|
|
|
|
my $response = $self->_agent->get($url); |
16
|
0
|
|
|
|
|
|
dump($response); |
17
|
0
|
|
|
|
|
|
return $response; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub request { |
21
|
0
|
|
|
0
|
0
|
|
my ( $self, $request ) = @_; |
22
|
0
|
|
|
|
|
|
dump($request); |
23
|
0
|
|
|
|
|
|
my $response = $self->_agent->request($request); |
24
|
0
|
|
|
|
|
|
dump($response); |
25
|
0
|
|
|
|
|
|
return $response; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
15
|
no Any::Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
13
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
OpenID::Lite::Agent::Dump - agent for debug |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $rp = OpenID::Lite::RelyingParty->new( agent => OpenID::Lite::Agent::Dump->new ); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This is just a decorator of LWP::UserAgent. |
43
|
|
|
|
|
|
|
Dump the request and response object for each request. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Copyright (C) 2009 by Lyo Kato |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
54
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or, |
55
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |