VTide/Command/Split.pm

filter: Statementstmt 63.1% 24 / 38 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 6 / 9 Podpod 100% 3 / 3 totaltotal 52.3% 33 / 63 CC 6 SCAR 29.3
CC
6
Cov
49%
run
42.0
details_sub
2.0
auto_complete
2.0
CRAP 18.7
« VTide/Command/Sessions.pm ↑ Summary VTide/Command/Init.pm »
1 package App::VTide::Command::Split;
2  
3 # Created on: 2016-03-22 15:42:06
4 # Create by: Ivan Wills
5 # $Id$
6 # $Revision$, $HeadURL$, $Date$
7 # $Revision$, $Source$, $Date$
8  
9 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use English qw/ -no_match_vars /;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use YAML::Syck;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 extends 'App::VTide::Command::Start';
17  
18 1 our $VERSION = version->new('1.0.6');
19 1 our $NAME = 'split';
20 1 our $OPTIONS = [ 'test|t!', 'verbose|v+', ];
21 1 our $LOCAL = 1;
22 0 ▶sub details_sub { return ( $NAME, $OPTIONS, $LOCAL ) }
Subroutine details_sub: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub run {
Subroutine run: not called CC=6 SCAR=37.4
Pod documented
25 0 my ($self) = @_;
26  
27 0 my $split = shift @{ $self->options->files };
28 0 ▶ my $v = $self->defaults->{verbose} ? '--verbose' : '';
Branch: 1 branch
BranchTrueFalseTotal
$self->defaults->{'verbose'} ? : 0 0 0
29 0 my $term = $ENV{VTIDE_TERM};
30 0 ▶ my $cmd = $term ? "vtide run $v" : 'bash';
Branch: 1 branch
BranchTrueFalseTotal
$term ? : 0 0 0
31 0 my $out = $self->tmux_window( $term, $cmd, undef, $split );
32  
33 0 ▶ if ( $self->defaults->{test} || $self->defaults->{verbose} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->defaults->{"test"} or $self->defaults->{"verbose"}) 0 0 0
Condition0%0/3
$self->defaults->{"test"} or $self->defaults->{"verbose"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->defaults->{"test"} or $self->defaults->{"verbose"}
$self->defaults->{"test"} $self->defaults->{"verbose"}
Truth table0%0/3
A or B
A= $self->defaults->{"test"}B= $self->defaults->{"verbose"}
ABresult
1X1
011
000
34 0 print "tmux $out\n";
35 0 ▶ return 0 if $self->defaults->{test};
Branch: 1 branch
BranchTrueFalseTotal
if $self->defaults->{"test"} 0 0 0
36 }
37  
38 0 system "tmux $out";
39  
40 0 return;
41 }
42  
43 0 ▶sub auto_complete {
Subroutine auto_complete: not called CC=1 SCAR=6.9
Pod documented
44 0 my ($self) = @_;
45 }
46  
47 1 1;
48  
49 __END__
« VTide/Command/Sessions.pm ↑ Summary VTide/Command/Init.pm »