line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mimic::Library::PlayScalar; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
77
|
|
|
1
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use constant { |
7
|
|
|
|
|
|
|
# Instance variable indices |
8
|
1
|
|
|
|
|
223
|
HISTORY => 0, |
9
|
1
|
|
|
1
|
|
5
|
}; |
|
1
|
|
|
|
|
1
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub TIESCALAR { |
12
|
0
|
|
|
0
|
|
|
my ( $class, $history ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Initialize instance variables. |
15
|
0
|
|
|
|
|
|
my $self = []; |
16
|
0
|
|
|
|
|
|
$self->[HISTORY] = $history; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
return bless( $self, $class ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub FETCH { |
22
|
0
|
|
|
0
|
|
|
my ( $self ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return Test::Mimic::Library::play( shift( @{ $self->[HISTORY] } ) ); |
|
0
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
|
|
sub STORE { |
28
|
|
|
|
|
|
|
# not a read, do nothing |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# optional methods |
32
|
0
|
|
|
0
|
|
|
sub UNTIE { |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
|
|
sub DESTROY { |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |