dbMan/Extension/EditFallback.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 33 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::EditFallback;
2  
3 use strict;
4 use base 'DBIx::dbMan::Extension';
5  
6 our $VERSION = '0.03';
7  
8 1;
9  
10 sub IDENTIFICATION { return "000001-000044-000003"; }
11  
12 sub preference { return -100; }
13  
14 sub known_actions { return [ qw/EDIT_OBJECT/ ]; }
15  
16 sub handle_action {
17 my ($obj,%action) = @_;
18  
19 $action{processed} = 1;
20  
21 if ($action{action} eq 'EDIT_OBJECT') {
22 $action{action} = 'OUTPUT';
23 $action{output} = "I can't edit $action{what}".($action{type}?" (type $action{type})":"").".\n";
24 delete $action{processed};
25 }
26  
27 return %action;
28 }