Condition Coverage

blib/lib/App/tmclean.pm
Criterion Covered Total %
condition 0 14 0.0


and 3 conditions

line !l l&&!r l&&r condition
49 0 0 0 not $self->dry_run and $ENV{'USER'} ne 'root'

or 2 conditions

line l !l condition
136 0 0 $self->days || 366

or 3 conditions

line l !l&&r !l&&!r condition
105 0 0 0 $self->{'mount_point'} ||= sub { my(@lines) = `tmutil destinationinfo`; if ($? != 0) { die "failed to execute `tmutil destinationinfo`: $?\n"; } ; foreach my $line (@lines) { chomp $line; my($key, $val) = split(/\s+:\s+/, $line, 2); if ($key eq 'Mount Point') { return $val; } ; } ; die "no mount points found\n"; } ->()
117 0 0 0 $self->{'machine_name'} ||= do { chomp(my $hostname = `hostname`); if ($? != 0) { die "failed to execute `hostname`: $?\n"; } ; $hostname =~ s/\.local$//; $hostname }
138 0 0 0 $self->{'before_tp'} ||= sub { if ($self->before) { my $time = &str2time(scalar $self->before); die "unrecognized date format @{[$self->before];}" unless $time; return 'Time::Piece'->localtime($time); } ; my $days = $self->days || 366; return 'Time::Piece'->localtime - 86400 * $days; } ->()