dbMan/Extension/SQLOutputNULL.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 43 CC 3 SCAR 17.5
CC
3
Cov
0%
handle_action
12.0
IDENTIFICATION
2.0
preference
2.0
CRAP 5.8
1 package DBIx::dbMan::Extension::SQLOutputNULL;
2  
3 use strict;
4 use base 'DBIx::dbMan::Extension';
5  
6 our $VERSION = '0.06';
7  
8 1;
9  
10 sub IDENTIFICATION { return "000001-000029-000006"; }
11  
12 sub preference { return 20; }
13  
14 sub known_actions { return [ qw/SQL_OUTPUT/ ]; }
15  
16 sub handle_action {
17 my ($obj,%action) = @_;
18  
19 $action{processed} = 1;
20 if ($action{action} eq 'SQL_OUTPUT' and $obj->{-mempool}->get('output_format') ne 'plain' and $obj->{-mempool}->get('output_format') ne 'insert') {
21 for my $outer (@{$action{result}}) {
22 for (@$outer) {
23 $_ = 'NULL' unless defined;
24 }
25 }
26 }
27  
28 return %action;
29 }