line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MouseX::AttributeHelpers::Bool; |
2
|
5
|
|
|
7
|
|
3608
|
use Mouse; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
36
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
extends 'MouseX::AttributeHelpers::Base'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has '+method_constructors' => ( |
7
|
|
|
|
|
|
|
default => sub { |
8
|
|
|
|
|
|
|
return +{ |
9
|
|
|
|
|
|
|
set => sub { |
10
|
|
|
|
|
|
|
my (undef, $name) = @_; |
11
|
7
|
|
|
7
|
|
6605
|
return sub { $_[0]->{$name} = 1 }; |
12
|
|
|
|
|
|
|
}, |
13
|
|
|
|
|
|
|
unset => sub { |
14
|
|
|
|
|
|
|
my (undef, $name) = @_; |
15
|
3
|
|
|
3
|
|
10
|
return sub { $_[0]->{$name} = 0 }; |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
toggle => sub { |
18
|
|
|
|
|
|
|
my (undef, $name) = @_; |
19
|
6
|
|
|
8
|
|
22
|
return sub { $_[0]->{$name} = not $_[0]->{$name} }; |
|
|
|
|
8
|
|
|
|
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
not => sub { |
22
|
|
|
|
|
|
|
my (undef, $name) = @_; |
23
|
12
|
|
|
16
|
|
787
|
return sub { not $_[0]->{$name} }; |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
}, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
0
|
sub helper_type { 'Bool' } |
30
|
|
|
|
|
|
|
|
31
|
5
|
|
|
5
|
|
3064
|
no Mouse; |
|
5
|
|
|
|
|
25
|
|
|
5
|
|
|
|
|
26
|
|
32
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(inline_constructor => 0); |
33
|
|
|
|
|
|
|
__END__ |