note
Arunbear
<p>
I'm not convinced that testing of a final new line adds any value, especially given that your code looks agnostic to its presence/absence (from both the code writer and code users point of view).
</p>
<p>
Putting the tests in subroutines (one for each group of tests) would make the code more [http://schwern.dreamhosters.com/talks/Skimmable%20Code%20-%20YAPC-NA-2008.pdf|skimmable], and save you from needing to use arcane names like <c>($n_fh, $n_file)</c> i.e. having that in a sub means they would only exist in one place and can have more 'normal' names like in the encoding test case.
</p>
<p>
As for the code itself, 'fancy_open' is not an accurate name because it is doing reading and closing as well as opening. In Perl parlance, this is called "slurping", so I'd suggest "fancy_slurp".
</p>
<p>
Slurping into an array is fine for small files, but will become inefficient as the input files get larger, so you may want to consider providing an [https://hop.perl.plover.com/book/pdf/04Iterators.pdf|iterator] as well.
</p>
<p>
Why keep the POD in a separate file? POD is designed to be embeddable in the module and e.g. to veiw it you could just do:
<code>
perldoc My::Module
</code>
</p>
11122132
11122132