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