Subject: | ENV flag documented wrong |
Documentation says the ENV control variable for `Test::Modern -internet` is "NO_NETWORK_TESTS"
https://metacpan.org/pod/Test::Modern#NO_NETWORK_TESTS
However, use as documented results in network-based tests operating anyway. ( see attached )
Inspecting the file suggests the ENV variable has the last token of "TESTING" not "TESTS"
And subsequently using NO_NETWORK_TESTING instead resolves this problem.
As to whether the implementation or documentation is incorrect ... that's your choice =)
Comparing the diff of the version it was introduced in, shows its also "TESTS" in the changelog.
Subject: | no_internet.pl |
#!/usr/bin/env perl
BEGIN {
$ENV{NO_NETWORK_TESTS} = 1;
};
use Test::Modern -internet;
fail("This should not execute");
done_testing;