line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Platform::Info::Irix; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
7515
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
117
|
|
4
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
111
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
22
|
use vars qw($VERSION); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1531
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.00'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %commands = ( |
12
|
|
|
|
|
|
|
'_issue1' => 'cat /etc/issue', |
13
|
|
|
|
|
|
|
'_issue2' => 'cat /etc/.issue', |
14
|
|
|
|
|
|
|
'_uname' => 'uname -a', |
15
|
|
|
|
|
|
|
'kname' => 'uname -s', |
16
|
|
|
|
|
|
|
'kvers' => 'uname -r', |
17
|
|
|
|
|
|
|
'osname' => 'uname -o', |
18
|
|
|
|
|
|
|
'archname' => 'uname -m', |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
'_irix1' => 'uname -R', # IRIX specific |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
0
|
|
|
0
|
1
|
|
my ($class) = @_; |
27
|
0
|
|
|
|
|
|
my $self = {}; |
28
|
0
|
|
|
|
|
|
bless $self, $class; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_info { |
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
for my $cmd (keys %commands) { |
37
|
0
|
|
|
|
|
|
$self->{cmds}{$cmd} = `$commands{$cmd} 2>/dev/null`; |
38
|
0
|
|
|
|
|
|
$self->{cmds}{$cmd} =~ s/\s+$//s; |
39
|
0
|
0
|
|
|
|
|
$self->{info}{$cmd} = $self->{cmds}{$cmd} if($cmd !~ /^_/); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
$self->{info}{osflag} = $^O; |
43
|
0
|
|
|
|
|
|
$self->{info}{kernel} = lc($self->{info}{kname}) . '-' . $self->{info}{kvers}; |
44
|
0
|
|
|
|
|
|
$self->{info}{osname} = 'IRIX'; |
45
|
0
|
|
|
|
|
|
$self->{info}{oslabel} = 'IRIX'; |
46
|
0
|
|
|
|
|
|
$self->{info}{osvers} = $self->{info}{kvers}; |
47
|
0
|
0
|
|
|
|
|
$self->{info}{is32bit} = $self->{info}{kname} !~ /64/ ? 1 : 0; |
48
|
0
|
0
|
|
|
|
|
$self->{info}{is64bit} = $self->{info}{kname} =~ /64/ ? 1 : 0; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$self->{info}{source}{$commands{$_}} = $self->{cmds}{$_} for(keys %commands); |
51
|
0
|
|
|
|
|
|
return $self->{info}; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |