Subject: | Failure to cope gracefully with a tag count of 0 |
HTML::TagCloud dies when it encounters a tag with a count of 0.
When I run:
perl -MHTML::TagCloud -E 'my $t = HTML::TagCloud->new; $t->add(qw(tag
link 0)); $t->html_without_categories;'
my code dies with the following output:
Can't take log of 0 at /opt/map/apps/perlmodules/HTML/TagCloud.pm line 80.
Arguably, users shouldn't pass in tags with a count of 0, but dealing
with this makes the code more robust.
You might want to add a test case for this and have the code ignore all
tags with a count of 0.
Thank you for your work maintaining this useful module.
Tom Hukins