| 1 | package Bencher::Formatter::DeleteNotesFieldIfEmpty; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 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 | #use Log::Any::IfLOG '$log'; | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use parent qw(Bencher::Formatter); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use Role::Tiny::With; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | with 'Bencher::Role::FieldMunger'; | |||||||||
| 12 | 1 | with 'Bencher::Role::ResultMunger'; | |||||||||
| 13 | |||||||||||
| 14 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 15 | 1 | our $DATE = '2023-07-08'; # DATE | |||||||||
| 16 | 1 | our $DIST = 'Bencher-Backend'; # DIST | |||||||||
| 17 | 1 | our $VERSION = '1.063'; # VERSION | |||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub munge_result { | ||||||||
|
Subroutine
munge_result: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 20 | 0 | my ($self, $envres) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 0 | for my $row (@{$envres->[2]}) { | |||||||||
| 23 | 0 | ▶ | return if $row->{notes}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | $self->delete_fields( | ||||||||||
| 27 | 0 | $envres, | |||||||||
| 28 | 'notes' | ||||||||||
| 29 | ); | ||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 1 | 1; | |||||||||
| 33 | # ABSTRACT: Delete notes field if there are no notes | ||||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||