PerlPowerTools icon indicating copy to clipboard operation
PerlPowerTools copied to clipboard

col: buffering code broken

Open mknos opened this issue 1 year ago • 1 comments

  • I observed strange output from col when the input file was large
  • Finally I discovered the issue is related to code that runs when the buffer fills up
  • The input loop adds lines to a buffer which are printed in a subsequent loop; however, the buffer code triggers early printing within the input loop
  • I could reproduce error earlier by setting a smaller buffer size with -l: "perl col -l 5 ching"
  • The pod manual says -l buffers at least n lines of input
  • I propose ignoring -l and buffering the whole file, this at least doesn't result in a runtime error
  • Correct buffer management code could be investigated later

mknos avatar Mar 05 '24 08:03 mknos