Skip Menu |

This queue is for tickets about the Text-ASCIITable CPAN distribution.

Report information
The Basics
Id: 14702
Status: resolved
Priority: 0/
Queue: Text-ASCIITable

People
Owner: haakon [...] _NOSPAM_loopback.no
Requestors: david [...] landgren.net
Cc:
AdminCc:

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



Subject: Cannot use undef as cell values
you cannot add a row that contains undef: $t->addRow( 1, 3, undef, 8 ); This will produce a warning (or maybe when draw() is called, I didn't check). It would be nice to handle this gracefully. As a work-around, I had to $t->addRow( map { defined($_) ? $_ : '' } @array ); Ideally, it would be nice to have a property that could be set, to tell the object how to render an undef, for example my $t = Text::ASCIITable->new({ undef_as => '' }); (which reminds me, the documentation uses the semi-deprecated "new Text::ASCIItable" construct. It should use "Text::ASCIITable->new" instead).
From: LUNATIC
[DLAND - Thu Sep 22 08:18:39 2005]: Show quoted text
> you cannot add a row that contains undef: > > $t->addRow( 1, 3, undef, 8 ); > > This will produce a warning (or maybe when draw() is called, I didn't > check). It would be nice to handle this gracefully. As a work- > around, I had to > > $t->addRow( map { defined($_) ? $_ : '' } @array ); > > Ideally, it would be nice to have a property that could be set, to > tell the object how to render an undef, for example > > my $t = Text::ASCIITable->new({ undef_as => '' }); > > (which reminds me, the documentation uses the semi-deprecated "new > Text::ASCIItable" construct. It should use "Text::ASCIITable->new" > instead).
This is now fixed in the upcoming version. Than you for your report!