File Coverage

lib/Context/Singleton/Frame/Promise/Builder.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 0 3 0.0
total 24 27 88.8


line stmt bran cond sub pod time code
1              
2 4     4   480 use strict;
  4         10  
  4         121  
3 4     4   35 use warnings;
  4         10  
  4         208  
4              
5             package Context::Singleton::Frame::Promise::Builder;
6              
7             our $VERSION = v1.0.4;
8              
9 4     4   24 use parent qw[ Context::Singleton::Frame::Promise ];
  4         17  
  4         22  
10              
11             sub new {
12 49     49 0 14503 my ($class, %params) = @_;
13              
14 49         172 my $self = $class->SUPER::new (%params);
15              
16 49         133 $self->{builder} = $params{builder};
17              
18 49         132 $self;
19             }
20              
21             sub builder {
22 26     26 0 65 $_[0]->{builder};
23             }
24              
25             sub notify_deducible {
26 30     30 0 64 my ($self, $in_depth) = @_;
27              
28 30 100       86 $self->set_deducible ($in_depth)
29             if $self->deducible_dependencies == $self->dependencies;
30             }
31              
32             1;
33