| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test_Global_Hints; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
62996
|
use 5.010; use warnings; |
|
|
1
|
|
|
1
|
|
4
|
|
|
|
1
|
|
|
|
|
54
|
|
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
32
|
|
|
4
|
1
|
|
|
1
|
|
573
|
use Lexical::Hints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use Test::More; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Set up data... |
|
8
|
|
|
|
|
|
|
my @hints = qw< TGH1 TGH2 >; |
|
9
|
|
|
|
|
|
|
my %hints; @hints{@hints} = @hints; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Initialize module's hints... |
|
12
|
|
|
|
|
|
|
sub import { |
|
13
|
1
|
|
|
1
|
|
7
|
for my $hint_name (qw< TGH1 TGH2 >) { |
|
14
|
2
|
|
|
|
|
6
|
set_hint($hint_name => $hints{$hint_name}); |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Test hints are set... |
|
19
|
|
|
|
|
|
|
sub verify_set { |
|
20
|
3
|
|
|
3
|
0
|
3244
|
for my $hint_name (qw< TGH1 TGH2 >) { |
|
21
|
6
|
|
|
|
|
1056
|
is get_hint($hint_name), $hints{$hint_name} => "$hint_name correctly set"; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Test hints are NOT set... |
|
26
|
|
|
|
|
|
|
sub verify_unset { |
|
27
|
3
|
|
|
3
|
0
|
3105
|
for my $hint_name (qw< TGH1 TGH2 >) { |
|
28
|
6
|
|
|
|
|
893
|
is get_hint($hint_name), undef() => "$hint_name NOT set"; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; # Magic true value required at end of module |