Branch Coverage

blib/lib/Github/Backup.pm
Criterion Covered Total %
branch 17 40 42.5


line true false branch
59 2 4 unless ($self->token)
60 0 2 if $ENV{'GITHUB_TOKEN'}
64 4 9 unless ($_)
72 1 1 if ($self->proxy)
88 2 0 unless defined $self->user
90 0 2 if (-d $self->stg)
91 0 0 unless rmtree($self->stg)
94 0 2 unless mkdir $self->stg
112 0 0 if (not $self->forks) { }
113 0 0 unless (exists $repo->{'parent'})
131 0 0 unless mkdir $self->stg . '/issues'
147 0 0 unless ($dir_created)
148 0 0 unless mkdir $issue_dir
151 0 0 unless open my $fh, '>', "$issue_dir/$issue->{'id'}"
161 0 6 if ($self->dir and -d $self->dir)
162 0 0 unless rmtree($self->dir)
165 2 4 if ($self->stg and -d $self->stg)
166 0 2 unless move($self->stg, $self->dir)
170 1 3 if ($self->dir and -d $self->dir and $self->_clean)
172 0 1 unless rmtree($self->dir)