File Coverage

blib/lib/Metrics/Any/Adapter/Stderr.pm
Criterion Covered Total %
statement 8 9 88.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 11 14 78.5


line stmt bran cond sub pod time code
1             # You may distribute under the terms of either the GNU General Public License
2             # or the Artistic License (the same terms as Perl itself)
3             #
4             # (C) Paul Evans, 2020 -- leonerd@leonerd.org.uk
5              
6             package Metrics::Any::Adapter::Stderr 0.10;
7              
8 1     1   406 use v5.14;
  1         4  
9 1     1   6 use warnings;
  1         2  
  1         28  
10 1     1   5 use base qw( Metrics::Any::Adapter::File );
  1         5  
  1         157  
11              
12             =head1 NAME
13              
14             C - write metrics to C
15              
16             =head1 SYNOPSIS
17              
18             use Metrics::Any::Adapter 'Stderr';
19              
20             This L adapter type writes observations of metric values to the
21             standard error stream. This may be helpful while debugging or otherwise
22             testing code that reports metrics.
23              
24             For example, by setting the C environment variable to
25             configure the adapter, a metric log will be written to the terminal as a
26             side-effect of running a unit test:
27              
28             $ METRICS_ANY_ADAPTER=Stderr perl -Mblib t/01test.t
29              
30             This adapter type does not support batch mode reporting.
31              
32             =cut
33              
34             sub new
35             {
36 0     0 0   shift->SUPER::new( fh => \*STDERR, @_ );
37             }
38              
39             =head1 AUTHOR
40              
41             Paul Evans
42              
43             =cut
44              
45             0x55AA;