File Coverage

blib/arch/Panda/URI.pm
Criterion Covered Total %
statement 12 21 57.1
branch 1 2 50.0
condition n/a
subroutine 5 7 71.4
pod 0 2 0.0
total 18 32 56.2


line stmt bran cond sub pod time code
1             package Panda::URI;
2 12     12   167725 use parent 'Panda::Export';
  12         2695  
  12         56  
3 12     12   66624 use 5.012;
  12         37  
4 12     12   58 use CPP::panda::lib;
  12         21  
  12         442  
5              
6             our $VERSION = '1.1.3';
7              
8             use Panda::Export {
9 12         2927 ALLOW_LEADING_AUTHORITY => 1,
10             PARAM_DELIM_SEMICOLON => 2,
11 12     12   53 };
  12         22  
12              
13             require Panda::XSLoader;
14             Panda::XSLoader::bootstrap();
15              
16             require overload;
17             overload->import(
18             '""' => \&to_string,
19             'eq' => sub {
20 71 50   71   364782 return ($_[0]->to_string eq $_[1]) unless ref $_[1];
21 0           return $_[0]->equals($_[1]);
22             },
23             'bool' => \&to_bool,
24             fallback => 1,
25             );
26              
27             sub connect_port {
28 0     0 0   my $self = shift;
29 0           my $msg = '$uri->connect_port is deprecated, use $uri->port instead.';
30 0           warn "\e[95m$msg\e[0m";
31 0           return $self->port;
32             }
33              
34             sub connect_location {
35 0     0 0   my $self = shift;
36 0           my $msg = '$uri->connect_location is deprecated, use $uri->location instead.';
37 0           warn "\e[95m$msg\e[0m";
38 0           return $self->location;
39             }
40              
41             package # hide from PAUSE
42             Panda::URI::_userpass;
43             our @ISA = 'Panda::URI';
44              
45             package Panda::URI::http;
46             our @ISA = 'Panda::URI';
47              
48             package Panda::URI::https;
49             our @ISA = 'Panda::URI::http';
50              
51             package Panda::URI::ftp;
52             our @ISA = 'Panda::URI::_userpass';
53              
54             1;