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;
}
->() |