lib/Rex/Args/Integer.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 56.5% 13 / 23 CC 2 SCAR 11.0
CC
2
Cov
56%
get
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« lib/Rex/Virtualization/VBox/status.pm ↑ Summary lib/Rex/Virtualization/LibVirt/status.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Args::Integer;
6  
7 1 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '1.16.1'; # VERSION
11  
12 1 ▶use Rex::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 0 ▶sub get {
Subroutine get: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my ( $class, $name ) = @_;
16  
17 0 my $arg = shift @ARGV;
18  
19 0 ▶ if ( $arg =~ m/^\d+$/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($arg =~ /^\d+$/u) 0 0 0
20 0 return $arg;
21 }
22  
23 0 Rex::Logger::debug("Invalid argument for $name");
24  
25 0 return;
26 }
27  
28 1 1;
« lib/Rex/Virtualization/VBox/status.pm ↑ Summary lib/Rex/Virtualization/LibVirt/status.pm »