File Coverage

blib/lib/Algorithm/SpatialIndex/Bucket.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package Algorithm::SpatialIndex::Bucket;
2 9     9   188 use 5.008001;
  9         30  
  9         495  
3 9     9   53 use strict;
  9         17  
  9         329  
4 9     9   47 use warnings;
  9         18  
  9         797  
5 9     9   49 use Carp qw(croak);
  9         18  
  9         648  
6              
7             use Class::XSAccessor {
8 9         124 constructor => 'new',
9             accessors => [qw(
10             node_id
11             items
12             )],
13 9     9   141 };
  9         20  
14              
15             sub add_items {
16 143     143 1 152 my $self = shift;
17 143         293 my $items = $self->{items};
18 143         376 push @$items, @_;
19             }
20              
21             sub nitems {
22 162     162 1 161 my $self = shift;
23 162         162 return scalar @{$self->{items} };
  162         843  
24             }
25              
26              
27             1;
28             __END__