File Coverage

blib/lib/WWW/SnipeIT.pm
Criterion Covered Total %
statement 11 17 64.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod n/a
total 15 22 68.1


line stmt bran cond sub pod time code
1             package WWW::SnipeIT;
2              
3 1     1   65114 use v5.26.0;
  1         10  
4 1     1   4 use Modern::Perl '2018'; #5.26
  1         2  
  1         7  
5             our $VERSION = '0.02';
6 1     1   669 use Object::Pad;
  1         8859  
  1         5  
7 1     1   440 use WWW::SnipeIT::Hardware;
  1         3  
  1         79  
8              
9              
10             class SnipeIT {
11             has $accessToken :param;
12             has $endpoint :param;
13              
14 0     0     method snipe () {
  0            
  0            
15 0           my $header = ['Content-Type' => 'application/json; charset=UTF-8', 'Authorization' => 'Bearer '.$accessToken];
16 0           my $asset = Hardware->new('header'=> $header, 'endpoint' => $endpoint);
17            
18 0           return {'hardware' => $asset};
19             }
20             }
21              
22              
23             1;
24             __END__