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.