| 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__ | ||