ger/Output/Array.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 90.3% 28 / 31 CC 2 SCAR 2.5
CC
2
Cov
96%
get_hooks
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« ger/Layout.pm ↑ Summary ger/Filter.pm »
1 package Log::ger::Output::Array;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7 2 our $DATE = '2023-12-29'; # DATE
8 2 our $DIST = 'Log-ger'; # DIST
9 2 our $VERSION = '0.042'; # VERSION
10  
11 2 ▶sub meta { +{
Subroutine meta: called CC=1 SCAR=0.0
Pod undocumented
12 2 v => 2,
13 } }
14  
15 2 ▶sub get_hooks {
Subroutine get_hooks: called CC=2 SCAR=6.9
Pod undocumented
16 2 my %plugin_conf = @_;
17  
18 2 ▶ $plugin_conf{array} or die "Please specify array";
Branch: 1 branch
BranchTrueFalseTotal
$plugin_conf{"array"} or die "Please specify array" 2 0 2
19  
20 return {
21 create_outputter => [
22 __PACKAGE__, # key
23 50, # priority
24 36 ▶ sub { # hook
Subroutine __ANON__: called CC=1 SCAR=0.0
25 36 my %hook_args = @_; # see Log::ger::Manual::Internals/"Arguments passed to hook"
26  
27 2 ▶ my $outputter = sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
28 2 my ($per_target_conf, $msg, $per_msg_conf) = @_;
29 2 push @{$plugin_conf{array}}, $msg;
30 36 };
31 36 [$outputter];
32 2 }],
33 };
34 }
35  
36 2 1;
37 # ABSTRACT: Log to array
38  
39 __END__
« ger/Layout.pm ↑ Summary ger/Filter.pm »