Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: david [...] landgren.net
Cc:
AdminCc:

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



Subject: Cannot chain setCols and addRow methods
It would be nice if setCols and addRow (at least) allowed method chaining. At the moment they explicitly return undef. This would allow one to write my $t = Text::ASCIITable->new(...) ->setCols(qw(foo bar)) ->addRow( 1, 2 ) ->addRow( 3, 4 ); print $t->draw; And in fact it would allow you to print Text::ASCIITable->new(...) ->setCols(qw(foo bar)) ->addRow( 1, 2 ) ->addRow( 3, 4 ) ->draw; And that would be nice. It would really come in handy if bug #14703 was implemented.
This is fixed in the upcoming version as an option. And again thanks for the ideas and comments!