line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
use Renard::Incunabula::Common::Setup; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
14
|
|
2
|
|
|
|
|
|
|
package Intertangle::Punchcard::Backend::Kiwisolver::Symbolic; |
3
|
|
|
|
|
|
|
# ABSTRACT: Kiwisolver variable |
4
|
|
|
|
|
|
|
$Intertangle::Punchcard::Backend::Kiwisolver::Symbolic::VERSION = '0.002'; |
5
|
1
|
|
|
1
|
|
8048
|
use Mu; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
6
|
1
|
|
|
1
|
|
1040
|
use Graphics::Layout::Kiwisolver; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
7
|
1
|
|
|
1
|
|
6
|
use Renard::Incunabula::Common::Types qw(InstanceOf); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
17
|
|
8
|
1
|
|
|
1
|
|
2382
|
use overload nomethod => \&_delegate_op; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has name => ( is => 'ro', predicate => 1 ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has _delegate => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => ( |
15
|
|
|
|
|
|
|
InstanceOf['Graphics::Layout::Kiwisolver::Variable'] |
16
|
|
|
|
|
|
|
| InstanceOf['Graphics::Layout::Kiwisolver::Term'] |
17
|
|
|
|
|
|
|
| InstanceOf['Graphics::Layout::Kiwisolver::Expression'] |
18
|
|
|
|
|
|
|
| InstanceOf['Graphics::Layout::Kiwisolver::Constraint'] |
19
|
|
|
|
|
|
|
), |
20
|
|
|
|
|
|
|
default => method() { |
21
|
|
|
|
|
|
|
Graphics::Layout::Kiwisolver::Variable->new; |
22
|
|
|
|
|
|
|
}, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
60
|
|
|
60
|
1
|
1952
|
method BUILD() { |
|
60
|
|
|
|
|
93
|
|
26
|
60
|
100
|
|
|
|
231
|
if( $self->has_name ) { |
27
|
17
|
|
|
|
|
128
|
$self->_delegate->setName( $self->name ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
43
|
|
|
43
|
|
268
|
method _delegate_op($other, $inv, $meth) { |
|
43
|
|
|
|
|
94
|
|
|
43
|
|
|
|
|
63
|
|
32
|
43
|
|
|
|
|
112
|
my $op = overload::Method($self->_delegate, $meth); |
33
|
43
|
50
|
|
|
|
1745
|
die "Operator $meth not available" unless defined $op; |
34
|
43
|
100
|
66
|
|
|
385
|
my $return = $op->($self->_delegate, defined $other && ref $other ? $other->_delegate : $other , $inv ); |
35
|
|
|
|
|
|
|
|
36
|
43
|
50
|
|
|
|
114
|
if( $meth eq '""') { |
37
|
0
|
|
|
|
|
0
|
return $return; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
43
|
|
|
|
|
63
|
my $return_wrapper; |
41
|
43
|
|
|
|
|
869
|
$return_wrapper = Intertangle::Punchcard::Backend::Kiwisolver::Symbolic->new( |
42
|
|
|
|
|
|
|
_delegate => $return, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
43
|
|
|
|
|
165
|
$return_wrapper; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
12
|
|
|
12
|
1
|
699
|
method value($value = undef) { |
|
12
|
|
|
|
|
23
|
|
|
12
|
|
|
|
|
16
|
|
49
|
12
|
50
|
|
|
|
25
|
if( defined $value ) { |
50
|
0
|
|
|
|
|
0
|
$self->_delegate->setValue( $value ); |
51
|
|
|
|
|
|
|
} else { |
52
|
12
|
|
|
|
|
49
|
$self->_delegate->value; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
with qw(Intertangle::Punchcard::Data::Role::Variable); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=pod |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=encoding UTF-8 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 NAME |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Intertangle::Punchcard::Backend::Kiwisolver::Symbolic - Kiwisolver variable |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 VERSION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
version 0.002 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 EXTENDS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 4 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * L<Moo::Object> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 CONSUMES |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * L<Intertangle::Punchcard::Data::Role::HasValue> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * L<Intertangle::Punchcard::Data::Role::Variable> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 name |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Name for variable. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 METHODS |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 C<has_name> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Predicate for C<name>. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 BUILD |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 value |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Set or get value for variable. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Zakariyya Mughal <zmughal@cpan.org> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This software is copyright (c) 2019 by Zakariyya Mughal. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
119
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |