line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Linux::Perl::uname; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Linux::Perl::uname |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @parts = Linux::Perl::uname->uname(); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my @parts = Linux::Perl::uname::x86_64->uname(); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
This module returns the list of strings from the C system call. |
18
|
|
|
|
|
|
|
See C for the specifics of what that means. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
169395
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
87
|
|
23
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
90
|
|
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
3
|
|
1176
|
use Call::Context; |
|
3
|
|
|
|
|
810
|
|
|
3
|
|
|
|
|
99
|
|
26
|
3
|
|
|
3
|
|
993
|
use Linux::Perl; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
87
|
|
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
3
|
|
15
|
use constant BUFFER_SIZE => 257 * 6; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
498
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub uname { |
31
|
2
|
|
|
2
|
0
|
622008
|
my ($class) = @_; |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
57
|
Call::Context::must_be_list(); |
34
|
|
|
|
|
|
|
|
35
|
2
|
100
|
|
|
|
101
|
if (!$class->can('NR_uname')) { |
36
|
1
|
|
|
|
|
4399
|
require Linux::Perl::ArchLoader; |
37
|
1
|
|
|
|
|
6
|
$class = Linux::Perl::ArchLoader::get_arch_module($class); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
2
|
|
|
|
|
8
|
my $buf = ("\0" x BUFFER_SIZE); |
41
|
2
|
|
|
|
|
37
|
Linux::Perl::call( $class->NR_uname(), $buf ); |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
55
|
return split m<\0+>, $buf; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |