in reply to Re^3: Requring minimum perl version in a cpanfile ( inc::Module::Install )
in thread Requring minimum perl version in a cpanfile

I think if you want to

use inc::Module::Install;

You will need to push '.' onto @INC starting with Perl 5.26.

So likely the belt-and-suspenders approach would be

use lib '.'; use inc::Module::Install;

Replies are listed 'Best First'.
Re^5: Requring minimum perl version in a cpanfile ( use lib '.'; )
by Anonymous Monk on Jan 20, 2017 at 07:59 UTC

    No, no I don't think so, that would be hella stupid :)

      I interpret this discussion towards the idea of not supporting . in @INC in the future for somewhat plausible security reasons.

      Note that this would not prevent manually adding dot to @INC.

      Update: Also see this bug ticket, which I think was the original report.

        Heheh, ok this

        But I have another proposal. Instead of modifying CPAN clients, builders and App::Prove to inject '.' into @INC, what about instead injecting in @INC the *absolute path of the root of the distribution* being configured/built/tested/installed? I think that this would considerably reduce the number of side effects and it would help to really isolate runtime code that relies on '.' being in @INC (assuming that code is covered by a testsuite).