rjbs/Dist-Zilla

[AuthorDeps] blessed $root in @INC causes silent failure to load local author includes

Opened this issue · 0 comments

given a local package inc/Testing.pm with simple contents:

package inc::Testing;

1;

and the following entry in dist.ini

[=inc::Testing]

the command dzil authordeps --missing will still emit inc::Testing despite the attempt to put the provided $root onto @INC. The command invocation isn't passing in a string but rather a Dist::Zilla::Path object. Blessed objects on @INC must provided an INC method (see: perldoc -f require) to satisfy the require hook API.

By placing an unprepared object onto @INC, the line in

local @INC = @INC; push @INC, $root;
# This will die if module is missing
Module::Runtime::require_module($m);
actuially throws the following error:

Can't locate object method "INC" via package "Dist::Zilla::Path"

due to the fact that $root isn't stringified. Adding quotes around "$root" would solve the issue.