line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XAS::Lib::Mixins::Process; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
4
|
|
|
|
|
|
|
my $mixin; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
862
|
$mixin = 'XAS::Lib::Mixins::Process::Unix'; |
8
|
1
|
50
|
|
|
|
38
|
$mixin = 'XAS::Lib::Mixins::Process::Win32' if ($^O eq 'MSWin32'); |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use XAS::Class |
12
|
1
|
|
|
|
|
10
|
debug => 0, |
13
|
|
|
|
|
|
|
version => $VERSION, |
14
|
|
|
|
|
|
|
base => 'XAS::Base', |
15
|
|
|
|
|
|
|
mixin => $mixin, |
16
|
|
|
|
|
|
|
mixins => 'proc_status', |
17
|
1
|
|
|
1
|
|
4
|
; |
|
1
|
|
|
|
|
1
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
20
|
|
|
|
|
|
|
# Public Methods |
21
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
24
|
|
|
|
|
|
|
# Private Methods |
25
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
XAS::Lib::Mixins::Process - A mixin for the XAS environment |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
use XAS::Class |
38
|
|
|
|
|
|
|
debug => 0, |
39
|
|
|
|
|
|
|
version => '0.01', |
40
|
|
|
|
|
|
|
base => 'XAS::Base', |
41
|
|
|
|
|
|
|
mixin => 'XAS::Lib::Mixins::Process' |
42
|
|
|
|
|
|
|
; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This mixin provides a way to check processes on the current system. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 METHODS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 proc_status($pid) |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Returns the status of the process id. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=over 4 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item B<$pid> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
The process id to check. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=over 4 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item L<XAS|XAS> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=back |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Kevin L. Esteb, E<lt>kevin@kesteb.usE<gt> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Copyright (c) 2012-2015 Kevin L. Esteb |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
79
|
|
|
|
|
|
|
the terms of the Artistic License 2.0. For details, see the full text |
80
|
|
|
|
|
|
|
of the license at http://www.perlfoundation.org/artistic_license_2_0. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |