File Coverage

blib/lib/Data/Record/Serialize/Sink/array.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package Data::Record::Serialize::Sink::array;
2              
3             # ABSTRACT: append encoded data to an array.
4              
5 4     4   273393 use v5.12;
  4         21  
6 4     4   1294 use Moo::Role;
  4         20757  
  4         48  
7              
8 4     4   2928 use Data::Record::Serialize::Error { errors => ['::create'] }, -all;
  4         9  
  4         74  
9              
10             our $VERSION = '2.02';
11              
12 4     4   3301 use IO::File;
  4         42523  
  4         720  
13              
14 4     4   653 use namespace::clean;
  4         20270  
  4         42  
15              
16             ## no critic( Subroutines::ProhibitBuiltinHomonyms )
17             ## no critic( NamingConventions::ProhibitAmbiguousNames )
18              
19              
20              
21              
22              
23              
24              
25              
26              
27              
28              
29             has output => (
30             is => 'ro',
31             clearer => 1,
32             default => sub { [] },
33             );
34              
35              
36              
37              
38              
39              
40              
41              
42 6     6 0 43 sub print { push @{ shift->{output} }, @_ }
  6         30  
43             sub say;
44             *say = \&print;
45              
46       3 0   sub close { }
47              
48             with 'Data::Record::Serialize::Role::Sink';
49              
50             1;
51              
52             #
53             # This file is part of Data-Record-Serialize
54             #
55             # This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
56             #
57             # This is free software, licensed under:
58             #
59             # The GNU General Public License, Version 3, June 2007
60             #
61              
62             __END__