Subject: | Data::Presenter::Combo::Union object not being constructed properly |
In versions 1.00 and 1.01 of Data::Presenter, Data::Presenter::Combo::new(\@objects) is not initializing the object correctly. Using an example drawn from t/04.t, we would expect that the 'fields' of the Combo::Union object would be:
'fields' => ['lastname','firstname','cno','unit','ward','dateadmission','datebirth','stateid','medicare','medicaid','haircolor','number'],
And indeed it is. We would then expect that the data for individual records would be assigned in the order just described. The data coming from $objects[0] -- 'lastname' through 'datebirth' above -- is being correctly assigned. But data from $objects[1] and $objects[2] is not being assigned correctly. For instance, the datum for 'haircolor' is in position 11 instead of 10, and the datum for 'number' is in position 10 instead of 11.
This becomes evident when you call a method such as $dpCU->seen_one_column($col) and you select a field from an object other than the first as the value of $col (e.g., $col = 'haircolor').
This is an author-reported bug. I'm working on it. In the meantime, Data::Presenter::Combo::Union objects are suspect.