line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
####################################################################### |
2
|
|
|
|
|
|
|
# housekeeping |
3
|
|
|
|
|
|
|
####################################################################### |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Object::Exercise; |
6
|
12
|
|
|
12
|
|
262113
|
use v5.20; |
|
12
|
|
|
|
|
44
|
|
7
|
|
|
|
|
|
|
|
8
|
12
|
|
|
12
|
|
8944
|
use Symbol qw( qualify qualify_to_ref ); |
|
12
|
|
|
|
|
12188
|
|
|
12
|
|
|
|
|
1276
|
|
9
|
|
|
|
|
|
|
|
10
|
12
|
|
|
12
|
|
6076
|
use Object::Exercise::Execute; |
|
12
|
|
|
|
|
42
|
|
|
12
|
|
|
|
|
2115
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
######################################################################## |
13
|
|
|
|
|
|
|
# package variables |
14
|
|
|
|
|
|
|
######################################################################## |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '3.00'; |
17
|
|
|
|
|
|
|
$VERSION = eval "$VERSION"; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
######################################################################## |
20
|
|
|
|
|
|
|
# subroutines |
21
|
|
|
|
|
|
|
######################################################################## |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub import |
24
|
|
|
|
|
|
|
{ |
25
|
12
|
|
|
12
|
|
133
|
state $init = \&Object::Exercise::Execute::import_flags; |
26
|
12
|
|
|
|
|
24
|
state $handler = \&Object::Exercise::Execute::exercise; |
27
|
|
|
|
|
|
|
|
28
|
12
|
|
|
|
|
32
|
my $caller = caller; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# ignore the current package |
31
|
|
|
|
|
|
|
|
32
|
12
|
|
|
|
|
23
|
shift; |
33
|
|
|
|
|
|
|
|
34
|
12
|
|
|
|
|
41
|
my $export = &$init; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# install the handler as scalar ref not a sub ref so that |
37
|
|
|
|
|
|
|
# they get $exercise as a subref. |
38
|
|
|
|
|
|
|
|
39
|
12
|
|
|
|
|
26
|
*{ qualify_to_ref $export => $caller } = \$handler; |
|
12
|
|
|
|
|
59
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
return |
42
|
12
|
|
|
|
|
14843
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# keep require happy |
45
|
|
|
|
|
|
|
1 |
46
|
|
|
|
|
|
|
__END__ |