Introduction to blogs.perl.org + Text::Table
Hello, Perl bloggers! I decided to start blogging about a most of my exclusively Perl-related stuff here on blogs.perl.org, in hope of getting more comments from active Perlers. (Until now, I've blogged about it on my technical LiveJournal blog and previously on use.perl.org Journal.). You can learn more about me on my home site - www.shlomifish.org .
OK, having put that aside - let's move on to the main topic of this post.
Many months ago I wanted to use the Text::Table CPAN module to present a table related to the meta-scan heuristics construction scheme of Freecell Solver. Now, I wanted to present nicely formatted borders, using the Unicode box-drawing characters (which some people would recall from DOS). However, I found it difficult to specify the separators in the rulers properly based on their indices - they were assumed to be the same globally. As a result, I've written a patch, and placed the modifications in a github repository.
The author of Text-Table (ANNO) told me he was working on a new version of Text-Table, which will contain many improvements. However, I was still interested in an enhanced version of the old Text-Table codebase with my patch, and after talking on #perl, ANNO said I could have co-maint on Text-Table-1.x and continue to improve it. The new Text-Table will be released under a separate namespace - Text::Table2 or so.
Many thanks go to ANNO for agreeing that I further develop Text::Table.
Using my git repository, I did many cleanups, like add pod.t and pod-coverage.t, tweak the author information, add more strict and warnings to the file, etc. ANNO 's original licence is "Same terms as Perl", but since it is an iffy licensing, I decided that all further changes will be under the terms of the Public-Domain/X11L/etc.. People who send me pull requests on github may wish to add their names to the credits (in the changes or even in the core module) but must not claim copyrights to their changes.
OK, now for some output of the Unicode table:
┌───────╥─────┬──────┬─────┬────┬──────┐ │ Place ║ 1 │ 2 │ 3 │ 4 │ 5 │ ├───────╫─────┼──────┼─────┼────┼──────┤ │ 1 ║ 68 │ 317 │ 15 │ 3 │ 381 │ ├───────╫─────┼──────┼─────┼────┼──────┤ │ 2 ║ 171 │ 482 │ 31 │ 14 │ 594 │ ├───────╫─────┼──────┼─────┼────┼──────┤ │ 3 ║ 275 │ 867 │ 42 │ 22 │ 1007 │ ├───────╫─────┼──────┼─────┼────┼──────┤ │ 4 ║ 458 │ 1442 │ 125 │ 30 │ 1630 │ ├───────╫─────┼──────┼─────┼────┼──────┤ │ 5 ║ 640 │ 1715 │ 137 │ 47 │ 1730 │ └───────╨─────┴──────┴─────┴────┴──────┘
Future plans are:
- Convert the remaining test scripts to Test::More.
- Go over the code and clean it up
- Add CPAN keywords to the META.yml. (Perhaps this will require defining a Module-Build-based Build.PL file).
- Add URLs to the META.yml - to the module's homepage, to the github repository, etc..
- Possibly implement some future features.
- Add some more tests.
Contributions are naturally welcome, just fork the github repository and send me a pull request. (Or patches are also OK.)