File Coverage

blib/lib/App/Prove/Elasticsearch/Blamer/System.pm
Criterion Covered Total %
statement 14 16 87.5
branch n/a
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 23 86.9


line stmt bran cond sub pod time code
1             # ABSTRACT: Determine the responsible party for tests via system user & hostname for upload to elasticsearch
2             # PODNAME: App::Prove::Elasticsearch::Blamer::Env
3              
4             package App::Prove::Elasticsearch::Blamer::System;
5             $App::Prove::Elasticsearch::Blamer::System::VERSION = '0.001';
6 1     1   78847 use strict;
  1         11  
  1         32  
7 1     1   5 use warnings;
  1         2  
  1         17  
8 1     1   468 use utf8;
  1         10  
  1         3  
9              
10 1     1   337 use System::Info;
  1         12777  
  1         101  
11              
12             sub get_responsible_party {
13 1     1 1 102 my $info = System::Info->sysinfo_hash();
14 1         6 return _get_uname() . '@' . $info->{hostname};
15             }
16              
17             sub _get_uname {
18 0     0     my @pw_info = getpwuid($<);
19 0           return $pw_info[0];
20             }
21              
22             1;
23              
24             __END__