Permalink
Browse files

Tame autostub a bit

It was messing with Perl tools like `git add -p`.
  • Loading branch information...
1 parent 178f8ad commit 4e970789c0a10d66771d4221067c8286079553ec @ingydotnet committed Dec 12, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Inline/Module.pm
View
@@ -7,7 +7,7 @@ use File::Path();
use File::Find();
use Carp 'croak';
- # use XXX;
+# use XXX;
my $inline_build_path = './blib/Inline';
@@ -211,6 +211,11 @@ sub handle_makestub {
sub handle_autostub {
my ($class, @args) = @_;
+ # Don't mess with Perl tools, while using PERL5OPT and autostub
+ return unless
+ $0 eq '-e' or
+ defined $ENV{_} and $ENV{_} =~ m!/prove[^/]*$!;
+
require lib;
lib->import('lib');

0 comments on commit 4e97078

Please sign in to comment.