File Coverage

blib/lib/App/NDTools/Util.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 22 24 91.6


line stmt bran cond sub pod time code
1             package App::NDTools::Util;
2              
3 16     16   99 use strict;
  16         27  
  16         471  
4 16     16   69 use warnings FATAL => 'all';
  16         25  
  16         499  
5 16     16   69 use parent 'Exporter';
  16         25  
  16         79  
6              
7 16     16   729 use B qw(SVp_IOK SVp_NOK svref_2object);
  16         26  
  16         2507  
8              
9             our @EXPORT_OK = qw(
10             chomp_evaled_error
11             is_number
12             );
13              
14             sub chomp_evaled_error($) {
15 2     2 0 33 $_[0] =~ s/ at .+ line \d+\.*//;
16 2         7 chomp $_[0];
17              
18 2         18 return $_[0];
19             }
20              
21             sub is_number($) {
22 311     311 0 2125 return svref_2object(\$_[0])->FLAGS & (SVp_IOK | SVp_NOK);
23             }
24              
25             1; # End of App::NDTools::Util