| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WebService::Heartrails::Express::Provider::Common; | 
| 2 | 2 |  |  | 2 |  | 30 | use strict; | 
|  | 2 |  |  |  |  | 2 |  | 
|  | 2 |  |  |  |  | 61 |  | 
| 3 | 2 |  |  | 2 |  | 10 | use warnings; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 42 |  | 
| 4 | 2 |  |  | 2 |  | 9 | use utf8; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 29 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 2 |  |  | 2 |  | 58 | use constant  API_ENDPOINT => 'http://express.heartrails.com/api/json?'; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 155 |  | 
| 7 | 2 |  |  | 2 |  | 126278 | use JSON; | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | use Encode; | 
| 9 |  |  |  |  |  |  | use URI; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | sub call{ | 
| 12 |  |  |  |  |  |  | my($class,$sub_url) = @_; | 
| 13 |  |  |  |  |  |  | my $uri = URI->new(API_ENDPOINT); | 
| 14 |  |  |  |  |  |  | $uri->query_form(%$sub_url); | 
| 15 |  |  |  |  |  |  | my $res = $class->furl->get($uri); | 
| 16 |  |  |  |  |  |  | my $content = $res->content; | 
| 17 |  |  |  |  |  |  | return $content; | 
| 18 |  |  |  |  |  |  | } | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | 1; | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  |  |