diff --git a/TimeSeries.pm b/TimeSeries.pm index 91ac301..f236e3e 100644 --- a/TimeSeries.pm +++ b/TimeSeries.pm @@ -6,7 +6,7 @@ use Data::Dumper; use HTTP::Date qw(parse_date); use Time::Local qw(timegm_nocheck); -$VERSION = do { my @r=(q$Revision: 1.6 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; +$VERSION = do { my @r=(q$Revision: 1.7 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; sub new { my ($class, %opts) = @_; @@ -54,7 +54,7 @@ sub legend { my ($self, @legend) = @_; my $oldlegend = $self->{legend}; $self->{legend} = [@legend] if (@legend); - return @$oldlegend; + return $oldlegend ? @$oldlegend : (); } sub style {