Skip to content

Commit

Permalink
Make sure we don't autostub in distdir
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Dec 12, 2014
1 parent bbdb516 commit 7b75889
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/Inline/Module.pm
Expand Up @@ -102,7 +102,7 @@ sub importer {
CLEAN_AFTER_BUILD => 0,
);
shift(@_);
DEBUG_ON && DEBUG "Inline::Module proxy to Inline::%s", @_;
DEBUG_ON && DEBUG "Inline::Module::importer proxy to Inline::%s", @_;
Inline->import_heavy(@_);
};
}
Expand Down Expand Up @@ -211,10 +211,14 @@ sub handle_makestub {
sub handle_autostub {
my ($class, @args) = @_;

# Don't mess with Perl tools, while using PERL5OPT and autostub
# Don't mess with Perl tools, while using PERL5OPT and autostub:
return unless
$0 eq '-e' or
defined $ENV{_} and $ENV{_} =~ m!/prove[^/]*$!;
# Don't autostub in the distdir:
return if -e './inc/Inline/Module.pm';

DEBUG_ON && DEBUG "Inline::Module::autostub(@_)";

require lib;
lib->import('lib');
Expand Down
4 changes: 2 additions & 2 deletions note/ToDo
@@ -1,7 +1,5 @@
== To Do Next

- Update MANIFEST file with inc/ stuff

- Add new plugin sections to the tutorial

- Refactor Dist-Zilla-Plugin-InlineModule to use postamble
Expand Down Expand Up @@ -50,3 +48,5 @@
> make
Can't opendir(blib/lib/auto/Alt): No such file or directory
at inc/Inline/Module.pm line 227.
+ Update MANIFEST file with inc/ stuff

0 comments on commit 7b75889

Please sign in to comment.