Subject: | width = '' produces a warning on line 99 |
VERSION 1.25
Use of uninitialized value in division (/)
at /usr/lib/perl5/vendor_perl/5.8.8/HTML/CalendarMonthSimple.pm line 99.
This happens when the width is set to "" (empty string). In HTML this
sets the width to browser best fit. However, the package issues a
warning when calculating the column widths. I'd suggest setting the
column widths to "*" when the table width is "".
mrdvt92
98: my $tablewidth = $self->width(); #my case width = ''
99: $tablewidth =~ m/^(\d+)(\%?)$/; my $cellwidth = (int($1/7))
||'14'; if ($2) { $cellwidth .= '%'; }
Suggest
if ($tablewidth =~ m/^(\d+)(\%?)$/) {
$cellwidth = (int($1/7))||'14';
$cellwidth .= '%' if $2;
} else {
$cellwidth="*";
}