Info/Plugin/Generic.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 62.9% 17 / 27 SCAR 0.3
CC
1
Cov
70%
meta
2.0
get_info
2.0
BEGIN
1.0
CRAP 1.0
« Info/Plugin/SearchQuery/tokopedia.pm ↑ Summary
1 package URI::Info::Plugin::Generic;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7 1 our $DATE = '2021-10-17'; # DATE
8 1 our $DIST = 'URI-Info'; # DIST
9 1 our $VERSION = '0.002'; # VERSION
10  
11 1 ▶use parent 'URI::Info::PluginBase';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 sub meta {
14 return {
15 0 ▶ summary => 'Extract generic info from URL',
Subroutine meta: not called CC=1 SCAR=6.9
Pod undocumented
16 conf => {
17 },
18 };
19 }
20  
21 sub get_info {
22 0 ▶ my ($self, $stash) = @_;
Subroutine get_info: not called CC=1 SCAR=6.9
Pod undocumented
23 0 my $url = $stash->{url};
24 0 my $res = $stash->{res};
25  
26 0 $res->{host} = $url->host;
27  
28 0 [200]; # 200=OK, 201=OK & skip the rest of the plugins, 500=error
29 }
30  
31 1 1;
32 # ABSTRACT:
33  
34 __END__
« Info/Plugin/SearchQuery/tokopedia.pm ↑ Summary