Permalink
Browse files

Make handle_distdir not use @ARGV directly

  • Loading branch information...
1 parent 7b75889 commit 26cc216e3cd6f9fa7ae14bfdffc424099351a061 @ingydotnet committed Dec 12, 2014
Showing with 11 additions and 4 deletions.
  1. +3 −4 lib/Inline/Module.pm
  2. +8 −0 test/devel/test-acme-math-xs.t
View
@@ -51,9 +51,9 @@ sub import {
if $cmd eq 'makestub';
return $class->handle_autostub(@_)
if $cmd eq 'autostub';
- return $class->handle_distdir(@_)
+ return $class->handle_distdir(@ARGV)
if $cmd eq 'distdir';
- return $class->handle_fixblib(@_)
+ return $class->handle_fixblib()
if $cmd eq 'fixblib';
if ($cmd =~ /^v[0-9]$/) {
@@ -267,8 +267,7 @@ sub handle_autostub {
}
sub handle_distdir {
- my ($class) = @_;
- my ($distdir, @args) = @ARGV;
+ my ($class, $distdir, @args) = @_;
my (@inlined_modules, @included_modules);
while (@args and ($_ = shift(@args)) ne '--') {
@@ -28,5 +28,13 @@ cd acme-math-xs-pm
ok "`[ -d blib ]`" "The 'blib' dir exists after 'make'"
}
+{
+ make distdir
+ dd=( Alt-Acme-Math-XS-EUMM-* )
+ ok "`[ -e "$dd/MANIFEST" ]`" "$dd/MANIFEST exists"
+ ok "`[ -e "$dd/inc/Acme/Math/XS/Inline.pm" ]`" \
+ "$dd/inc/Acme/Math/XS/Inline.pm exists"
+}
+
done_testing;
teardown

0 comments on commit 26cc216

Please sign in to comment.