line |
l |
!l&&r |
!l&&!r |
condition |
108
|
0 |
0 |
0 |
$self->{'disp_length'} ||= sub {
return unless defined $self->{'length'};
my $length = $self->{'length'};
if ($length >= 1024) {
return sprintf('%.1fKB', $length / 1024);
};
return "${length}B";
}
->() |
117
|
0 |
0 |
0 |
$self->{'disp_expire'} ||= sub {
return unless defined $self->{'expire'};
return strftime('%F %T', localtime $self->{'expire'});
}
->() |
132
|
0 |
0 |
0 |
$self->{'disp_value'} ||= sub {
my $text = $self->value_text;
return unless defined $text;
return $text if length $text <= $DISPLAY_DATA_LENGTH;
my $length = length $text;
my $result = substr($text, 0, $DISPLAY_DATA_LENGTH - 1);
$result .= '...(the rest is skipped)';
return $result;
}
->() |
144
|
0 |
0 |
0 |
$self->{'value_text'} ||= sub {
return unless defined $self->{'value'};
unless ($self->{'value'} =~ /^[\x21-\x7e\s]/) {
return '(Not ASCII)';
};
return $self->{'value'};
}
->() |