Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVG-TT-Graph CPAN distribution.

Report information
The Basics
Id: 43854
Status: resolved
Priority: 0/
Queue: SVG-TT-Graph

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)



Subject: Warnings when running the piechart synopsis code
When running the code provided in the synopsis of SVG::TT::Graph::Pie and using "use warnings;", some warning messages are displayed. First, on loading SVG::TT::Graph, I get: Name "Template::Filters::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. Name "Template::Context::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. Name "Template::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. Name "Template::Service::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. Name "Template::Provider::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. Name "Template::Plugins::BASEARGS" used only once: possible typo at /usr/lib/perl5/Template/Base.pm line 49. An on $graph->burn(), I get: Argument "" isn't numeric in addition (+) at input text line 325, <DATA> line 439. Argument "" isn't numeric in numeric lt (<) at input text line 347, <DATA> line 439. Argument "" isn't numeric in numeric lt (<) at input text line 347, <DATA> line 439. Argument "" isn't numeric in numeric lt (<) at input text line 347, <DATA> line 439.
Show quoted text
> An on $graph->burn(), I get: > Argument "" isn't numeric in addition (+) at input text line 325, <DATA> > line 439. > Argument "" isn't numeric in numeric lt (<) at input text line 347, > <DATA> line 439. > Argument "" isn't numeric in numeric lt (<) at input text line 347, > <DATA> line 439. > Argument "" isn't numeric in numeric lt (<) at input text line 347, > <DATA> line 439.
I ran into this as well, and worked around it the following way. The second change illustrates some dubious code that should probably be removed, or fixed, but I don't see max_key_size used anywhere else. I am also getting a lot of similar TT warnings from Line graphs, but haven't looked at those down yet. --- a/cpan/SVG-TT-Graph-0.12/lib/SVG/TT/Graph/Pie.pm Wed Feb 25 14:45:56 2009 -0800 +++ b/cpan/SVG-TT-Graph-0.12/lib/SVG/TT/Graph/Pie.pm Fri Mar 13 13:41:29 2009 -0700 @@ -516,6 +516,7 @@ [% min_value = 99999999999 %] [% max_value = 0 %] [% max_key_size = 0 %] + [% total = 0 %] [% FOREACH field = config.fields %] [% total = total + data.0.data.$field %] [% count = count + 1 %] @@ -526,7 +527,8 @@ [% max_value = data.0.data.$field %] [% END %] <!-- find largest dataset title for Key size --> - [% IF max_key_size < dataset.title.length %] + # doesn't seem like max_key_size is used anywhere, and dataset is not defined here, so you get perl warning + [% IF 0 && max_key_size < dataset.title.length %] [% max_key_size = dataset.title.length %] [% END %] [% END %]