Condition Coverage

blib/lib/LiquidWeb/Storm/CLI.pm
Criterion Covered Total %
condition 0 26 0.0


and 3 conditions

line !l l&&!r l&&r condition
337 0 0 0 $$self{'configure'}{'username'} and $$self{'configure'}{'secret'}

or 2 conditions

line l !l condition
54 0 0 $$self{'configure'}{'output'} ||= 'json'

or 3 conditions

line l !l&&r !l&&!r condition
80 0 0 0 $response->code != 200 or $response->content =~ /error/
92 0 0 0 $$self{'options'} ||= do { my $options; my(%hash) = (); foreach my $key ('output', 'version', 'command', 'list') { $hash{"$key=s"} = \$$options{$key}; } ; foreach my $key ('configure', 'help', 'clean') { $hash{$key} = \$$options{$key}; } ; my($inputs, $seen); foreach my $version ('v1', 'bleed') { my $docs = do { open my $doc, '<', "$$self{'lwhome'}/$version.json"; local $/; <$doc> }; if ($docs) { $docs = $self->parser->decode($docs); foreach my $class (keys %$docs) { foreach my $method (keys %{$$docs{$class}{'__methods'};}) { foreach my $input (keys %{$$docs{$class}{'__methods'}{$method}{'__input'};}) { my $value = $$docs{$class}{'__methods'}{$method}{'__input'}{$input}{'type'}; unless (not $value or $$seen{$input}++) { if ($value eq 'BOOLEAN') { $hash{$input} = \$$options{$input}; } elsif ($value =~ /HASH/) { $hash{"$input=s%"} = \$$options{$input}; } elsif ($value =~ /ARRAY/) { $hash{"$input=s\@"} = \$$options{$input}; } elsif ($value =~ /INT/) { $hash{"$input=i"} = \$$options{$input}; } elsif ($value =~ /FLOAT/) { $hash{"$input=f"} = \$$options{$input}; } else { $hash{"$input=s"} = \$$options{$input}; } ; } ; } ; } ; } ; } ; } ; &Getopt::Long::GetOptions(%hash); if (delete $$options{'configure'}) { $self->configure; unless ($$self{'configure'}{'save'}) { $$options{'command'} = 'account.auth.token'; } ; if (my $timeout = $$self{'configure'}{'timeout'}) { $$options{'timeout'} = $timeout; } ; } ; foreach my $key ('help', 'list', 'command', 'version', 'output', 'clean') { if (my $value = delete $$options{$key}) { $$self{$key} = $value; } ; } ; foreach my $key (keys %$options) { delete $$options{$key} unless defined $$options{$key}; } ; $options }
112 0 0 0 not $value or $$seen{$input}++
233 0 0 0 $$self{'version'} || $self->version
316 0 0 0 $$self{'output'} ||= do { open my $config, '<', $$self{'apiconfig'}; my $content = do { local $/; <$config> }; my(@lines) = split(/\n/, $content, 0); foreach my $line (@lines) { if ($line =~ /^([output-]+)(\s*?)=(\s*?)(.*?)$/) { $$self{'output'} = $4; } ; } ; $$self{'output'} }
465 0 0 0 $$self{'parser'} ||= do { 'JSON'->new->utf8(1) }
487 0 0 0 $response->code != 200 or $response->content =~ /error/