blib/lib/Zed/Plugin/Host/Dump.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond 0.0% 0 / 13 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Zed::Plugin::Host::Dump;
2  
3 use Zed::Plugin;
4 use Zed::Output;
5 use Zed::Config::Env;
6 use Zed::Config::Space;
7  
8 =head1 SYNOPSIS
9  
10 Dump space server list
11 ex:
12 dump
13 dump list
14  
15 =cut
16  
17 invoke "dump" => sub {
18 my( $space, @host ) = shift;
19 $space ||= usespace() or error("use no space!") and return;
20 @host = space($space) or error("space:[$space] don't have any hosts!") and return;
21 info("$space\[", scalar @host, "]:");
22 text(join "\n", @host);
23  
24 }, sub{ keys space() };
25  
26 1