in reply to Re^2: CPAN module unit test issues: OS line endings (how?)
in thread CPAN module unit test issues: OS line endings
Why are you using Tie::File? I can't recommend that module as it is a fine example of getting a slight bit of superficial simplicity at the expense of way too much hidden complexity. Such things too often end up biting you before you are done (as happened here).
I only skimmed a bit of the code. The only actual using of a tied array that I noticed was:
@{$subs{$file}{TIE_file}} = @TIE_file;
Which seems to provide absolutely zero benefit from the use of that module. That does nothing more than what a simple open and then @{...} = <$fh>; would do (except it is less efficient and leverages way more hidden complexity which leads to fragile surprises like not dealing well with line endings).
That code also slurps the entire file contents into memory. This limits the size of problems that can be effectively handled by your module.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: CPAN module unit test issues: OS line endings (Tie::File)
by BrowserUk (Patriarch) on Sep 18, 2015 at 03:41 UTC | |
|
Re^4: CPAN module unit test issues: OS line endings (Tie::File)
by stevieb (Canon) on Sep 18, 2015 at 12:55 UTC |