| 1 | package System::Info::VMS; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use base "System::Info::Base"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use POSIX (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | our $VERSION = "0.050"; | |
| 11 | |||
| 12 | =head1 NAME | ||
| 13 | |||
| 14 | System::Info::VMS - Object for specific VMS info. | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | =head2 $si->prepare_sysinfo | ||
| 19 | |||
| 20 | Use os-specific tools to find out more about the system. | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | 0 | ▶ | sub prepare_sysinfo { |
|
Subroutine
prepare_sysinfo: not called CC=2 SCAR=17.9
Pod
documented
| |||
| 25 | 0 | my $self = shift; | |
| 26 | 0 | $self->SUPER::prepare_sysinfo; | |
| 27 | |||
| 28 | 0 | my %map = ( | |
| 29 | __cpu => "HW_NAME", | ||
| 30 | __cpu_type => "ARCH_NAME", | ||
| 31 | __cpu_count => "ACTIVECPU_CNT", | ||
| 32 | ); | ||
| 33 | 0 | for my $key (keys %map) { | |
| 34 | 0 | chomp (my $cmd_out = `write sys\$output f\$getsyi("$map{$key}")`); | |
| 35 | 0 | $self->{$key} = $cmd_out; | |
| 36 | } | ||
| 37 | 0 | return $self; | |
| 38 | } # prepare_sysinfo | ||
| 39 | |||
| 40 | =head2 $si->prepare_os | ||
| 41 | |||
| 42 | Use os-specific tools to find out more about the operating system. | ||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | 0 | ▶ | sub prepare_os { |
|
Subroutine
prepare_os: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 47 | 0 | my $self = shift; | |
| 48 | |||
| 49 | 0 | my $os = join " - " => (POSIX::uname ())[0, 3]; | |
| 50 | 0 | $os =~ s/(\S+)/\L$1/; | |
| 51 | 0 | $self->{__os} = $os; | |
| 52 | } # prepare_os | ||
| 53 | |||
| 54 | 2 | 1; | |
| 55 | |||
| 56 | __END__ | ||