| blib/lib/WWW/PGXN.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 14 | 19 | 73.6 |
| line | l | !l | condition |
|---|---|---|---|
| 28 | 10 | 5 | $version || '' |
| 62 | 1 | 1 | $self->_fetch_json('userlist', {'letter', lc $letter}) || [] |
| 103 | 2 | 1 | $format ||= "txt" |
| 166 | 70 | 9 | $self->{'uri_templates'} ||= {do { my $req = $self->_request; my $url = "URI"->new($self->url . '/index.json'); my $res = $req->get($url); croak("Request for $url failed: $res->{'status'}: $res->{'reason'}\n") unless $res->{'success'}; my $tmpl = "JSON"->new->utf8->decode($res->{'content'}); map {$_, "URI::Template"->new($tmpl->{$_});} keys %{$tmpl;} }} |
| 262 | 45 | 0 | readline $fh || undef |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 79 | 4 | 1 | 0 | $self->{'_searcher'} ||= "PGXN::API::Searcher"->new("File::Spec"->catdir($url->path_segments)) |
| 95 | 0 | 1 | 0 | $self->{'mirrors'} ||= do { my $mirrors = $self->_fetch_json("mirrors"); [map({"WWW::PGXN::Mirror"->new($_);} @{$mirrors;})] } |
| 191 | 42 | 11 | 0 | $self->{'_req'} ||= $self->url =~ /^file:/ ? "WWW::PGXN::FileReq"->new : "HTTP::Tiny"->new("agent", 'WWW::PGXN/' . __PACKAGE__->VERSION, "proxy", $self->proxy) |