line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::Proctitle; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
45365
|
use 5.008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
389
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our %EXPORT_TAGS=( |
11
|
|
|
|
|
|
|
all=>[qw(setproctitle getproctitle)], |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
our @EXPORT_OK=(@{ $EXPORT_TAGS{'all'}}); |
14
|
|
|
|
|
|
|
our @EXPORT=(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
17
|
|
|
|
|
|
|
our $setproctitle_so=$INC{'Sys/Proctitle.pm'}; |
18
|
|
|
|
|
|
|
$setproctitle_so=~s!/Sys/Proctitle\.pm$!/auto/Sys/Proctitle/setproctitle.so! |
19
|
|
|
|
|
|
|
unless( $setproctitle_so=~s!blib/lib/Sys/Proctitle\.pm$!blib/arch/auto/Sys/Proctitle/setproctitle.so! and |
20
|
|
|
|
|
|
|
-f $setproctitle_so and -r _ ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
require XSLoader; |
23
|
|
|
|
|
|
|
XSLoader::load('Sys::Proctitle', $VERSION); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub getproctitle; |
26
|
|
|
|
|
|
|
sub setproctitle; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new { |
29
|
1
|
|
33
|
1
|
1
|
10626
|
my $class=ref($_[0]) || $_[0]; |
30
|
1
|
|
|
|
|
3
|
my $I=bless do{\my $dummy}=>$class; |
|
1
|
|
|
|
|
5
|
|
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
18
|
$$I=getproctitle; |
33
|
1
|
|
|
|
|
18
|
setproctitle( @_[1..$#_] ); |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
5
|
return $I; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub DESTROY { |
39
|
1
|
|
|
1
|
|
777
|
my ($I)=@_; |
40
|
1
|
50
|
|
|
|
23
|
setproctitle( $$I ) if( length $$I ); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |