« blib/lib/OAuth/Lite2/Server/GrantHandler/ExternalService.pm
↑ Summary
blib/lib/OAuth/Lite2/Server/GrantHandler/Password.pm »
| 1 | package OAuth::Lite2::Client::UsernameAndPassword; | ||||||||||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 3 | ▶ | use base 'Class::ErrorHandler'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 3 | ▶ | use bytes (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 3 | ▶ | use Carp (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 3 | ▶ | use Try::Tiny qw/try catch/; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 3 | ▶ | use LWP::UserAgent; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 3 | ▶ | use MIME::Base64 qw(encode_base64); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 3 | ▶ | use HTTP::Request; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | 3 | ▶ | use HTTP::Headers; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 3 | ▶ | use Params::Validate qw(HASHREF); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 3 | ▶ | use OAuth::Lite2; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | 3 | ▶ | use OAuth::Lite2::Util qw(build_content); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 3 | ▶ | use OAuth::Lite2::Client::TokenResponseParser; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | =head1 NAME | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | OAuth::Lite2::Client::UsernameAndPassword - OAuth 2.0 Username And Password Profile Client | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | =head1 SYNOPSIS | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | my $client = OAuth::Lite2::Client::WebServer->new( | ||||||||||||||||||||
| 25 | id => q{my_client_id}, | ||||||||||||||||||||
| 26 | secret => q{my_client_secret}, | ||||||||||||||||||||
| 27 | access_token_uri => q{http://example.org/token}, | ||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | sub get_access_token { | ||||||||||||||||||||
| 31 | my $your_app = shift; | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | my $access_token = $client->get_access_token( | ||||||||||||||||||||
| 34 | username => $your_app->request->param("username"), | ||||||||||||||||||||
| 35 | password => $your_app->request->param("password"), | ||||||||||||||||||||
| 36 | scope => q{photo}, | ||||||||||||||||||||
| 37 | ) or return $your_app->error( $client->errstr ); | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | $your_app->store->save( access_token => $access_token->access_token ); | ||||||||||||||||||||
| 40 | $your_app->store->save( expires_at => time() + $access_token->expires_in ); | ||||||||||||||||||||
| 41 | $your_app->store->save( refresh_token => $access_token->refresh_token ); | ||||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | sub refresh_access_token { | ||||||||||||||||||||
| 45 | my $your_app = shift; | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | my $access_token = $client->refresh_access_token( | ||||||||||||||||||||
| 48 | refresh_token => $refresh_token, | ||||||||||||||||||||
| 49 | ) or return $your_app->error( $client->errstr ); | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | $your_app->store->save( access_token => $access_token->access_token ); | ||||||||||||||||||||
| 52 | $your_app->store->save( expires_at => time() + $access_token->expires_in ); | ||||||||||||||||||||
| 53 | $your_app->store->save( refresh_token => $access_token->refresh_token ); | ||||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | sub access_to_protected_resource { | ||||||||||||||||||||
| 57 | my $your_app = shift; | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | my $access_token = $your_app->store->get("access_token"); | ||||||||||||||||||||
| 60 | my $expires_at = $your_app->store->get("expires_at"); | ||||||||||||||||||||
| 61 | my $refresh_token = $your_app->store->get("refresh_token"); | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | unless ($access_token) { | ||||||||||||||||||||
| 64 | $your_app->show_reauthorize_page(); | ||||||||||||||||||||
| 65 | return; | ||||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | if ($expires_at < time()) { | ||||||||||||||||||||
| 69 | $your_app->refresh_access_token(); | ||||||||||||||||||||
| 70 | return; | ||||||||||||||||||||
| 71 | } | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | my $req = HTTP::Request->new( GET => q{http://example.org/photo} ); | ||||||||||||||||||||
| 74 | $req->header( Authorization => sprintf(q{OAuth %s}, $access_token) ); | ||||||||||||||||||||
| 75 | my $agent = LWP::UserAgent->new; | ||||||||||||||||||||
| 76 | my $res = $agent->request($req); | ||||||||||||||||||||
| 77 | ... | ||||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | =head1 DESCRIPTION | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | OAuth 2.0 Username And Password Profile Client. | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | =head2 new( %params ) | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | =over 4 | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | =item id | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | Client ID | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | =item secret | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | Client secret | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | =item access_token_uri | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | token endpoint uri on auth-server. | ||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | =item refresh_token_uri | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | refresh-token endpoint uri on auth-server. | ||||||||||||||||||||
| 105 | if you omit this, access_token_uri is used instead. | ||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | =item agent | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | user agent. if you omit this, LWP::UserAgent's object is set by default. | ||||||||||||||||||||
| 110 | You can use your custom agent or preset-agents. | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | See also | ||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | L<OAuth::Lite2::Agent::Dump> | ||||||||||||||||||||
| 115 | L<OAuth::Lite2::Agent::Strict> | ||||||||||||||||||||
| 116 | L<OAuth::Lite2::Agent::PSGIMock> | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | =back | ||||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | =cut | ||||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | sub new { | ||||||||||||||||||||
| 123 | 2 | ▶ | my $class = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.5
Pod
documented
| |||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 2 | my %args = Params::Validate::validate(@_, { | |||||||||||||||||||
| 126 | id => 1, | ||||||||||||||||||||
| 127 | secret => 1, | ||||||||||||||||||||
| 128 | # format => { optional => 1 }, | ||||||||||||||||||||
| 129 | access_token_uri => { optional => 1 }, | ||||||||||||||||||||
| 130 | refresh_token_uri => { optional => 1 }, | ||||||||||||||||||||
| 131 | agent => { optional => 1 }, | ||||||||||||||||||||
| 132 | }); | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 2 | my $self = bless { | |||||||||||||||||||
| 135 | id => undef, | ||||||||||||||||||||
| 136 | secret => undef, | ||||||||||||||||||||
| 137 | access_token_uri => undef, | ||||||||||||||||||||
| 138 | refresh_token_uri => undef, | ||||||||||||||||||||
| 139 | last_request => undef, | ||||||||||||||||||||
| 140 | last_response => undef, | ||||||||||||||||||||
| 141 | %args, | ||||||||||||||||||||
| 142 | }, $class; | ||||||||||||||||||||
| 143 | |||||||||||||||||||||
| 144 | 2 | ▶ | unless ($self->{agent}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 145 | 0 | $self->{agent} = LWP::UserAgent->new; | |||||||||||||||||||
| 146 | $self->{agent}->agent( | ||||||||||||||||||||
| 147 | 0 | join "/", __PACKAGE__, $OAuth::Lite2::VERSION); | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | # $self->{format} ||= 'json'; | ||||||||||||||||||||
| 151 | 2 | $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new; | |||||||||||||||||||
| 152 | |||||||||||||||||||||
| 153 | 2 | return $self; | |||||||||||||||||||
| 154 | } | ||||||||||||||||||||
| 155 | |||||||||||||||||||||
| 156 | =head2 get_access_token( %params ) | ||||||||||||||||||||
| 157 | |||||||||||||||||||||
| 158 | =over 4 | ||||||||||||||||||||
| 159 | |||||||||||||||||||||
| 160 | =item username | ||||||||||||||||||||
| 161 | |||||||||||||||||||||
| 162 | =item password | ||||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | =item scope | ||||||||||||||||||||
| 165 | |||||||||||||||||||||
| 166 | =back | ||||||||||||||||||||
| 167 | |||||||||||||||||||||
| 168 | =cut | ||||||||||||||||||||
| 169 | |||||||||||||||||||||
| 170 | sub get_access_token { | ||||||||||||||||||||
| 171 | 8 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
get_access_token: called CC=7 SCAR=19.6
Pod
documented
| |||||||||||||||||||||
| 172 | |||||||||||||||||||||
| 173 | 8 | my %args = Params::Validate::validate(@_, { | |||||||||||||||||||
| 174 | username => 1, | ||||||||||||||||||||
| 175 | password => 1, | ||||||||||||||||||||
| 176 | scope => { optional => 1 }, | ||||||||||||||||||||
| 177 | uri => { optional => 1 }, | ||||||||||||||||||||
| 178 | use_basic_schema => { optional => 1 }, | ||||||||||||||||||||
| 179 | # secret_type => { optional => 1 }, | ||||||||||||||||||||
| 180 | # format => { optional => 1 }, | ||||||||||||||||||||
| 181 | }); | ||||||||||||||||||||
| 182 | |||||||||||||||||||||
| 183 | 8 | ▶ | unless (exists $args{uri}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 184 | $args{uri} = $self->{access_token_uri} | ||||||||||||||||||||
| 185 | 8 | ▶ | || Carp::croak "uri not found"; | ||||||||||||||||||
|
Condition33%1/3
$self->{'access_token_uri'} || Carp::croak('uri not found')
MC/DC0%0/2
$self->{'access_token_uri'} || Carp::croak('uri not found')
$self->{'access_token_uri'}
Carp::croak('uri not found')
Truth table33%1/3
A || B
A= $self->{'access_token_uri'}B= Carp::croak('uri not found')
| |||||||||||||||||||||
| 186 | } | ||||||||||||||||||||
| 187 | |||||||||||||||||||||
| 188 | # $args{format} ||= $self->{format}; | ||||||||||||||||||||
| 189 | |||||||||||||||||||||
| 190 | my %params = ( | ||||||||||||||||||||
| 191 | grant_type => 'password', | ||||||||||||||||||||
| 192 | username => $args{username}, | ||||||||||||||||||||
| 193 | password => $args{password}, | ||||||||||||||||||||
| 194 | # format => $args{format}, | ||||||||||||||||||||
| 195 | 8 | ); | |||||||||||||||||||
| 196 | |||||||||||||||||||||
| 197 | 8 | ▶ | unless ($args{use_basic_schema}){ | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 198 | 4 | $params{client_id} = $self->{id}; | |||||||||||||||||||
| 199 | 4 | $params{client_secret} = $self->{secret}; | |||||||||||||||||||
| 200 | } | ||||||||||||||||||||
| 201 | |||||||||||||||||||||
| 202 | $params{scope} = $args{scope} | ||||||||||||||||||||
| 203 | 8 | ▶ | if $args{scope}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 204 | |||||||||||||||||||||
| 205 | # $params{secret_type} = $args{secret_type} | ||||||||||||||||||||
| 206 | # if $args{secret_type}; | ||||||||||||||||||||
| 207 | |||||||||||||||||||||
| 208 | 8 | my $content = build_content(\%params); | |||||||||||||||||||
| 209 | 8 | my $headers = HTTP::Headers->new; | |||||||||||||||||||
| 210 | 8 | $headers->header("Content-Type" => q{application/x-www-form-urlencoded}); | |||||||||||||||||||
| 211 | 8 | $headers->header("Content-Length" => bytes::length($content)); | |||||||||||||||||||
| 212 | $headers->authorization_basic($self->{id}, $self->{secret}) | ||||||||||||||||||||
| 213 | 8 | ▶ | if($args{use_basic_schema}); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 214 | 8 | my $req = HTTP::Request->new( POST => $args{uri}, $headers, $content ); | |||||||||||||||||||
| 215 | |||||||||||||||||||||
| 216 | 8 | my $res = $self->{agent}->request($req); | |||||||||||||||||||
| 217 | 8 | $self->{last_request} = $req; | |||||||||||||||||||
| 218 | 8 | $self->{last_response} = $res; | |||||||||||||||||||
| 219 | |||||||||||||||||||||
| 220 | 8 | my ($token, $errmsg); | |||||||||||||||||||
| 221 | try { | ||||||||||||||||||||
| 222 | 8 | ▶ | $token = $self->{response_parser}->parse($res); | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 223 | } catch { | ||||||||||||||||||||
| 224 | 6 | ▶ | $errmsg = "$_"; | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 225 | 8 | }; | |||||||||||||||||||
| 226 | 8 | ▶ | return $token || $self->error($errmsg); | ||||||||||||||||||
|
Condition66%2/3
$token || $self->error($errmsg)
MC/DC50%1/2
$token || $self->error($errmsg)
$token
$self->error($errmsg)
Truth table66%2/3
A || B
A= $tokenB= $self->error($errmsg)
| |||||||||||||||||||||
| 227 | |||||||||||||||||||||
| 228 | } | ||||||||||||||||||||
| 229 | |||||||||||||||||||||
| 230 | =head2 refresh_access_token( %params ) | ||||||||||||||||||||
| 231 | |||||||||||||||||||||
| 232 | =over 4 | ||||||||||||||||||||
| 233 | |||||||||||||||||||||
| 234 | =item refresh_token | ||||||||||||||||||||
| 235 | |||||||||||||||||||||
| 236 | =back | ||||||||||||||||||||
| 237 | |||||||||||||||||||||
| 238 | =cut | ||||||||||||||||||||
| 239 | |||||||||||||||||||||
| 240 | sub refresh_access_token { | ||||||||||||||||||||
| 241 | 4 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
refresh_access_token: called CC=6 SCAR=18.0
Pod
documented
| |||||||||||||||||||||
| 242 | |||||||||||||||||||||
| 243 | 4 | my %args = Params::Validate::validate(@_, { | |||||||||||||||||||
| 244 | refresh_token => 1, | ||||||||||||||||||||
| 245 | uri => { optional => 1 }, | ||||||||||||||||||||
| 246 | use_basic_schema => { optional => 1 }, | ||||||||||||||||||||
| 247 | # secret_type => { optional => 1 }, | ||||||||||||||||||||
| 248 | # format => { optional => 1 }, | ||||||||||||||||||||
| 249 | }); | ||||||||||||||||||||
| 250 | |||||||||||||||||||||
| 251 | 4 | ▶ | unless (exists $args{uri}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 252 | $args{uri} = $self->{access_token_uri} | ||||||||||||||||||||
| 253 | 4 | ▶ | || Carp::croak "uri not found"; | ||||||||||||||||||
|
Condition33%1/3
$self->{'access_token_uri'} || Carp::croak('uri not found')
MC/DC0%0/2
$self->{'access_token_uri'} || Carp::croak('uri not found')
$self->{'access_token_uri'}
Carp::croak('uri not found')
Truth table33%1/3
A || B
A= $self->{'access_token_uri'}B= Carp::croak('uri not found')
| |||||||||||||||||||||
| 254 | } | ||||||||||||||||||||
| 255 | |||||||||||||||||||||
| 256 | # $args{format} ||= $self->{format}; | ||||||||||||||||||||
| 257 | |||||||||||||||||||||
| 258 | my %params = ( | ||||||||||||||||||||
| 259 | grant_type => 'refresh_token', | ||||||||||||||||||||
| 260 | refresh_token => $args{refresh_token}, | ||||||||||||||||||||
| 261 | # format => $args{format}, | ||||||||||||||||||||
| 262 | 4 | ); | |||||||||||||||||||
| 263 | |||||||||||||||||||||
| 264 | 4 | ▶ | unless ($args{use_basic_schema}){ | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 265 | 2 | $params{client_id} = $self->{id}; | |||||||||||||||||||
| 266 | 2 | $params{client_secret} = $self->{secret}; | |||||||||||||||||||
| 267 | } | ||||||||||||||||||||
| 268 | |||||||||||||||||||||
| 269 | # $params{secret_type} = $args{secret_type} | ||||||||||||||||||||
| 270 | # if $args{secret_type}; | ||||||||||||||||||||
| 271 | |||||||||||||||||||||
| 272 | 4 | my $content = build_content(\%params); | |||||||||||||||||||
| 273 | 4 | my $headers = HTTP::Headers->new; | |||||||||||||||||||
| 274 | 4 | $headers->header("Content-Type" => q{application/x-www-form-urlencoded}); | |||||||||||||||||||
| 275 | 4 | $headers->header("Content-Length" => bytes::length($content)); | |||||||||||||||||||
| 276 | $headers->authorization_basic($self->{id}, $self->{secret}) | ||||||||||||||||||||
| 277 | 4 | ▶ | if($args{use_basic_schema}); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 278 | 4 | my $req = HTTP::Request->new( POST => $args{uri}, $headers, $content ); | |||||||||||||||||||
| 279 | |||||||||||||||||||||
| 280 | 4 | my $res = $self->{agent}->request($req); | |||||||||||||||||||
| 281 | 4 | $self->{last_request} = $req; | |||||||||||||||||||
| 282 | 4 | $self->{last_response} = $res; | |||||||||||||||||||
| 283 | |||||||||||||||||||||
| 284 | 4 | my ($token, $errmsg); | |||||||||||||||||||
| 285 | try { | ||||||||||||||||||||
| 286 | 4 | ▶ | $token = $self->{response_parser}->parse($res); | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 287 | } catch { | ||||||||||||||||||||
| 288 | 2 | ▶ | $errmsg = "$_"; | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 289 | 4 | }; | |||||||||||||||||||
| 290 | 4 | ▶ | return $token || $self->error($errmsg); | ||||||||||||||||||
|
Condition66%2/3
$token || $self->error($errmsg)
MC/DC50%1/2
$token || $self->error($errmsg)
$token
$self->error($errmsg)
Truth table66%2/3
A || B
A= $tokenB= $self->error($errmsg)
| |||||||||||||||||||||
| 291 | } | ||||||||||||||||||||
| 292 | |||||||||||||||||||||
| 293 | =head2 last_request | ||||||||||||||||||||
| 294 | |||||||||||||||||||||
| 295 | Returns a HTTP::Request object that is used | ||||||||||||||||||||
| 296 | when you obtain or refresh access token last time internally. | ||||||||||||||||||||
| 297 | |||||||||||||||||||||
| 298 | =head2 last_request | ||||||||||||||||||||
| 299 | |||||||||||||||||||||
| 300 | Returns a HTTP::Response object that is used | ||||||||||||||||||||
| 301 | when you obtain or refresh access token last time internally. | ||||||||||||||||||||
| 302 | |||||||||||||||||||||
| 303 | =cut | ||||||||||||||||||||
| 304 | |||||||||||||||||||||
| 305 | 0 | ▶ | sub last_request { $_[0]->{last_request} } | ||||||||||||||||||
|
Subroutine
last_request: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 306 | 0 | ▶ | sub last_response { $_[0]->{last_response} } | ||||||||||||||||||
|
Subroutine
last_response: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 307 | |||||||||||||||||||||
| 308 | =head1 AUTHOR | ||||||||||||||||||||
| 309 | |||||||||||||||||||||
| 310 | Lyo Kato, E<lt>lyo.kato@gmail.comE<gt> | ||||||||||||||||||||
| 311 | |||||||||||||||||||||
| 312 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||
| 313 | |||||||||||||||||||||
| 314 | Copyright (C) 2010 by Lyo Kato | ||||||||||||||||||||
| 315 | |||||||||||||||||||||
| 316 | This library is free software; you can redistribute it and/or modify | ||||||||||||||||||||
| 317 | it under the same terms as Perl itself, either Perl version 5.8.8 or, | ||||||||||||||||||||
| 318 | at your option, any later version of Perl 5 you may have available. | ||||||||||||||||||||
| 319 | |||||||||||||||||||||
| 320 | =cut | ||||||||||||||||||||
| 321 | |||||||||||||||||||||
| 322 | 3 | 1; | |||||||||||||||||||