dbMan/Extension/Clear.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 38 CC 3 SCAR 16.7
CC
3
Cov
0%
handle_action
12.0
IDENTIFICATION
2.0
preference
2.0
CRAP 5.3
1 package DBIx::dbMan::Extension::Clear;
2  
3 use strict;
4 use base 'DBIx::dbMan::Extension';
5  
6 our $VERSION = '0.04';
7  
8 1;
9  
10 sub IDENTIFICATION { return "000001-000057-000004"; }
11  
12 sub preference { return 0; }
13  
14 sub known_actions { return [ qw/SCREEN/ ]; }
15  
16 sub menu {
17 return ( { label => '_Output', submenu => [
18 { label => 'Clear output area',
19 action => { action => 'SCREEN', operation => 'clear' } }
20 ] } );
21 }
22  
23 sub handle_action {
24 my ($obj,%action) = @_;
25  
26 if ($action{action} eq 'SCREEN') {
27 if ($action{operation} eq 'clear') {
28 $obj->{-interface}->clear_screen();
29 $action{action} = 'NONE';
30 }
31 }
32  
33 $action{processed} = 1;
34 return %action;
35 }