CloudDeploy/CommandLine/Diagram.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 21 CC 1 SCAR 6.9
CC
1
Cov
0%
run
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package CloudDeploy::CommandLine::Diagram {
2 use MooseX::App;
3 use CloudDeploy::Utils;
4  
5 parameter deploy_class => (is => 'ro', isa => 'Str', required => 1);
6  
7 sub run {
8 my ($self) = @_;
9  
10 my $module = load_class($self->deploy_class);
11 my $obj = $module->{class}->new(params => $module->{params_class}->new_with_options(argv => $self->extra_argv));
12  
13 print "digraph diagrama {\n";
14 foreach my $r_name ($obj->ResourceList) {
15 my $r = $obj->Resource($r_name);
16 foreach my $dep (@{ $r->dependencies }){
17 print "$r_name -> $dep;\n";
18 }
19 }
20 print "}\n";
21 }
22 }
23  
24 1;