Branch Coverage

lib/Pcore/Util/URI/Web2.pm
Criterion Covered Total %
branch 18 36 50.0


line true false branch
21 15 19 if $$WEB2_CFG{$host}{'re'}
23 33 1 if ($host =~ /[.]/msu) { }
52 0 0 unless $merge
65 1 17 unless $WEB2_HOST_RE
69 16 2 if ($self->host->canon =~ /$WEB2_HOST_RE/u)
72 10 6 exists $Pcore::Util::URI::Web2::WEB2_CFG->{$web2_domain} ? :
74 5 11 if ($$WEB2_CFG{$web2_id}{'path'}) { }
5 6 elsif ($self->host->canon =~ /([^.]+[.]\Q$web2_domain\E)\z/msu) { }
77 3 2 if ($self->host->canon eq $web2_domain and $self->path =~ m[\A(/[^/]+)/?]msu)
90 0 0 if (my $web2_data = $self->_web2_data) { }
99 0 0 if (my $web2_data = $self->_web2_data) { }
108 8 10 if (my $web2_data = $self->_web2_data) { }
117 0 0 if (my $web2_data = $self->_web2_data) { }
127 0 0 unless $self->is_web2
129 0 0 unless $http_res->body
135 0 0 if ($$cfg{'status'} and $http_res->status == $$cfg{'status'})
137 0 0 if ($$WEB2_RE{$web2_id})
140 0 0 if ${$http_res->body} =~ /$$WEB2_RE{$web2_id}/u