line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package P9Y::ProcessTable::Process; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:BBYRD'; # AUTHORITY |
4
|
|
|
|
|
|
|
our $VERSION = '1.08'; # VERSION |
5
|
|
|
|
|
|
|
# ABSTRACT: Base class for a single process |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
############################################################################# |
8
|
|
|
|
|
|
|
# Modules |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
72
|
|
11
|
3
|
|
|
3
|
|
82
|
use warnings; |
|
3
|
|
|
|
|
28
|
|
|
3
|
|
|
|
|
72
|
|
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
13
|
use Module::Runtime (); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
50
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
13
|
use Moo; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
25
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Figure out which OS role we should consume (if any) |
18
|
|
|
|
|
|
|
my %OS_TRANSLATE = ( |
19
|
|
|
|
|
|
|
cygwin => 'MSWin32', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $role = 'P9Y::ProcessTable::Role::Process::OS::'.($OS_TRANSLATE{$^O} || $^O); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$@ = ''; |
25
|
|
|
|
|
|
|
eval { Module::Runtime::require_module($role) } || do { $role = ''; }; |
26
|
|
|
|
|
|
|
die $@ if $@ and $@ !~ /^Can't locate /; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# This here first, so that it gets overloaded |
29
|
|
|
|
|
|
|
extends 'P9Y::ProcessTable::Process::Base'; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
with $role if $role; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
42; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |