File-Bidirectional reviews

RSS | Module Info

File-Bidirectional (0.01) ****

At the time of this review, I find two modules for reading a file backwards: File::Bidirectional (FBidi) and File::ReadBackwards (FRB).

Both modules have roughly the same footprint and minimal dependencies. Both provide OO as well as tie interface. Both respect the $/ setting.

FBidi pro's:
- has the unique feature of reading backward/forward and switch direction in the middle;

FBidi con's:
- FBidi is 15-20% slower than FBidi when reading backwards;
- reading forward is just as slow as backward, so if you only need to read forward, obviously there's no need to use this module;

FBidi's POD contains information on benchmarks (it's roughly an order of magnitude slower than raw Perl's open+read/diamond operator, still the case in 2014). While FRB's POD contains information on how the thing works behind the scenes.

In summary, both modules are roughly the same. I'd prefer FRB unless in the rarer cases where I need bidirectional reading.