| 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 | 2 | $App::Prove::Elasticsearch::Blamer::System::VERSION = '0.001'; | |
| 6 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | ▶ | use System::Info; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | ▶ | sub get_responsible_party { |
|
Subroutine
get_responsible_party: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 1 | my $info = System::Info->sysinfo_hash(); | |
| 14 | 1 | return _get_uname() . '@' . $info->{hostname}; | |
| 15 | } | ||
| 16 | |||
| 17 | 0 | ▶ | sub _get_uname { |
|
Subroutine
_get_uname: not called CC=1 SCAR=6.9
| |||
| 18 | 0 | my @pw_info = getpwuid($<); | |
| 19 | 0 | return $pw_info[0]; | |
| 20 | } | ||
| 21 | |||
| 22 | 2 | 1; | |
| 23 | |||
| 24 | __END__ | ||