line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MouseX::NativeTraits::MethodProvider::Bool; |
2
|
2
|
|
|
2
|
|
1505
|
use Mouse; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
extends qw(MouseX::NativeTraits::MethodProvider); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub generate_set { |
7
|
5
|
|
|
5
|
1
|
105
|
my($self) = @_; |
8
|
5
|
|
|
|
|
19
|
my $writer = $self->writer; |
9
|
|
|
|
|
|
|
return sub { |
10
|
20
|
100
|
|
20
|
|
20655
|
if(@_ != 1) { |
|
|
|
|
110
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
60
|
|
|
|
11
|
10
|
|
|
|
|
62
|
$self->argument_error('set', 1, 1, scalar @_); |
12
|
|
|
|
|
|
|
} |
13
|
10
|
|
|
|
|
71
|
$writer->( $_[0], 1 ); |
14
|
5
|
|
|
|
|
63
|
}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub generate_unset { |
18
|
5
|
|
|
5
|
1
|
91
|
my($self) = @_; |
19
|
5
|
|
|
|
|
35
|
my $writer = $self->writer; |
20
|
|
|
|
|
|
|
return sub { |
21
|
20
|
100
|
|
20
|
|
15344
|
if(@_ != 1) { |
22
|
10
|
|
|
|
|
43
|
$self->argument_error('unset', 1, 1, scalar @_); |
23
|
|
|
|
|
|
|
} |
24
|
10
|
|
|
|
|
75
|
$writer->( $_[0], 0 ); |
25
|
5
|
|
|
|
|
104
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub generate_toggle { |
29
|
5
|
|
|
25
|
1
|
88
|
my($self) = @_; |
30
|
5
|
|
|
|
|
30
|
my $reader = $self->reader; |
31
|
5
|
|
|
|
|
104
|
my $writer = $self->writer; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return sub { |
34
|
30
|
100
|
|
50
|
|
29920
|
if(@_ != 1) { |
35
|
10
|
|
|
|
|
47
|
$self->argument_error('toggle', 1, 1, scalar @_); |
36
|
|
|
|
|
|
|
} |
37
|
20
|
|
|
|
|
181
|
$writer->( $_[0], !$reader->( $_[0] ) ); |
38
|
5
|
|
|
|
|
70
|
}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub generate_not { |
42
|
5
|
|
|
55
|
1
|
90
|
my($self) = @_; |
43
|
5
|
|
|
|
|
24
|
my $reader = $self->reader; |
44
|
|
|
|
|
|
|
return sub { |
45
|
40
|
50
|
|
90
|
|
4140
|
if(@_ != 1) { |
46
|
0
|
|
|
|
|
0
|
$self->argument_error('not', 1, 1, scalar @_); |
47
|
|
|
|
|
|
|
} |
48
|
40
|
|
|
|
|
202
|
!$reader->( $_[0] ); |
49
|
5
|
|
|
|
|
83
|
}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
2
|
|
|
2
|
|
1452
|
no Mouse; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
53
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |