File Coverage

blib/lib/Scalar/DDie.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 26 27 96.3


line stmt bran cond sub pod time code
1             package Scalar::DDie;
2 2     2   39555 use strict;
  2         5  
  2         83  
3 2     2   1216 use warnings;
  2         4  
  2         80  
4 2     2   71 use 5.008005;
  2         7  
  2         135  
5             our $VERSION = '0.0.2';
6 2     2   2311 use parent qw/Exporter/;
  2         723  
  2         11  
7              
8             our @EXPORT = qw(ddie);
9 2     2   126 use Carp ();
  2         4  
  2         155  
10              
11             sub ddie($) {
12 2 100   2 0 11 if (defined($_[0])) {
13 1         7 return $_[0];
14             } else {
15 1         166 Carp::croak("The value is not defined.");
16             }
17             }
18              
19             1;
20             __END__