lib/Tapper/Installer/Precondition/Fstab.pm

filter: Statementstmt 70.3% 19 / 27 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 69.4% 25 / 36 CC 2 SCAR 8.9
CC
2
Cov
66%
install
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« lib/Tapper/Installer/Precondition/Copyfile.pm ↑ Summary lib/Tapper/Installer.pm »
1 package Tapper::Installer::Precondition::Fstab;
2 5 our $AUTHORITY = 'cpan:TAPPER';
3 5 $Tapper::Installer::Precondition::Fstab::VERSION = '5.0.3';
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use YAML;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use File::Basename;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 extends 'Tapper::Installer::Precondition';
11  
12  
13  
14  
15 0 ▶sub install {
Subroutine install: not called CC=2 SCAR=17.9
Pod documented
16 0 my ($self, $precond) = @_;
17  
18 0 my ($filename, $path, $retval);
19  
20 0 my $basedir = $self->cfg->{paths}{base_dir};
21 0 my $line = $precond->{line};
22  
23 0 my $cmd = '(echo "" ; echo "# precond::fstab" ; echo "'.$line.'" ) >> '.$basedir.'/etc/fstab';
24  
25 0 $self->log->debug($cmd);
26  
27 0 ▶ system($cmd) == 0 or return ("Could not patch /etc/fstab: $!");
Branch: 1 branch
BranchTrueFalseTotal
system($cmd) == 0 or return "Could not patch /etc/fstab: $!" 0 0 0
28 0 return 0;
29 }
30  
31 5 1;
32  
33 __END__
« lib/Tapper/Installer/Precondition/Copyfile.pm ↑ Summary lib/Tapper/Installer.pm »