Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

[major_refactor] Do not add '.' to @INC by default. #136

Closed atoomic closed 4 years ago

atoomic commented 4 years ago

Use sane default values for @INC.

The default behavior should be the sane and recommended one, all the most it matches Perl default values.

This is great that we have an option to add '.' in @INC when needed but this should not be the default.

exodist commented 4 years ago

prove defaults to include '.' in @inc. There are still too many test suits on cpan that depend on this behavior for it to default to 'off'. Removing it by default right now could prevent adoption of yath.

atoomic commented 4 years ago

I understand your point of view, but on the other side having better default value is another argument for adopting yath instead of prove.

All the most if you want the legacy behavior, you have one argument for it.

We have patched several modules among the hundreds we used from CPAN, and do not think that many are still relying on 'dot in inc'.

toddr commented 4 years ago

I understand your point of view, but on the other side having better default value is another argument for adopting yath instead of prove.

This is an interesting argument. If someone is adopting yath anew. Why not encourage good behavior on initial use?

exodist commented 4 years ago

Its a tough balance. The people who really really want to make things better will fix their code. But most programmers are lazy and will snidely report the lack of '.' Breaking their tests as a bug and proudly proclaim they will not use yath until the "bug" is "fixed", then will go on to tell the rest of the world that the perl community is an elitist group that claims they support backwords compatibility while in reality breaking things in a whim.

I wish this were not the case, but experience tells me it is unavoidable. The again being stuck with 'prove' is a fitting consequence for such people, or would be if they did not derive pleasure from having excuses to stay in the stone age.

exodist commented 4 years ago

You know what, screw the haters, lets do things right the first time.

toddr commented 4 years ago

Keeping in mind we're just changing the default. they can always set the env var or pass it on command line.