File Coverage

blib/lib/MsgPack/Decoder/Generator/Size.pm
Criterion Covered Total %
statement 9 9 100.0
branch 2 2 100.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1             package MsgPack::Decoder::Generator::Size;
2             our $AUTHORITY = 'cpan:YANICK';
3             $MsgPack::Decoder::Generator::Size::VERSION = '2.0.2';
4 1     1   569 use Moose;
  1         3  
  1         6  
5 1     1   6881 use MooseX::MungeHas 'is_ro';
  1         2  
  1         8  
6              
7             extends 'MsgPack::Decoder::Generator';
8              
9             has next_item => (
10             is => 'ro',
11             required => 1,
12             );
13              
14             has '+next' => sub {
15 18     18   328 my $self = shift;
16 18         473 my $next = $self->next_item;
17 18 100       209 return [[ (ref $next ? @$next : $next), size => $self->buffer_as_int ]];
18             };
19              
20             1;
21              
22             __END__
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             MsgPack::Decoder::Generator::Size
31              
32             =head1 VERSION
33              
34             version 2.0.2
35              
36             =head1 AUTHOR
37              
38             Yanick Champoux <yanick@cpan.org>
39              
40             =head1 COPYRIGHT AND LICENSE
41              
42             This software is copyright (c) 2019, 2017, 2016, 2015 by Yanick Champoux.
43              
44             This is free software; you can redistribute it and/or modify it under
45             the same terms as the Perl 5 programming language system itself.
46              
47             =cut