Avoid warning about undefinded value when calling legend for the first time.

This commit is contained in:
hjp 2003-08-15 21:28:39 +00:00
parent b6aab82949
commit 674160c45c
1 changed files with 2 additions and 2 deletions

View File

@ -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 {