blib/lib/Zed/Plugin/Sys/Debug.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Zed::Plugin::Sys::Debug;
2  
3 use Zed::Plugin;
4 use Zed::Output;
5  
6 =head1 SYNOPSIS
7  
8 Open/Close debug message
9 ex:
10 debug Zed::Plugin::Exe::Cmd
11 debug Zed::Plugin::Exe::Cmd off
12  
13 =cut
14  
15 invoke "debug" => sub {
16 my( $module, $on ) = splice @_;
17 $on ||= 'on';
18 $on = undef if $on eq 'off';
19 $on ? Zed::Output::_debug($module) : Zed::Output::_debug_off($module);
20 info("module:$module debug:", $on ? "on" : "off");
21  
22 }, sub{
23 my %plugin = Zed::Plugin::plugins;
24 values %{ $plugin{invoke} };
25 };
26  
27 1