line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
####################################################################### |
2
|
|
|
|
|
|
|
# housekeeping |
3
|
|
|
|
|
|
|
####################################################################### |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Object::Exercise v3.1.0; |
6
|
12
|
|
|
12
|
|
572680
|
use v5.20; |
|
12
|
|
|
|
|
129
|
|
7
|
|
|
|
|
|
|
|
8
|
12
|
|
|
12
|
|
4716
|
use Symbol qw( qualify qualify_to_ref ); |
|
12
|
|
|
|
|
8010
|
|
|
12
|
|
|
|
|
669
|
|
9
|
|
|
|
|
|
|
|
10
|
12
|
|
|
12
|
|
3996
|
use Object::Exercise::Execute; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
1156
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
######################################################################## |
13
|
|
|
|
|
|
|
# package variables |
14
|
|
|
|
|
|
|
######################################################################## |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
######################################################################## |
17
|
|
|
|
|
|
|
# subroutines |
18
|
|
|
|
|
|
|
######################################################################## |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub import |
21
|
|
|
|
|
|
|
{ |
22
|
12
|
|
|
12
|
|
97
|
state $init = \&Object::Exercise::Execute::import_flags; |
23
|
12
|
|
|
|
|
22
|
state $handler = \&Object::Exercise::Execute::exercise; |
24
|
|
|
|
|
|
|
|
25
|
12
|
|
|
|
|
27
|
my $caller = caller; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# ignore the current package |
28
|
|
|
|
|
|
|
|
29
|
12
|
|
|
|
|
19
|
shift; |
30
|
|
|
|
|
|
|
|
31
|
12
|
|
|
|
|
32
|
my $export = &$init; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# install the handler as scalar ref not a sub ref so that |
34
|
|
|
|
|
|
|
# they get $exercise as a subref. |
35
|
|
|
|
|
|
|
|
36
|
12
|
|
|
|
|
24
|
*{ qualify_to_ref $export => $caller } = \$handler; |
|
12
|
|
|
|
|
41
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return |
39
|
12
|
|
|
|
|
11216
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# keep require happy |
42
|
|
|
|
|
|
|
1 |
43
|
|
|
|
|
|
|
__END__ |