line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FFI::Platypus::Record::TieArray; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
511
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
17
|
use 5.008004; |
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
311
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Tied array interface for record array members |
9
|
|
|
|
|
|
|
our $VERSION = '2.06_01'; # TRIAL VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub TIEARRAY |
13
|
|
|
|
|
|
|
{ |
14
|
47
|
|
|
47
|
|
22439
|
my $class = shift; |
15
|
47
|
|
|
|
|
170
|
bless [ @_ ], $class; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub FETCH |
19
|
|
|
|
|
|
|
{ |
20
|
42
|
|
|
42
|
|
341
|
my($self, $key) = @_; |
21
|
42
|
|
|
|
|
83
|
my($obj, $member) = @$self; |
22
|
42
|
|
|
|
|
174
|
$obj->$member($key); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub STORE |
26
|
|
|
|
|
|
|
{ |
27
|
7
|
|
|
7
|
|
22
|
my($self, $key, $value) = @_; |
28
|
7
|
|
|
|
|
14
|
my($obj, $member) = @$self; |
29
|
7
|
|
|
|
|
52
|
$obj->$member($key, $value); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub FETCHSIZE |
33
|
|
|
|
|
|
|
{ |
34
|
2
|
|
|
2
|
|
18
|
my($self) = @_; |
35
|
2
|
|
|
|
|
7
|
$self->[2]; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub CLEAR |
39
|
|
|
|
|
|
|
{ |
40
|
2
|
|
|
2
|
|
13
|
my($self) = @_; |
41
|
2
|
|
|
|
|
5
|
my($obj, $member) = @$self; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
17
|
$obj->$member([]); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub EXTEND |
47
|
|
|
|
|
|
|
{ |
48
|
1
|
|
|
1
|
|
3
|
my($self, $count) = @_; |
49
|
1
|
50
|
|
|
|
8
|
croak "tried to extend a fixed length array" if $count > $self->[2]; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |