line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Quantum::Superpositions::Lazy::Role::Operation; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '1.11'; |
4
|
|
|
|
|
|
|
|
5
|
15
|
|
|
15
|
|
129972
|
use v5.24; |
|
15
|
|
|
|
|
53
|
|
6
|
15
|
|
|
15
|
|
74
|
use warnings; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
470
|
|
7
|
15
|
|
|
15
|
|
84
|
use Carp qw(croak); |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
755
|
|
8
|
|
|
|
|
|
|
|
9
|
15
|
|
|
15
|
|
81
|
use Moo::Role; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
117
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
requires qw( |
12
|
|
|
|
|
|
|
run |
13
|
|
|
|
|
|
|
supported_types |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has "sign" => ( |
17
|
|
|
|
|
|
|
is => "ro", |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _clear_parameters |
21
|
|
|
|
|
|
|
{ |
22
|
81188
|
|
|
81188
|
|
145418
|
my ($self, $param_num, @parameters) = @_; |
23
|
|
|
|
|
|
|
|
24
|
81188
|
100
|
|
|
|
148606
|
my ($params_min, $params_max) = ref $param_num eq 'ARRAY' |
25
|
|
|
|
|
|
|
? $param_num->@* |
26
|
|
|
|
|
|
|
: ($param_num, undef) |
27
|
|
|
|
|
|
|
; |
28
|
|
|
|
|
|
|
|
29
|
81188
|
50
|
|
|
|
140654
|
croak "not enough parameters to " . $self->sign |
30
|
|
|
|
|
|
|
if @parameters < $params_min; |
31
|
|
|
|
|
|
|
|
32
|
81188
|
50
|
33
|
|
|
181432
|
croak "too many parameters to " . $self->sign |
33
|
|
|
|
|
|
|
if defined $params_max && @parameters > $params_max; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|