Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create helper sub CLONE-LIST-DECONTAINERIZED
  • Loading branch information
lizmat committed Jan 25, 2015
1 parent 94501a6 commit 8d7542d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/core/control.pm
Expand Up @@ -232,13 +232,9 @@ my class Proc::Status { ... }

sub run(*@args ($, *@)) {
my $status = Proc::Status.new( :exit(255) );
my Mu $args-without := nqp::list();
for @args.eager {
nqp::push($args-without, nqp::decont(~$_));
}
try {
$status.status(nqp::p6box_i(nqp::spawn(
$args-without,
CLONE-LIST-DECONTAINERIZED(@args),
$*CWD.Str,
CLONE-HASH-DECONTAINERIZED(%*ENV),
)));
Expand Down Expand Up @@ -306,4 +302,10 @@ sub CLONE-HASH-DECONTAINERIZED(\hash) {
$hash-without;
}

sub CLONE-LIST-DECONTAINERIZED(\list) {
my Mu $list-without := nqp::list();
nqp::push($list-without, nqp::decont(~$_)) for list.eager;
$list-without;
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 8d7542d

Please sign in to comment.