line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FFI::Platypus::Record::TieArray; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
535
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
15
|
use 5.008004; |
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
327
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Tied array interface for record array members |
9
|
|
|
|
|
|
|
our $VERSION = '2.08'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub TIEARRAY |
13
|
|
|
|
|
|
|
{ |
14
|
47
|
|
|
47
|
|
28001
|
my $class = shift; |
15
|
47
|
|
|
|
|
179
|
bless [ @_ ], $class; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub FETCH |
19
|
|
|
|
|
|
|
{ |
20
|
42
|
|
|
42
|
|
328
|
my($self, $key) = @_; |
21
|
42
|
|
|
|
|
93
|
my($obj, $member) = @$self; |
22
|
42
|
|
|
|
|
199
|
$obj->$member($key); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub STORE |
26
|
|
|
|
|
|
|
{ |
27
|
7
|
|
|
7
|
|
21
|
my($self, $key, $value) = @_; |
28
|
7
|
|
|
|
|
11
|
my($obj, $member) = @$self; |
29
|
7
|
|
|
|
|
61
|
$obj->$member($key, $value); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub FETCHSIZE |
33
|
|
|
|
|
|
|
{ |
34
|
2
|
|
|
2
|
|
20
|
my($self) = @_; |
35
|
2
|
|
|
|
|
8
|
$self->[2]; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub CLEAR |
39
|
|
|
|
|
|
|
{ |
40
|
2
|
|
|
2
|
|
12
|
my($self) = @_; |
41
|
2
|
|
|
|
|
6
|
my($obj, $member) = @$self; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
17
|
$obj->$member([]); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub EXTEND |
47
|
|
|
|
|
|
|
{ |
48
|
1
|
|
|
1
|
|
6
|
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__ |