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