Skip Menu |

This queue is for tickets about the Data-Table CPAN distribution.

Report information
The Basics
Id: 50053
Status: rejected
Priority: 0/
Queue: Data-Table

People
Owner: Nobody in particular
Requestors: niels [...] genomics.dk
Cc:
AdminCc:

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



Subject: Table is rotated unpredictably
Date: Mon, 28 Sep 2009 00:50:15 +0200 (CEST)
To: bug-Data-Table [...] rt.cpan.org
From: niels [...] genomics.dk
When $table->colRef is called on a table of type 0 (row based), then after the call the whole table has become "rotated", i.e. become column based and with type 1. This is ok when the Data::Table's html methods are used, because they check for orientation. But foreign methods (like my html routines) would then also have to check. Getting a column from a table should not change it. It is also inefficient when one does a mixture of column and row operations. To not get surprises at display time one will need to remember the original orientation and invoke $table->rotate if it has changed. Question: the module is convenient, but there are unfixed bugs; are the author(s) still committed to fixes?
Not a bug. The document states: "Implementation type of a table should be considered volatile". That is if you should not make any assumption on the internal structure of the table. If you would like a stable column, use $table->col. If you use $table->colRef, you should consume the result, before you make the next table call (which could potentially change the internal structure). The rationale of switching table structures between row/col-based internally as needed is also explained in the document. On Sun Sep 27 18:50:49 2009, niels@genomics.dk wrote: Show quoted text
> When $table->colRef is called on a table of type 0 (row based), then > after the call the whole table has become "rotated", i.e. become
column Show quoted text
> based and with type 1. This is ok when the Data::Table's html methods > are used, because they check for orientation. But foreign methods
(like Show quoted text
> my html routines) would then also have to check. Getting a column from > a table should not change it. It is also inefficient when one does a > mixture of column and row operations. > > To not get surprises at display time one will need to remember the > original orientation and invoke $table->rotate if it has changed. > > Question: the module is convenient, but there are unfixed bugs; are > the author(s) still committed to fixes? > > >