| 1 | package P9Y::ProcessTable::Process; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | our $AUTHORITY = 'cpan:BBYRD'; # AUTHORITY | |||||||||||||||||||||||||||
| 4 | 3 | our $VERSION = '1.06_01'; # VERSION | |||||||||||||||||||||||||||
| 5 | # ABSTRACT: Base class for a single process | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | ############################################################################# | ||||||||||||||||||||||||||||
| 8 | # Modules | ||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 3 | ▶ | use Module::Runtime (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 3 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | # Figure out which OS role we should consume (if any) | ||||||||||||||||||||||||||||
| 18 | 3 | my %OS_TRANSLATE = ( | |||||||||||||||||||||||||||
| 19 | cygwin => 'MSWin32', | ||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 3 | ▶ | my $role = 'P9Y::ProcessTable::Role::Process::OS::'.($OS_TRANSLATE{$^O} || $^O); | ||||||||||||||||||||||||||
|
Condition33%1/3
$OS_TRANSLATE{$^O} || $^O
MC/DC0%0/2
$OS_TRANSLATE{$^O} || $^O
$OS_TRANSLATE{$^O}
$^O
Truth table33%1/3
A || B
A= $OS_TRANSLATE{$^O}B= $^O
| |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 3 | $@ = ''; | |||||||||||||||||||||||||||
| 25 | 3 | ▶ | eval { Module::Runtime::require_module($role) } || do { $role = ''; }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 26 | 3 | ▶ | die $@ if $@ and $@ !~ /^Can't locate /; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$@ and not $@ =~ /^Can't locate /
MC/DC0%0/2
$@ and not $@ =~ /^Can't locate /
$@
not $@ =~ /^Can't locate /
Truth table33%1/3
A and not(B)
A= $@B= not $@ =~ /^Can't locate /
| |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | # This here first, so that it gets overloaded | ||||||||||||||||||||||||||||
| 29 | 3 | extends 'P9Y::ProcessTable::Process::Base'; | |||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 3 | ▶ | with $role if $role; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 3 | 42; | |||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||||||||||