line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DR::R; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
300274
|
use 5.010001; |
|
5
|
|
|
|
|
15
|
|
4
|
5
|
|
|
5
|
|
21
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
83
|
|
5
|
5
|
|
|
5
|
|
21
|
use utf8; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
29
|
|
6
|
5
|
|
|
5
|
|
114
|
use warnings; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
99
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
20
|
use Carp; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
1255
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
require XSLoader; |
12
|
|
|
|
|
|
|
XSLoader::load('DR::R', $VERSION); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub select :method { |
15
|
6
|
|
|
6
|
1
|
827599
|
my ($self, $type, $point_or_rect, %opts) = @_; |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
100
|
|
|
29
|
my $offset = $opts{offset} || 0; |
18
|
6
|
|
|
|
|
10
|
my $limit = $opts{limit}; |
19
|
6
|
|
|
|
|
8
|
my @result; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
7
|
my $type_ok = 0; |
22
|
6
|
|
50
|
|
|
12
|
$type //= ''; |
23
|
6
|
|
|
|
|
5
|
for (@{ $self->iterator_types }) { |
|
6
|
|
|
|
|
26
|
|
24
|
48
|
100
|
|
|
|
67
|
if ($type eq $_) { |
25
|
5
|
|
|
|
|
5
|
$type_ok = 1; |
26
|
5
|
|
|
|
|
13
|
last; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
6
|
100
|
|
|
|
169
|
croak "Unknown iterator type: '$type'" unless $type_ok; |
30
|
5
|
100
|
|
|
|
25
|
unless ($self->is_point_or_rect($point_or_rect)) { |
31
|
3
|
|
|
|
|
182
|
croak "Invalid point or rect"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$self->foreach($type, $point_or_rect, sub { |
36
|
21
|
|
|
21
|
|
25
|
my ($o, $id, $toffset) = @_; |
37
|
|
|
|
|
|
|
|
38
|
21
|
100
|
|
|
|
26
|
return if $toffset < $offset; |
39
|
20
|
|
|
|
|
21
|
push @result => $o; |
40
|
20
|
50
|
|
|
|
22
|
return unless defined $limit; |
41
|
20
|
100
|
|
|
|
36
|
return if @result < $limit; |
42
|
2
|
|
|
|
|
5
|
return 0; |
43
|
2
|
|
|
|
|
29
|
}); |
44
|
2
|
|
|
|
|
14
|
return \@result; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
__END__ |