Skip Menu |

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

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

People
Owner: haakon [...] _NOSPAM_loopback.no
Requestors: peter [...] morch.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.20
Fixed in: (no value)



Subject: Warning missing with alignCol for unkown column in 0.20
From a cursory glance at the perldoc (my own fault), I incorrectly thought that alignCol took an integer columnID whereas alignColName took a column name. My fault that I couldn't get alignCol to work... ;-) But when I tried on 0.18 to see if it was a regression, I got the very helpful warning that "Could not find '0' in columnlist". 0.18 issues a warning, 0.20 does not. If that is by design, feel free to ignore this bug. perl -MText::ASCIITable -le 'print $Text::ASCIITable::VERSION; my $t = Text::ASCIITable->new(); $t->setCols("a", "b"); $t->addRow(100, "abc"); $t->addRow(1, "a"); $t->alignCol("a", "center"); $t->alignCol(0, "center"); print $t' ----------------------- 0.18 Could not find '0' in columnlist at -e line 1 .-----------. | a | b | +-----+-----+ | 100 | abc | | 1 | a | '-----+-----' ----------------------- 0.20 .-----------. | a | b | +-----+-----+ | 100 | abc | | 1 | a | '-----+-----'
fr. 24. april 2015 05.07.18 skrev peter@morch.com: Show quoted text
> From a cursory glance at the perldoc (my own fault), I incorrectly > thought that alignCol took an integer columnID whereas alignColName > took a column name. My fault that I couldn't get alignCol to work... > ;-) > > But when I tried on 0.18 to see if it was a regression, I got the very > helpful warning that "Could not find '0' in columnlist". > > 0.18 issues a warning, 0.20 does not. If that is by design, feel free > to ignore this bug. > > perl -MText::ASCIITable -le 'print $Text::ASCIITable::VERSION; my $t = > Text::ASCIITable->new(); $t->setCols("a", "b"); $t->addRow(100, > "abc"); $t->addRow(1, "a"); $t->alignCol("a", "center"); $t-
> >alignCol(0, "center"); print $t'
> > ----------------------- > 0.18 > Could not find '0' in columnlist at -e line 1 > > .-----------. > | a | b | > +-----+-----+ > | 100 | abc | > | 1 | a | > '-----+-----' > ----------------------- > 0.20 > .-----------. > | a | b | > +-----+-----+ > | 100 | abc | > | 1 | a | > '-----+-----'
Somehow, it seems that the report-error function got broken in 0.19. The "print" was somehow removed entirely. I will fix in the upcoming release. Thanks for the report :)
Fixed in 0.22