2012/9/23 Shlomi Fish via RT <bug-Text-Table@rt.cpan.org>:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=79803 >
>
> Hi Ilya,
>
> thanks for your report.
>
> On Sat Sep 22 21:20:52 2012, ilya.tk@gmail.com wrote:
>> --- /usr/local/share/perl/5.14.2/Text/Table.pm~ 2012-09-23
>> 05:01:15.958537232 +0400
>> +++ /usr/local/share/perl/5.14.2/Text/Table.pm 2012-09-23
>> 05:02:13.990824884 +0400
>> @@ -125,21 +125,21 @@
>> }
>> elsif (ref($x) ne 'ARRAY')
>> {
>> $x = [ split /\n/, $x, -1];
>> }
>> }
>>
>> _default_if_empty(\$align, 'auto');
>>
>> unless (
>> - ref $align eq 'Regex' or
>> + ref $align eq 'Regexp' or
>> $align =~ /^(?:left|center|right|num\(?|point\(?|auto)/
>> ) {
>> _warn( "Invalid align specification: '$align', using 'auto'");
>> $align = 'auto';
>> }
>>
>> _default_if_empty(\$align_title, 'left');
>>
>> if ( ! _is_align($align_title) ) {
>> _warn( "Invalid align_title specification: " .
>
> It indeed seems like a bug (according to perldoc -f ref). However:
>
> 1. The patch uses absolute file system paths, and is not a patch that
> can be applied as is to the version control repository:
>
>
https://github.com/shlomif/Text-Table
>
> 2. It lacks a regression automated test.
>
> 3. It does not document the change in the Changes.
>
> ----
>
> For more information, see:
>
>
http://www.shlomifish.org/open-source/resources/how-to-contribute-to-my-projects/
>
> Regards,
>
> -- Shlomi Fish
>
>
>
It is really bug, regex alignment is not working
http://search.cpan.org/~shlomif/Text-Table-1.125/lib/Text/Table.pm#Alignment
expectations:
$ perl -MText::Table -e 'print Text::Table->new({align =>
qr/!/})->load(["aa!"],["a!a"],["!aa"])'
aa!
a!a
!aa
reality:
$ perl -MText::Table -e 'print Text::Table->new({align =>
qr/!/})->load(["aa!"],["a!a"],["!aa"])'
aa!
a!a
!aa
https://github.com/shlomif/Text-Table/blob/c28600f081e79ac722da2f42f111b350418bdd0a/Text-Table/lib/Text/Table.pm
line 135.
In patch above I just report about it, not full fix.