| 1 | # | ||||||||||||||||||||||||||||
| 2 | # (c) Ferenc Erki <erkiferenc@gmail.com>, adjust GmbH | ||||||||||||||||||||||||||||
| 3 | # | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | package Rex::Interface::Shell::Idrac; | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use v5.14.4; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 3 | our $VERSION = '1.16.1'; # VERSION | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 3 | ▶ | use Rex::Interface::Shell::Default; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | 3 | ▶ | use base qw(Rex::Interface::Shell::Default); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 16 | 0 | my $class = shift; | |||||||||||||||||||||||||||
| 17 | 0 | ▶ | my $proto = ref($class) || $class; | ||||||||||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||
| 18 | 0 | my $self = $proto->SUPER::new(@_); | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | bless( $self, $class ); | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | return $self; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 2 | ▶ | sub detect { | ||||||||||||||||||||||||||
|
Subroutine
detect: called CC=3 SCAR=12.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 26 | 2 | my ( $self, $con ) = @_; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 2 | my ($output); | |||||||||||||||||||||||||||
| 29 | 2 | eval { | |||||||||||||||||||||||||||
| 30 | 2 | ($output) = $con->direct_exec('version'); | |||||||||||||||||||||||||||
| 31 | 0 | 1; | |||||||||||||||||||||||||||
| 32 | }; | ||||||||||||||||||||||||||||
| 33 | 2 | ▶ | if ( $output && $output =~ m/SM CLP Version: / ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$output and $output =~ /SM CLP Version: /u
MC/DC0%0/2
$output and $output =~ /SM CLP Version: /u
$output
$output =~ /SM CLP Version: /u
Truth table33%1/3
A and B
A= $outputB= $output =~ /SM CLP Version: /u
| |||||||||||||||||||||||||||||
| 34 | 0 | return 1; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 2 | return 0; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub exec { | ||||||||||||||||||||||||||
|
Subroutine
exec: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 41 | 0 | my ( $self, $cmd, $option ) = @_; | |||||||||||||||||||||||||||
| 42 | 0 | return $cmd; | |||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 3 | 1; | |||||||||||||||||||||||||||