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

Report information
The Basics
Id:
102865
Status:
new
Priority:
Low/Low

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

BugTracker
Severity:
(no value)
Broken in:
0.20
Fixed in:
(no value)



Subject: allowANSI breaks table alignment if two identical column names are used
This example code: use 5.014; use strict; use warnings; my @data = ( [0, 'xxxxxxx xxxxxxx' , 'xxxxxxx'], [0, 'xxxxxxxxxxx xxxxxxx' , 'xxxxxxx'], [0, 'xxxxxxxx-xxxxxxx' , 'xxxxxxxx'], [0, 'xxxxxxxx-xxxxxxx' , 'xxxxxxxx'], [0, 'xxxx-xxxxxxxx xxxxxxx' , 'xxxx-xxxxxxxx'], [0, 'xxxxxxxxx-xxxxxxx' , 'xxxxxxxxx-xxxxxxx'], [1, 'xxxxxxxxxxxxxx xxxxxx' , 'xxxxxxx'], [1, 'xxxxxx xxxxxxxxxx' , 'xxxxxxx'], ); use Text::ASCIITable; my $t = Text::ASCIITable->new(); $t->setCols('rank', 'name', 'name'); $t->setOptions(allowANSI => 1); $t->addRow(@$_) for @data; print $t; produces: .----------------------------------------------. | rank | name | name | +------+-------------------+-------------------+ | 0 | xxxxxxx xxxxxxx | xxxxxxx | | 0 | xxxxxxxxxxx xxxxxxx | xxxxxxx | | 0 | xxxxxxxx-xxxxxxx | xxxxxxxx | | 0 | xxxxxxxx-xxxxxxx | xxxxxxxx | | 0 | xxxx-xxxxxxxx xxxxxxx | xxxx-xxxxxxxx | | 0 | xxxxxxxxx-xxxxxxx | xxxxxxxxx-xxxxxxx | | 1 | xxxxxxxxxxxxxx xxxxxx | xxxxxxx | | 1 | xxxxxx xxxxxxxxxx | xxxxxxx | '------+-------------------+-------------------' It works fine if either the column names are distinct, or allowANSI isn't set.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.