File Coverage

blib/lib/OpenTelemetry/X.pm
Criterion Covered Total %
statement 10 10 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 4 4 100.0
pod 2 2 100.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package OpenTelemetry::X;
2              
3             our $VERSION = '0.033';
4              
5 17     17   354426 use X::Tiny;
  17         62140  
  17         911  
6 17     17   3783 use parent 'X::Tiny::Base';
  17         3147  
  17         152  
7              
8 16     16 1 15775 sub to_string { '' . shift->[0] } # Do not print exception type
9              
10             sub create {
11 19   66 19 1 431709 my $pkg = ref($_[0]) || $_[0];
12              
13 19 100       80 die "The use of $pkg->create is not allowed. Call OpenTelemetry::X->create instead"
14             unless $pkg eq 'OpenTelemetry::X';
15              
16 18         92 goto \&X::Tiny::create;
17             }
18              
19             1;