#1098916 libchart-perl: limit of number of colors too low

#1098916#5
Date:
2025-02-25 22:17:37 UTC
From:
To:
Package: libchart-perl
Version: 2.403.9-1
Severity: normal

Hello Debian Perl Group,

Upgrading popcon.debian.org to bookworm breaks the graphics due to an issue in
libchart-perl. I join a very simple test.

% perl test.pl 50

//OK

% perl test.pl 75
Use of uninitialized value in hash element at /usr/share/perl5/Chart/Base.pm line 1144.
Use of uninitialized value $arg in index at /usr/share/perl5/Graphics/Toolkit/Color.pm line 63.
Use of uninitialized value $arg in substr at /usr/share/perl5/Graphics/Toolkit/Color.pm line 64.
Use of uninitialized value $name in transliteration (tr///) at /usr/share/perl5/Graphics/Toolkit/Color/Constant.pm line 839.
Use of uninitialized value $name in lc at /usr/share/perl5/Graphics/Toolkit/Color/Constant.pm line 840.
Use of uninitialized value $arg in concatenation (.) or string at /usr/share/perl5/Graphics/Toolkit/Color.pm line 82.
'' is an unknown color name, please check Graphics::Toolkit::Color::Constant::all_names(). at /usr/share/perl5/Chart/Base.pm line 1165.
Unrecognized color for dataset73
 at test.pl line 10.

with bullseye, it works for at least 374.

Cheers,

#1098916#10
Date:
2025-02-26 10:32:53 UTC
From:
To:
Apparently, in Chart/Base.pm line 939
colors_default_spec was changed to include much less default colors compared to 2.4.10.
At the very least, Chart/Base.pm should include some error checking.

In any case, I have found a work-around for popcon.debian.org.

Cheers,