line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Chai::Util::Flag; |
2
|
5
|
|
|
5
|
|
75427
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
181
|
|
3
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
124
|
|
4
|
5
|
|
|
5
|
|
26
|
use utf8; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
47
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
121
|
use Exporter qw/import/; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
686
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw/flag/; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub flag { |
10
|
4195
|
|
|
4195
|
0
|
6890
|
my ($obj, $key, $value) = @_; |
11
|
|
|
|
|
|
|
|
12
|
4195
|
|
|
|
|
6543
|
my $flags = $obj->{__flags}; |
13
|
4195
|
100
|
|
|
|
8812
|
$flags = $obj->{__flags} = {} unless defined $flags; |
14
|
|
|
|
|
|
|
|
15
|
4195
|
100
|
|
|
|
7706
|
if (@_ == 3) { |
16
|
1207
|
|
|
|
|
2333
|
$flags->{$key} = $value; |
17
|
1207
|
|
|
|
|
2761
|
return undef; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
else { |
21
|
2988
|
|
|
|
|
8694
|
return $flags->{$key}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |