perl - Getting rid of warnings for undefined values when using Chart module -


i'm using chart module generate charts in png format csv data:

enter image description here

it works well, charts okay, warnings undef values (there 3 such values @ end of above diagram):

#  ~/txv3.pl "./l*txv3*.csv"  > /var/www/html/x.html generating chart: l_b17_c0_txv3lin_pa3_ti1_ci1 use of uninitialized value $label in length @ /usr/share/perl5/vendor_perl/chart/base.pm line 3477, <> line 69. use of uninitialized value in subroutine entry @ /usr/share/perl5/vendor_perl/chart/base.pm line 3478, <> line 69. use of uninitialized value $label in length @ /usr/share/perl5/vendor_perl/chart/base.pm line 3477, <> line 69. use of uninitialized value in subroutine entry @ /usr/share/perl5/vendor_perl/chart/base.pm line 3478, <> line 69. use of uninitialized value $label in length @ /usr/share/perl5/vendor_perl/chart/base.pm line 3477, <> line 69. use of uninitialized value in subroutine entry @ /usr/share/perl5/vendor_perl/chart/base.pm line 3478, <> line 69. 

i need rid of these warnings useless here , make log of hudson-job unreadable.

so i've tried (using perl 5.10.1 on centos 6.4 / 64 bit):

#!/usr/bin/perl -w use strict; ....  $pwrpng->set(%pwroptions); $biaspng->set(%biasoptions);  $pwrpngfile = file::spec->catfile(png_dir, "${csv}_pwr.png"); $biaspngfile = file::spec->catfile(png_dir, "${csv}_bias.png");  {         no warnings;          $pwrpng->png($pwrpngfile, $pwrdata);         $biaspng->png($biaspngfile, $biasdata); } 

but warnings still printed.

any suggestions please?

in hudson-job, install handler warn signal filters warnings ones know won't show up.

begin {      $sig{'__warn__'} = sub { $w = shift; warn $w if $w !~ m|/chart/base.pm| }; } 

Comments