aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/App/Glacier/DB.pm2
-rw-r--r--lib/App/Glacier/Progress.pm7
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/App/Glacier/DB.pm b/lib/App/Glacier/DB.pm
index 74ad665..ad165f0 100644
--- a/lib/App/Glacier/DB.pm
+++ b/lib/App/Glacier/DB.pm
@@ -20,7 +20,7 @@ my %transcode = (
],
'json' => [
# Encoder
- sub { JSON->new->convert_blessed(1)->encode(shift) },
+ sub { JSON->new->allow_nonref->convert_blessed(1)->encode(shift) },
# Decoder
sub { JSON->
new->
diff --git a/lib/App/Glacier/Progress.pm b/lib/App/Glacier/Progress.pm
index 39b892b..8defc7d 100644
--- a/lib/App/Glacier/Progress.pm
+++ b/lib/App/Glacier/Progress.pm
@@ -119,8 +119,11 @@ sub display {
$text .= '.' x int($self->{_current} / $self->{_total} * $w);
}
}
-
- $text .= ' ' x ($self->_getwidth - length($text));
+
+ my $pad = $self->_getwidth - length($text);
+ if ($pad > 0) {
+ $text .= ' ' x $pad;
+ }
my $fd = $self->{_tty};
print $fd "\r$text";
}

Return to:

Send suggestions and report system problems to the System administrator.