my @without_plugins = @{$opts{without_plugins} || []};
# invoke mx-run
- my @cmdline = ($^X, @perl_flags, $FindBin::Bin.'/'.$FindBin::Script);
+ my @cmdline = (
+ $^X,
+ (map { "-I$_" } @INC),
+ @perl_flags,
+ $FindBin::Bin.'/'.$FindBin::Script,
+ );
push @cmdline, map { "-I$_" } $self->include_paths;
push @cmdline, map { "-M$_" } $self->modules;
local $^X = '/path/to/perl';
local $FindBin::Bin = '/path/to';
local $FindBin::Script = 'mx-run';
+local @INC = ('foobar');
my @cmdline = $args->guess_cmdline(
perl_flags => ['--X--'],
without_plugins => ['Plugout'],
);
is join(' ', @cmdline),
- "/path/to/perl --X-- /path/to/mx-run -Ilib -MFoo -MBar +Plugin --with-args -- MyApp --with args",
+ "/path/to/perl -Ifoobar --X-- /path/to/mx-run -Ilib -MFoo -MBar +Plugin --with-args -- MyApp --with args",
'cmdline reverses reasonably';