File Coverage

blib/lib/Data/Record/Serialize/Role/Sink.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             # ABSTRACT: Sink Role
3              
4             use Moo::Role;
5 18     18   9823  
  18         42  
  18         113  
6             use namespace::clean;
7 18     18   7080  
  18         47  
  18         110  
8             our $VERSION = '1.04';
9              
10             requires 'print';
11             requires 'say';
12              
13              
14              
15              
16              
17              
18              
19              
20              
21              
22              
23              
24              
25              
26              
27             requires 'close';
28              
29             1;
30              
31             #
32             # This file is part of Data-Record-Serialize
33             #
34             # This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
35             #
36             # This is free software, licensed under:
37             #
38             # The GNU General Public License, Version 3, June 2007
39             #
40              
41              
42             =pod
43              
44             =for :stopwords Diab Jerius Smithsonian Astrophysical Observatory
45              
46             =head1 NAME
47              
48             Data::Record::Serialize::Role::Sink - Sink Role
49              
50             =head1 VERSION
51              
52             version 1.04
53              
54             =head1 DESCRIPTION
55              
56             If a role consumes this, it signals that it provides sink
57             capabilities.
58              
59             =head1 METHODS
60              
61             =head2 B<close>
62              
63             $s->close;
64              
65             Flush any data written to the sink and close it. While this will be
66             performed automatically when the object is destroyed, if the object is
67             not destroyed prior to global destruction at the end of the program,
68             it is quite possible that it will not be possible to perform this
69             cleanly. In other words, make sure that sinks are closed prior to
70             global destruction.
71              
72             =head1 SUPPORT
73              
74             =head2 Bugs
75              
76             Please report any bugs or feature requests to bug-data-record-serialize@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Record-Serialize
77              
78             =head2 Source
79              
80             Source is available at
81              
82             https://gitlab.com/djerius/data-record-serialize
83              
84             and may be cloned from
85              
86             https://gitlab.com/djerius/data-record-serialize.git
87              
88             =head1 SEE ALSO
89              
90             Please see those modules/websites for more information related to this module.
91              
92             =over 4
93              
94             =item *
95              
96             L<Data::Record::Serialize|Data::Record::Serialize>
97              
98             =back
99              
100             =head1 AUTHOR
101              
102             Diab Jerius <djerius@cpan.org>
103              
104             =head1 COPYRIGHT AND LICENSE
105              
106             This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
107              
108             This is free software, licensed under:
109              
110             The GNU General Public License, Version 3, June 2007
111              
112             =cut