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.08;
7              
8 1     1   792 use v5.14;
  1         3  
9 1     1   4 use warnings;
  1         2  
  1         25  
10 1     1   4 use base qw( Metrics::Any::Adapter::File );
  1         2  
  1         166  
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             =cut
31              
32             sub new
33             {
34 0     0 0   shift->SUPER::new( fh => \*STDERR, @_ );
35             }
36              
37             =head1 AUTHOR
38              
39             Paul Evans
40              
41             =cut
42              
43             0x55AA;