File Coverage

blib/lib/Intertangle/Punchcard/Backend/Kiwisolver/Solver.pm
Criterion Covered Total %
statement 27 27 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 4 4 100.0
total 39 39 100.0


line stmt bran cond sub pod time code
1 1     1   6 use Renard::Incunabula::Common::Setup;
  1         3  
  1         8  
2             package Intertangle::Punchcard::Backend::Kiwisolver::Solver;
3             # ABSTRACT: Solver wrapper for Kiwisolver
4             $Intertangle::Punchcard::Backend::Kiwisolver::Solver::VERSION = '0.001';
5 1     1   6418 use Mu;
  1         2  
  1         6  
6 1     1   1246 use Intertangle::API::Kiwisolver;
  1         60311  
  1         36  
7 1     1   370 use Renard::Incunabula::Common::Types qw(InstanceOf);
  1         148243  
  1         11  
8              
9             has _delegate => (
10             is => 'ro',
11             isa => InstanceOf['Intertangle::API::Kiwisolver::Solver'],
12             default => method() {
13             Intertangle::API::Kiwisolver::Solver->new;
14             },
15             );
16              
17 36     36 1 111 method add_constraint($constraint) {
  36         50  
  36         45  
18 36         177 $self->_delegate->addConstraint($constraint->_delegate);
19             }
20              
21 1     1 1 5 method update() {
  1         2  
22 1         6 $self->_delegate->updateVariables;
23             }
24              
25 2     2 1 13 method add_edit_variable($variable, $strength) {
  2         4  
  2         3  
26 2         22 $self->_delegate->addEditVariable($variable->_delegate, $strength);
27             }
28              
29 2     2 1 9 method suggest_value($variable, $value) {
  2         4  
  2         9  
30 2         14 $self->_delegate->suggestValue($variable->_delegate, $value);
31             }
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             Intertangle::Punchcard::Backend::Kiwisolver::Solver - Solver wrapper for Kiwisolver
44              
45             =head1 VERSION
46              
47             version 0.001
48              
49             =head1 EXTENDS
50              
51             =over 4
52              
53             =item * L<Moo::Object>
54              
55             =back
56              
57             =head1 METHODS
58              
59             =head2 add_constraint
60              
61             ...
62              
63             =head2 update
64              
65             ...
66              
67             =head2 add_edit_variable
68              
69             ...
70              
71             =head2 suggest_value
72              
73             ...
74              
75             =head1 AUTHOR
76              
77             Zakariyya Mughal <zmughal@cpan.org>
78              
79             =head1 COPYRIGHT AND LICENSE
80              
81             This software is copyright (c) 2019 by Zakariyya Mughal.
82              
83             This is free software; you can redistribute it and/or modify it under
84             the same terms as the Perl 5 programming language system itself.
85              
86             =cut