Skip Menu |

This queue is for tickets about the Tie-File CPAN distribution.

Report information
The Basics
Id: 39196
Status: resolved
Priority: 0/
Queue: Tie-File

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

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



Subject: EXTEND changes visible size of file and array.
Bug present in at least Tie::File 0.97 and 0.97_02. EXTEND is used to expand the internal buffer. STORESIZE is used to actually change the visible size of the array. Tie::File incorrectly treats EXTEND as STORESIZE. When sorting in place (@a = sort @a) on a magical array (such as one tied to Tie::File), sort EXTENDs the array to scalar(@a)+1 elements. This is meant to extend the internal storage size, but it has visible effects when the array is tied to Tie::File. The reported number of elements is different than it should be, and a blank line is appended to the file (in the sort example). See http://www.perlmonks.org/?node_id=710580 for runnable code and some extra details.
Ticket migrated to github as https://github.com/toddr/Tie-File/issues/6