| blib/arch/URI/XS.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 5 | 13 | 38.4 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 2 | 4 | 50.0 |
| pod | 0 | 2 | 0.0 |
| total | 7 | 19 | 36.8 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package URI::XS; | ||||||
| 2 | 13 | 13 | 1263457 | use 5.012; | |||
| 13 | 161 | ||||||
| 3 | 13 | 13 | 5717 | use XS::Framework; | |||
| 13 | 204889 | ||||||
| 13 | 2855 | ||||||
| 4 | |||||||
| 5 | our $VERSION = '2.1.0'; | ||||||
| 6 | |||||||
| 7 | XS::Loader::bootstrap(); | ||||||
| 8 | |||||||
| 9 | require overload; | ||||||
| 10 | overload->import( | ||||||
| 11 | '""' => \&to_string, | ||||||
| 12 | 'eq' => \&equals, | ||||||
| 13 | 'bool' => \&to_bool, | ||||||
| 14 | #'=' => sub {$_[0]}, | ||||||
| 15 | fallback => 1, | ||||||
| 16 | ); | ||||||
| 17 | |||||||
| 18 | sub connect_port { | ||||||
| 19 | 0 | 0 | 0 | my $self = shift; | |||
| 20 | 0 | my $msg = '$uri->connect_port is deprecated, use $uri->port instead.'; | |||||
| 21 | 0 | warn "\e[95m$msg\e[0m"; | |||||
| 22 | 0 | return $self->port; | |||||
| 23 | } | ||||||
| 24 | |||||||
| 25 | sub connect_location { | ||||||
| 26 | 0 | 0 | 0 | my $self = shift; | |||
| 27 | 0 | my $msg = '$uri->connect_location is deprecated, use $uri->location instead.'; | |||||
| 28 | 0 | warn "\e[95m$msg\e[0m"; | |||||
| 29 | 0 | return $self->location; | |||||
| 30 | } | ||||||
| 31 | |||||||
| 32 | 1; |