Skip Menu |

This queue is for tickets about the Maypole-Plugin-QuickTable CPAN distribution.

Report information
The Basics
Id: 13778
Status: resolved
Priority: 0/
Queue: Maypole-Plugin-QuickTable

People
Owner: Nobody in particular
Requestors: davekam [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: tabulate does not stringify objects before passing them to HTML::QuickTable
I've run into this issue in version 0.11 when calling tabulate on rows from a table containing a time stamp field. I have the field inflated to Time::Piece. Maypole::Plugin::QuickTable passes it as a Time::Piece object to HTML::QuickTable, but it never gets stringified -- it's outputted as an empty string. A suggested fix is the following, in _tabulate on line 144: my $data = [ map { $self->maybe_link_view( ''.$_ ) } Changing $_ to ''.$_ ensures each cell of the table will be stringified before the data is passed to HTML::QuickTable. This is arguably a bug with HTML::QuickTable rather than Maypole::Plugin::QuickTable. The HTML::QuickTable docs don't mention the possibility of passing references to render() as cell contents, and all the examples contain strings. But the fact is that it doesn't stringify object references, and it might be easier to incorporate the fix in this module rather than making HTML::QuickTable's render function even more complex. Dave
[guest - Tue Jul 19 13:23:28 2005]: Show quoted text
> I've run into this issue in version 0.11 when calling tabulate on rows > from a table containing a time stamp field. I have the field > inflated to Time::Piece. Maypole::Plugin::QuickTable passes it as a > Time::Piece object to HTML::QuickTable, but it never gets > stringified -- it's outputted as an empty string. A suggested fix > is the following, in _tabulate on line 144: > > my $data = [ map { $self->maybe_link_view( ''.$_ ) } > > Changing $_ to ''.$_ ensures each cell of the table will be > stringified before the data is passed to HTML::QuickTable.
Yes, but maybe_link_view needs to receive objects if they are Maypole objects, to construct a link. Show quoted text
> This is arguably a bug with HTML::QuickTable rather than > Maypole::Plugin::QuickTable. The HTML::QuickTable docs don't > mention the possibility of passing references to render() as cell > contents, and all the examples contain strings. But the fact is > that it doesn't stringify object references, and it might be easier > to incorporate the fix in this module rather than making > HTML::QuickTable's render function even more complex. > > Dave
Fixed in 0.302 - maybe_link_view stringifies non-Maypole objects.