Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How do track down underlying reason for smoke test failure

by nysus (Parson)
on Sep 12, 2019 at 11:16 UTC ( [id://11106057]=note: print w/replies, xml ) Need Help??


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

Nice find. Thanks. That led me to see that the failed tester has PERL_USE_UNSAFE_INC = 0 in the reports. In one of the reports that passed, it is set to "1".

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 the non-existence of '.' in @INC causes the test to fail.

$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

Replies are listed 'Best First'.
Re^3: How do track down underlying reason for smoke test failure
by bliako (Monsignor) on Sep 12, 2019 at 11:27 UTC
    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

      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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11106057]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found