in reply to Re: Running tests on modules generated by Module::Starter still in /lib directory
in thread Running tests on modules generated by Module::Starter still in /lib directory

Hi stevieb,

If you are running individual tests (eg: perl t/00-load.t), you need to first do a make install first.

make install should not be necessary to run tests, otherwise you've got a chicken/egg problem; perl -Ilib t/foo.t should be enough. Update: or prove -l t/foo.t.

Regards,
-- Hauke D

Replies are listed 'Best First'.
Re^3: Running tests on modules generated by Module::Starter still in /lib directory
by stevieb (Canon) on Feb 12, 2017 at 18:35 UTC

    You're right. I should have said "you *can* do a make install first". It's just a habit for me to do it this way.

      Hi stevieb,

      I should have said "you *can* do a make install first". It's just a habit for me to do it this way.

      I understand, and on the system of a developer who knows what they're doing this is probably acceptable, but after thinking about it a bit more, I have to say that as general advice, I would strongly recommend against make install for running tests. Who knows how other peoples' systems are set up (not everyone uses perlbrew or local::lib - someone might even get the idea to do sudo make install and muck up their system Perl), and at the very least uninstalling a broken Perl module or reverting it to a previous state is no fun at all. The whole point of tests is that one should run them to find problems before install :-)

      Regards,
      -- Hauke D