summaryrefslogtreecommitdiff
path: root/dev-perl/Dist-Zilla/files/Dist-Zilla-6.015-authordeps-missing.patch
blob: c9e25ebff619cabfc75f4ba239415cb18feeb089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 21a92b08d30cd4758fefe1706eb96af30082cb7b Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentnl@gentoo.org>
Date: Sat, 8 Aug 2020 05:25:21 +1200
Subject: Fix INC traversal breakage with non-string objects in INC

As `$root` is a Path object, and because there are defined mechanisms
for handling objects in `@INC` traversal, this object being added to
`@INC` can cause panics when the perl interpreter tries to call a method
that doesn't exist, violating the API.

And this in turn makes various authordeps appear missing when they're
present, due to suppression of the error occurring from the above.

Forcing stringification of the path object mitigates this issue.

Bug: https://github.com/rjbs/Dist-Zilla/issues/660
---
 lib/Dist/Zilla/Util/AuthorDeps.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Dist/Zilla/Util/AuthorDeps.pm b/lib/Dist/Zilla/Util/AuthorDeps.pm
index cbca1c7..603d67b 100644
--- a/lib/Dist/Zilla/Util/AuthorDeps.pm
+++ b/lib/Dist/Zilla/Util/AuthorDeps.pm
@@ -113,7 +113,7 @@ sub extract_author_deps {
         : do {
             my $m = $_;
             ! eval {
-              local @INC = @INC; push @INC, $root;
+              local @INC = @INC; push @INC, "$root";
               # This will die if module is missing
               Module::Runtime::require_module($m);
               my $v = $vermap->{$m};
-- 
2.28.0