line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MsgPack::Decoder::Generator::Str; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
$MsgPack::Decoder::Generator::Str::VERSION = '2.0.3'; |
4
|
3
|
|
|
3
|
|
1668
|
use Moose; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
19
|
|
5
|
3
|
|
|
3
|
|
18145
|
use MooseX::MungeHas 'is_ro'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
23
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'MsgPack::Decoder::Generator'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has '+bytes' => ( |
10
|
|
|
|
|
|
|
trigger => sub { |
11
|
|
|
|
|
|
|
my ( $self, $value ) = @_; |
12
|
|
|
|
|
|
|
$self->push_decoded->('') unless $value; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub BUILDARGS { |
17
|
24
|
|
|
24
|
1
|
283
|
my( undef, %args ) = @_; |
18
|
24
|
|
100
|
|
|
157
|
$args{bytes} ||= $args{size} || 0; |
|
|
|
100
|
|
|
|
|
19
|
24
|
|
|
|
|
68
|
return \%args; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub gen_value { |
23
|
23
|
|
|
23
|
0
|
46
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
23
|
|
|
|
|
533
|
return $self->buffer; |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
MsgPack::Decoder::Generator::Str |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 2.0.3 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Yanick Champoux <yanick@cpan.org> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This software is copyright (c) 2019, 2017, 2016, 2015 by Yanick Champoux. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
53
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |