perl-Test-Spec icon indicating copy to clipboard operation
perl-Test-Spec copied to clipboard

Read content file outside of eval block

Open atoomic opened this issue 7 years ago • 0 comments

spec_helper is sneaking in some content from a file to a namespace.

But it's not required to read the file inside the quoted eval.

Reading it earlier provides the advantage of building the OP tree for it, so we can use Test::Mockfile without impacting this test module.

It also reduces the length of the string eval and optimize it and make it easier to maintain at the same time.

atoomic avatar Oct 30 '18 18:10 atoomic