« blib/lib/Perinci/CmdLine/Plugin/Debug/DumpArgs.pm
↑ Summary
blib/lib/Perinci/CmdLine/Plugin/Debug/DumpRes.pm »
| 1 | package Perinci::CmdLine::Plugin::Debug::DumpR; | ||||||||||||
| 2 | |||||||||||||
| 3 | # put pragmas + Log::ger here | ||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use Log::ger; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use parent 'Perinci::CmdLine::PluginBase'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | # put other modules alphabetically here | ||||||||||||
| 10 | |||||||||||||
| 11 | # put global variables alphabetically here | ||||||||||||
| 12 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||||
| 13 | 1 | our $DATE = '2023-11-23'; # DATE | |||||||||||
| 14 | 1 | our $DIST = 'Perinci-CmdLine-Lite'; # DIST | |||||||||||
| 15 | 1 | our $VERSION = '1.929'; # VERSION | |||||||||||
| 16 | |||||||||||||
| 17 | 0 | ▶ | sub meta { | ||||||||||
|
Subroutine
meta: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 18 | return { | ||||||||||||
| 19 | 0 | summary => 'Dump request stash ($r), by default after action', | |||||||||||
| 20 | conf => { | ||||||||||||
| 21 | dumper => { | ||||||||||||
| 22 | schema => ['str*', in=>['Data::Dump::Color', 'Data::Dmp']], | ||||||||||||
| 23 | default => 'Data::Dump::Color', | ||||||||||||
| 24 | }, | ||||||||||||
| 25 | }, | ||||||||||||
| 26 | tags => ['category:debugging'], | ||||||||||||
| 27 | }; | ||||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 0 | ▶ | sub after_action { | ||||||||||
|
Subroutine
after_action: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||
| 31 | 0 | my ($self, $r) = @_; | |||||||||||
| 32 | |||||||||||||
| 33 | 0 | ▶ | my $dumper = $self->{dumper} || 'Data::Dump::Color'; | ||||||||||
|
Condition0%0/2
$self->{'dumper'} || 'Data::Dump::Color'
MC/DC0%0/1
$self->{'dumper'} || 'Data::Dump::Color'
$self->{'dumper'}
Truth table0%0/2
A
A= $self->{'dumper'}
| |||||||||||||
| 34 | 0 | ▶ | if ($dumper eq 'Data::Dmp') { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 35 | 0 | require Data::Dmp; | |||||||||||
| 36 | 0 | local $Data::Dmp::OPT_DEPARSE = 1; | |||||||||||
| 37 | 0 | Data::Dmp::dd($r); | |||||||||||
| 38 | } else { | ||||||||||||
| 39 | 0 | require Data::Dump::Color; | |||||||||||
| 40 | 0 | Data::Dump::Color::dd($r); | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | 0 | [200, "OK"]; | |||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 1 | 1; | |||||||||||
| 47 | # ABSTRACT: Dump request stash ($r), by default after action | ||||||||||||
| 48 | |||||||||||||
| 49 | __END__ | ||||||||||||