Reporter/Summarizer/Fallback.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 92.8% 26 / 28 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Reporter/Summarizer/File.pm ↑ Summary Reporter/Summarizer/Email.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Exception::Reporter::Summarizer::Fallback;
4 # ABSTRACT: a summarizer for stuff you couldn't deal with otherwise
5 1 $Exception::Reporter::Summarizer::Fallback::VERSION = '0.014';
6 1 ▶use parent 'Exception::Reporter::Summarizer';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 #pod =head1 OVERVIEW
9 #pod
10 #pod This summarizer will accept any input and summarize it by dumping it with the
11 #pod Exception::Reporter's dumper.
12 #pod
13 #pod I recommended that this summarizer is always in your list of summarizers,
14 #pod and always last.
15 #pod
16 #pod =cut
17  
18 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 4 ▶sub can_summarize { 1 }
Subroutine can_summarize: called CC=1 SCAR=0.0
Pod undocumented
21  
22 sub summarize {
23 4 ▶ my ($self, $entry, $internal_arg) = @_;
Subroutine summarize: called CC=1 SCAR=0.0
Pod undocumented
24 4 my ($name, $value, $arg) = @$entry;
25  
26 4 my $fn_base = $self->sanitize_filename($name);
27  
28 4 my $dump = $self->dump($value, { basename => $fn_base });
29  
30 return {
31 4 filename => "$fn_base.txt",
32 ident => "dump of $name",
33 %$dump,
34 };
35 }
36  
37 1 1;
38  
39 __END__
« Reporter/Summarizer/File.pm ↑ Summary Reporter/Summarizer/Email.pm »