File Coverage

blib/lib/Tree/From/Struct.pm
Criterion Covered Total %
statement 6 6 100.0
branch 1 2 50.0
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 10 11 90.9


line stmt bran cond sub pod time code
1             package Tree::From::Struct;
2              
3             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
4             our $DATE = '2021-05-06'; # DATE
5             our $DIST = 'Tree-From-Struct'; # DIST
6             our $VERSION = '0.041'; # VERSION
7              
8             require Code::Includable::Tree::FromStruct;
9              
10 1     1   65807 use Exporter qw(import);
  1         89  
  1         147  
11             our @EXPORT_OK = qw(build_tree_from_struct);
12              
13             sub build_tree_from_struct {
14 1     1 1 81 my $struct = shift;
15              
16 1 50       4 my $class = $struct->{_class} or die "Please specify _class in struct";
17 1         4 Code::Includable::Tree::FromStruct::new_from_struct($class, $struct);
18             }
19              
20             1;
21             # ABSTRACT: Build a tree object from hash structure
22              
23             __END__