in reply to Re^2: How do track down underlying reason for smoke test failure
in thread How do track down underlying reason for smoke test failure

I'm not completely clear why it fails, though. My test file has use lib 't/TestMods'; in it. So I would think the File::Collector would be able to find my module in there. I don't quite follow how existence of '.' in @INC plays into this.

If my theory is right, loading Test::Classifier fails under certain INC. Because requiring these:

use t::TestMods::Test::Processor; use t::TestMods::Test::TestObj;

in t/TestMods/Test/Classifier.pm, requires an INC of ./

bw, bliako

edit: changed pre to blockquote

Replies are listed 'Best First'.
Re^4: How do track down underlying reason for smoke test failure
by nysus (Parson) on Sep 12, 2019 at 11:49 UTC
Re^4: How do track down underlying reason for smoke test failure
by nysus (Parson) on Sep 12, 2019 at 11:30 UTC

    OK, so I guess a simple fix would be to just throw a use lib '.'; into Test::Classifier.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      OK, so I guess a simple fix would be to just throw a use lib '.'; into Test::Classifier.

      Or, I think:
      use lib './t/TestMods';
      Cheers,
      Rob

      Yes I guess. Although use lib 't/TestMods'; (and changing all use t::TestMods::XXX; to use XXX; maybe more in the spirit of removing . from INC for security purposes ... (* I am hardly an expert, please get 2nd opinion)

        "In the spirit of removing ." is to remove all path references that depend on the current directory, which is dynamic and depends what other code has executed inbetween.
        use FindBin; use lib "$FindBin::Bin/TestMods"