| 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 | ▶ | use v5.14; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use base qw( Metrics::Any::Adapter::File ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | =head1 NAME | ||
| 13 | |||
| 14 | C<Metrics::Any::Adapter::Stderr> - write metrics to C<STDERR> | ||
| 15 | |||
| 16 | =head1 SYNOPSIS | ||
| 17 | |||
| 18 | use Metrics::Any::Adapter 'Stderr'; | ||
| 19 | |||
| 20 | This L<Metrics::Any> 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<METRICS_ANY_ADAPTER> 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 | 0 | ▶ | { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 36 | 0 | shift->SUPER::new( fh => \*STDERR, @_ ); | |
| 37 | } | ||
| 38 | |||
| 39 | =head1 AUTHOR | ||
| 40 | |||
| 41 | Paul Evans <leonerd@leonerd.org.uk> | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | 1 | 0x55AA; | |