DBIx::FetchLoop is a supplemental approach for data retrieval with DBI. Result rows are queued with hash references to previous, current and next rows.
Utility functions allow for simplified comparison of a field between previous and current or current and next rows. Additional functions allow you automatically create new fields for aggregating or concatenating based on fields in the resulting dataset.
This module is intended to eliminate the need for temporary variables for loop detection as well as aggregation and concatenation.