Domain.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 43.7% 14 / 32 CC 5 SCAR 29.5
CC
5
Cov
40%
DomainSearch
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 19.1
« Client.pm ↑ Summary Verifier.pm »
1 package Tomba::Domain;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use parent 'Tomba::Client';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 Tomba::Domain - Domain search for the Tomba.io API
10  
11 =head1 SYNOPSIS
12  
13 use Tomba::Domain;
14  
15 my $tomba = Tomba::Domain->new("ta_xxxxx", "ts_xxxxx");
16 my $results = $tomba->DomainSearch("tomba.io");
17  
18 =head1 DESCRIPTION
19  
20 Search emails based on a website domain.
21  
22 =cut
23  
24 #-------------------------------------------------------------------------------
25 # Domain Search
26 #-------------------------------------------------------------------------------
27  
28 =head2 DomainSearch
29  
30 my $data = $tomba->DomainSearch("tomba.io");
31 print $data->{data}->{organization}->{description};
32  
33 Search emails based on a website domain. Returns all email addresses found on the internet for the given domain.
34  
35 See L<https://docs.tomba.io/api/finder#get-domain-search>
36  
37 =cut
38  
39 0 ▶sub DomainSearch {
Subroutine DomainSearch: not called CC=5 SCAR=34.0
Pod documented
40 0 my ($self, $domain, $opts) = @_;
41 0 my $params = {
42 domain => $domain,
43 };
44 0 ▶ if ($opts && ref($opts) eq 'HASH') {
Branch: 1 branch
BranchTrueFalseTotal
if ($opts and ref $opts eq "HASH") 0 0 0
Condition0%0/3
$opts and ref $opts eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
$opts and ref $opts eq "HASH"
$opts ref $opts eq "HASH"
Truth table0%0/3
A and B
A= $optsB= ref $opts eq "HASH"
ABresult
0X0
100
111
45 0 ▶ $params->{enrich_mobile} = $opts->{enrich_mobile} if exists $opts->{enrich_mobile};
Branch: 1 branch
BranchTrueFalseTotal
if exists $opts->{"enrich_mobile"} 0 0 0
46 0 ▶ $params->{webhook_url} = $opts->{webhook_url} if exists $opts->{webhook_url};
Branch: 1 branch
BranchTrueFalseTotal
if exists $opts->{"webhook_url"} 0 0 0
47 }
48 0 return $self->call(Tomba::Client::SEARCH_PATH, $params);
49 }
50  
51 4 1;
52 __END__
« Client.pm ↑ Summary Verifier.pm »