Branch Coverage

blib/lib/Async/Redis/URI.pm
Criterion Covered Total %
branch 37 46 80.4


line true false branch
12 0 18 unless defined $str
25 2 24 unless defined $uri_string and $uri_string ne ""
36 7 17 if ($uri_string =~ m[^(redis\+unix)://(?:(?::([^\@]*))?@)?(/[^?]+)(?:\?(.*))?$]u)
38 1 6 if defined $2 and $2 ne ""
47 4 3 if (defined $4)
53 4 0 if exists $query{'db'}
60 4 13 unless ($uri_string =~ m[^(rediss?)://(.+)$]u)
68 3 10 if $scheme eq "rediss"
72 7 6 if ($rest =~ /^([^\@]*)@(.+)$/u) { }
80 7 6 if (defined $userinfo and $userinfo ne "")
81 2 5 if ($userinfo =~ /^:(.*)$/u) { }
5 0 elsif ($userinfo =~ /^([^:]*):(.*)$/u) { }
95 13 0 if ($hostinfo =~ m[^([^:/]+)(?::(\d+))?(?:/(\d+))?$]u) { }
0 0 elsif ($hostinfo =~ m[^([^:/]+)(?::(\d+))?/?$]u) { }
97 4 9 if defined $2
98 4 9 if defined $3
102 0 0 if defined $2
108 0 13 unless $parsed{'host'}
129 3 2 if ($self->is_unix) { }
136 3 2 if $self->database
137 1 4 if defined $self->username
138 1 4 if defined $self->password
139 1 4 if $self->tls