ErrorHandler/Action/Log.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 2 SCAR 3.4
CC
2
Cov
100%
perform
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« ErrorHandler/Action.pm ↑ Summary
1 package Catalyst::Action::RenderView::ErrorHandler::Action::Log;
2 {
3 4 $Catalyst::Action::RenderView::ErrorHandler::Action::Log::VERSION = '0.100166';
4 }
5 #ABSTRACT: A logging action for errors.
6  
7 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 4 with 'Catalyst::Action::RenderView::ErrorHandler::Action';
12 4 has 'level' => (is => 'ro', isa => 'Str', default => 'error');
13  
14  
15 3 ▶sub perform {
Subroutine perform: called CC=2 SCAR=6.9
Pod documented
16 3 my $self = shift;
17 3 my $c = shift;
18  
19 3 my $level = $self->level;
20 3 foreach my $e (@{ $c->error }) {
21 3 $c->log->$level($e);
22 }
23 }
24  
25 4 1;
26  
27 __END__
« ErrorHandler/Action.pm ↑ Summary