File Coverage

blib/lib/MsgPack/RPC/Event/Write.pm
Criterion Covered Total %
statement 3 5 60.0
branch n/a
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 8 50.0


line stmt bran cond sub pod time code
1             package MsgPack::RPC::Event::Write;
2             our $AUTHORITY = 'cpan:YANICK';
3             $MsgPack::RPC::Event::Write::VERSION = '2.0.2';
4 2     2   15 use Moose;
  2         6  
  2         15  
5              
6             extends 'Beam::Event';
7              
8             has payload => (
9             is => 'ro',
10             lazy => 1,
11             default => sub {
12             $_[0]->message->pack
13             },
14             );
15              
16             has message => (
17             is => 'ro',
18             );
19              
20             sub encoded {
21 0     0 0   my $self = shift;
22            
23 0           MsgPack::Encoder->new(struct => $self->payload)->encoded;
24             }
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             MsgPack::RPC::Event::Write
37              
38             =head1 VERSION
39              
40             version 2.0.2
41              
42             =head1 AUTHOR
43              
44             Yanick Champoux <yanick@cpan.org>
45              
46             =head1 COPYRIGHT AND LICENSE
47              
48             This software is copyright (c) 2019, 2017, 2016, 2015 by Yanick Champoux.
49              
50             This is free software; you can redistribute it and/or modify it under
51             the same terms as the Perl 5 programming language system itself.
52              
53             =cut