File Coverage

blib/lib/Markdent/CheckedOutput.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package Markdent::CheckedOutput;
2              
3 34     34   242 use strict;
  34         79  
  34         1051  
4 34     34   183 use warnings;
  34         73  
  34         3022  
5              
6             our $VERSION = '0.39';
7              
8             sub new {
9 5     5 0 14 my $class = shift;
10 5         13 my $output = shift;
11              
12 5         24 return bless \$output, $class;
13             }
14              
15             ## no critic (Subroutines::ProhibitBuiltinHomonyms)
16             sub print {
17 93     93 0 2200 my $self = shift;
18              
19             # We don't need warnings from IO::* about printing to closed handles when
20             # we'll die in that case anyway.
21             #
22             ## no critic (TestingAndDebugging::ProhibitNoWarnings)
23 34     34   192 no warnings 'io';
  34         72  
  34         3050  
24             ## use critic
25 93 100       144 print { ${$self} } @_ or die "Cannot write to handle: $!";
  93         132  
  93         1784  
26             }
27             ## use critic
28              
29             1;
30              
31             # ABSTRACT: This class has no user-facing parts
32              
33             __END__
34              
35             =pod
36              
37             =encoding UTF-8
38              
39             =head1 NAME
40              
41             Markdent::CheckedOutput - This class has no user-facing parts
42              
43             =head1 VERSION
44              
45             version 0.39
46              
47             =head1 SUPPORT
48              
49             Bugs may be submitted at L<https://github.com/houseabsolute/Markdent/issues>.
50              
51             I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>.
52              
53             =head1 SOURCE
54              
55             The source code repository for Markdent can be found at L<https://github.com/houseabsolute/Markdent>.
56              
57             =head1 AUTHOR
58              
59             Dave Rolsky <autarch@urth.org>
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is copyright (c) 2021 by Dave Rolsky.
64              
65             This is free software; you can redistribute it and/or modify it under
66             the same terms as the Perl 5 programming language system itself.
67              
68             The full text of the license can be found in the
69             F<LICENSE> file included with this distribution.
70              
71             =cut