Branch Coverage

blib/lib/Metabrik/Core/Shell.pm
Criterion Covered Total %
branch 0 274 0.0


line true false branch
142 0 0 $$ == $self->global->pid ? :
146 0 0 if ($self->global->exit_on_sigint)
160 0 0 if ($@)
166 0 0 if ($file->is_executable)
185 0 0 unless (defined $self->context)
245 0 0 unless (defined $self->context)
275 0 0 unless ($AUTOLOAD =~ /^Metabrik::Core::Shell::run_/)
285 0 0 if (exists $aliases->{$command})
290 0 0 unless (defined $self->context)
296 0 0 if ($context->is_used('shell::command')) { }
297 0 0 $self->capture_mode ? :
300 0 0 if (exists $executables->{$exec})
335 0 0 if ($start == 0 || substr($line, 0, $start) =~ /^\s*$/ and not $word =~ m[/]) { }
419 0 0 if (defined $prompt) { }
428 0 0 defined $ps1 ? :
430 0 0 if ($^O =~ /win32/i) { }
0 0 elsif ($< == 0) { }
478 0 0 unless ($document)
484 0 0 if $_[1]->isa('PPI::Structure')
487 0 0 $r ? :
499 0 0 if ($line =~ /^\s*'\s*((?:use|set|get|run)\s.*?)\s*'\s*;?\s*$/)
517 0 0 if ($cmd =~ /^\s*exit(?:\s+(\d+))/)
533 0 0 if ($line =~ /^\s*#/)
537 0 0 if ($line =~ /^\s*$/)
544 0 0 unless ($self->cmd_is_complete($lines))
570 0 0 if (defined $lines) { }
572 0 0 if ($self->process_line($line, \@lines)) { }
579 0 0 if $self->{'stop'}
588 0 0 if ($self->process_line($line, \@lines)) { }
595 0 0 if $self->{'stop'}
614 0 0 if ($context->is_used('shell::history'))
639 0 0 if (not defined $alias) { }
0 0 elsif (length $alias and @cmd == 0) { }
649 0 0 if (exists $$aliases{"run_$alias"}) { }
680 0 0 if (defined $dir) { }
681 0 0 if ($dir =~ /^~/)
685 0 0 unless (-d $dir)
688 0 0 unless chdir $dir
695 0 0 unless chdir $self->{'path_home'}
721 0 0 unless (length $line)
732 0 0 if ($self->global->exit_on_sigint)
740 0 0 unless (defined $r)
744 0 0 if ($self->echo)
766 0 0 unless (defined $brik)
773 0 0 if ($brik =~ /^[a-z]/ and $brik =~ /::/) { }
774 0 0 unless $r = $context->use($brik)
775 0 0 if ($r)
802 0 0 if ($count == 1 or $count == 2 and length $word > 0)
805 0 0 if ($self->log->level > 2 and not defined $available)
811 0 0 if $a =~ /^$word/
822 0 0 unless (defined $brik)
828 0 0 unless ($context->is_used($brik))
837 0 0 if ($self->help_show_base_attributes or $self->help_show_base_all or $self->show_base_attributes or $self->show_base_all or $self->help_show_all or $self->show_all)
844 0 0 if ($self->help_show_inherited_attributes or $self->help_show_inherited_all or $self->show_inherited_attributes or $self->show_inherited_all or $self->help_show_all or $self->show_all)
865 0 0 unless (defined $brik)
871 0 0 unless ($context->is_used($brik))
880 0 0 if ($self->help_show_base_commands or $self->help_show_base_all or $self->show_base_commands or $self->show_base_all or $self->help_show_all or $self->show_all)
887 0 0 if ($self->help_show_inherited_commands or $self->help_show_inherited_all or $self->show_inherited_commands or $self->show_inherited_all or $self->help_show_all or $self->show_all)
908 0 0 unless (defined $brik)
914 0 0 unless ($context->is_used($brik))
923 0 0 if ($self->comp_show_base_attributes or $self->comp_show_base_all or $self->show_base_attributes or $self->show_base_all or $self->comp_show_all or $self->show_all)
930 0 0 if ($self->comp_show_inherited_attributes or $self->comp_show_inherited_all or $self->show_inherited_attributes or $self->show_inherited_all or $self->comp_show_all or $self->show_all)
951 0 0 unless (defined $brik)
957 0 0 unless ($context->is_used($brik))
966 0 0 if ($self->comp_show_base_commands or $self->comp_show_base_all or $self->show_base_commands or $self->show_base_all or $self->comp_show_all or $self->show_all)
973 0 0 if ($self->comp_show_inherited_commands or $self->comp_show_inherited_all or $self->show_inherited_commands or $self->show_inherited_all or $self->comp_show_all or $self->show_all)
1002 0 0 if (not defined $arg1) { }
0 0 elsif (not defined $arg2) { }
1022 0 0 if ($context->is_used($arg1)) { }
0 0 elsif (exists $commands{$arg1}) { }
0 0 elsif (exists $aliases{$arg1}) { }
1030 0 0 if defined $help
1035 0 0 if defined $help
1054 0 0 if (exists $briks{$arg1}) { }
1064 0 0 if (exists $attributes->{$arg2} or exists $base_attributes->{$arg2}) { }
0 0 elsif (exists $commands->{$arg2} or exists $base_commands->{$arg2}) { }
1098 0 0 if ($count == 1 or $count == 2 and length $word > 0) { }
1103 0 0 unless length $a
1104 0 0 if $a =~ /^$word/
1123 0 0 unless (defined $brik and defined $attribute and defined $value)
1128 0 0 unless (defined $r)
1145 0 0 unless (defined $used)
1155 0 0 defined $words[1] ? :
1160 0 0 if ($count == 1 or $count == 2 and length $word > 0) { }
0 0 elsif ($count == 2 and length $word == 0) { }
0 0 elsif ($count == 3 and length $word > 0) { }
1163 0 0 if $a =~ /^$word/
1168 0 0 if ($self->log->level > 2 and not exists $used->{$brik})
1181 0 0 if ($self->log->level > 2 and not exists $used->{$brik})
1189 0 0 if ($attribute =~ /^$word/)
1209 0 0 if (not defined $brik) { }
0 0 elsif (defined $brik and not defined $attribute) { }
0 0 elsif (defined $brik and defined $attribute) { }
1210 0 0 unless my $used = $context->used
1222 0 0 unless my $used = $context->used
1224 0 0 unless (exists $used->{$brik})
1236 0 0 unless my $used = $context->used
1238 0 0 unless (exists $used->{$brik})
1242 0 0 unless ($used->{$brik}->brik_has_attribute($attribute))
1266 0 0 unless (defined $brik and defined $command)
1274 0 0 if ($self->global->exit_on_sigint)
1281 0 0 if ($self->log->level > 2)
1288 0 0 if ($module eq 'Term::Shell' and $command eq 'exec')
1293 0 0 unless (defined $r)
1298 0 0 if ($self->echo)
1322 0 0 unless (defined $used)
1327 0 0 defined $words[1] ? :
1332 0 0 if ($count == 1 or $count == 2 and length $word > 0) { }
0 0 elsif ($count == 2 and length $word == 0) { }
0 0 elsif ($count == 3 and length $word > 0) { }
1335 0 0 if $a =~ /^$word/
1340 0 0 if ($self->log->level > 2)
1341 0 0 unless (exists $used->{$brik})
1355 0 0 if ($self->log->level > 2)
1356 0 0 unless (exists $used->{$brik})
1365 0 0 if ($command =~ /^$word/)
1390 0 0 if ($context->is_used('shell::command'))
1391 0 0 $self->capture_mode ? :
1392 0 0 if (defined $args[0] and $args[0] =~ m[^\s*/])
1418 0 0 if ($@)
1419 0 0 if ($self->log->level > 2)
1426 0 0 if ($this =~ /$dirpattern/)
1436 0 0 if ($@)
1437 0 0 if ($self->log->level > 2)
1444 0 0 if ($this =~ /$filepattern/)
1480 0 0 unless (length $word)
1490 0 0 if ($last =~ /^\$/ and not $line =~ /\s+$/) { }
1496 0 0 if ($this =~ /^$word/)
1508 0 0 if ($word =~ m[^(.*)/.*$])
1518 0 0 if ($this =~ /^$word/)
1526 0 0 if (/\s+/)
1560 0 0 unless (length $start)
1570 0 0 if ($last =~ /^\$/ and not $line =~ /\s+$/) { }
1576 0 0 if ($this =~ /^$start/)
1594 0 0 if ($start =~ m[^(.*)/.*$])
1603 0 0 if ($this =~ /^$start/)
1611 0 0 if (/\s+/)