| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Ixchel::functions::manufacturer; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
110055
|
use 5.006; |
|
|
1
|
|
|
|
|
5
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
116
|
|
|
5
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
63
|
|
|
6
|
1
|
|
|
1
|
|
662
|
use File::Slurp; |
|
|
1
|
|
|
|
|
43684
|
|
|
|
1
|
|
|
|
|
100
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use Exporter 'import'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
131
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT = qw(manufacturer); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Ixchel::functions::manufacturer - Returns the manufacturer of the system found via dmidecode. |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Version 0.0.1 |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.1'; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
use Ixchel::functions::manufacturer; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
print 'Manufacturer: '.manufacturer."\n"; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 Functions |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 manufacturer |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Fetches system-manufacturer via dmidecode. |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
If not ran as root, this will return blank. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub manufacturer { |
|
39
|
0
|
|
|
0
|
1
|
|
my $output = `dmidecode --string=system-manufacturer 2> /dev/null`; |
|
40
|
0
|
|
|
|
|
|
chomp($output); |
|
41
|
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return $output; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |