- Timestamp:
- Sep 19, 2011, 1:31:35 PM (13 years ago)
- Children:
- c104b43
- Parents:
- cfca761
- git-author:
- Edward Z. Yang <ezyang@mit.edu> (07/12/11 09:17:04)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (09/19/11 13:31:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Facebook/lib/Facebook/Graph/AccessToken/Response.pm
rcfca761 r9820d55 18 18 lazy => 1, 19 19 default => sub { 20 # LOL error handling 20 21 my $self = shift; 21 my $response = $self->response; 22 if ($response->is_success) { 23 return URI->new('?'.$response->content)->query_param('access_token'); 24 } 25 else { 26 ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string; 27 } 22 return URI->new('?'.$self->response)->query_param('access_token'); 23 #else { 24 # ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string; 25 #} 28 26 } 29 27 ); … … 33 31 lazy => 1, 34 32 default => sub { 33 # LOL error handling 35 34 my $self = shift; 36 my $response = $self->response; 37 if ($response->is_success) { 38 return URI->new('?'.$response->content)->query_param('expires'); 39 } 40 else { 41 ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string; 42 } 35 return URI->new('?'.$self->response)->query_param('expires'); 36 #else { 37 # ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string; 38 #} 43 39 } 44 40 );
Note: See TracChangeset
for help on using the changeset viewer.