From f5f9fd9adbbdd0b4f62fe70f74e32940b525a02b Mon Sep 17 00:00:00 2001 From: Jozef Kutej Date: Tue, 31 Mar 2020 17:02:03 +0200 Subject: [PATCH] add dumper-to stdout adapter --- lib/Measure/Everything/Adapter/Stdout.pm | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lib/Measure/Everything/Adapter/Stdout.pm diff --git a/lib/Measure/Everything/Adapter/Stdout.pm b/lib/Measure/Everything/Adapter/Stdout.pm new file mode 100644 index 0000000..79c40b4 --- /dev/null +++ b/lib/Measure/Everything/Adapter/Stdout.pm @@ -0,0 +1,58 @@ +package Measure::Everything::Adapter::Stdout; +use strict; +use warnings; + +use Data::Dumper qw(Dumper); + +use base qw(Measure::Everything::Adapter::Base); + +# ABSTRACT: Debug Adapter + +sub write { + my $self = shift; + my @stats = @_; + + local $Data::Dumper::Varname = 'Measure_Everything_'; + print Dumper( \@stats ); +} + +1; + +__END__ + +=pod + +=encoding UTF-8 + +=head1 NAME + +Measure::Everything::Adapter::Stdout - Debug Adapter to print stats to stdout + +=head1 VERSION + +version 1.002 + +=head1 SYNOPSIS + + Measure::Everything::Adapter->set( 'Stdout' ); + +=head1 DESCRIPTION + +Will simply Dumper-out stats to stdout for debugging or quick check. + +=head1 METHODS + +Just C. + +=head1 AUTHOR + +Jozef Kute + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2015 by Thomas Klausner. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut