File Coverage

blib/lib/Data/Log/Shared.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition 2 2 100.0
subroutine 3 3 100.0
pod 0 1 0.0
total 21 22 95.4


line stmt bran cond sub pod time code
1             package Data::Log::Shared;
2 1     1   174374 use strict;
  1         2  
  1         42  
3 1     1   5 use warnings;
  1         2  
  1         472  
4             our $VERSION = '0.01';
5             require XSLoader;
6             XSLoader::load('Data::Log::Shared', $VERSION);
7              
8             sub each_entry {
9 3     3 0 158438 my ($self, $cb, $from) = @_;
10 3   100     16 $from //= 0;
11 3         4 while (1) {
12 208         345 my ($data, $next) = $self->read_entry($from);
13 208 100       253 last unless defined $data;
14 205         323 $cb->($data, $from);
15 205         287 $from = $next;
16             }
17 3         3 return $from;
18             }
19              
20             1;
21             __END__