Skip Menu |

This queue is for tickets about the HTML-CalendarMonthSimple CPAN distribution.

Report information
The Basics
Id: 28530
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: HTML-CalendarMonthSimple

People
Owner: Nobody in particular
Requestors: MRDVT [...] cpan.org
Cc:
AdminCc:

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



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="*"; }
issue fix in version 1.26