From: Matt S Trout Date: Tue, 18 Mar 2014 13:02:12 +0000 (+0000) Subject: include lib/ in @INC for packlists_containing require() calls X-Git-Tag: v0.010001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4ff64e8f027ec8fb50bdde94aaeec7454c5c390;p=p5sagit%2FApp-FatPacker.git include lib/ in @INC for packlists_containing require() calls --- diff --git a/Changes b/Changes index a993455..a793b9d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for App-FatPacker + - include 'lib' in @INC for packlists_containing's require() calls + 0.010000 - 2013-11-27 - use object for @INC hook instead of subref, including a 'files' method to return a list of files provided diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 6924eb2..1d0bc03 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -143,8 +143,11 @@ sub script_command_packlists_for { sub packlists_containing { my ($self, $targets) = @_; my @targets = @$targets; - foreach my $t (@targets) { - require $t; + { + local @INC = ('lib', @INC); + foreach my $t (@targets) { + require $t; + } } my @search = grep -d $_, map catdir($_, 'auto'), @INC; my %pack_rev;