Skip to content

Commit

Permalink
Make handle_distdir not use @argv directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Dec 12, 2014
1 parent 7b75889 commit 26cc216
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Inline/Module.pm
Expand Up @@ -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]$/) {
Expand Down Expand Up @@ -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 '--') {
Expand Down
8 changes: 8 additions & 0 deletions test/devel/test-acme-math-xs.t
Expand Up @@ -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.