Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix up stuff for GLR
  • Loading branch information
laben committed Aug 19, 2015
1 parent e01eed2 commit f578a30
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Panda/Builder.pm
Expand Up @@ -115,7 +115,7 @@ method build($where, :$bone, :@deps) {
@pargs.unshift: "-M" ~ $dep;
}

my ( :$output, :$stdout, :$stderr, :$passed ) := run-and-gather-output($*EXECUTABLE, @pargs);
my ( :$output, :$stdout, :$stderr, :$passed ) = run-and-gather-output($*EXECUTABLE, @pargs);

if $bone {
$bone.build-output = $output;
Expand Down
2 changes: 1 addition & 1 deletion lib/Panda/Installer.pm
Expand Up @@ -9,7 +9,7 @@ has $.destdir = self.default-destdir();
method sort-lib-contents(@lib) {
my @generated = @lib.grep({ $_ ~~ / \. <{compsuffix}> $/});
my @rest = @lib.grep({ $_ !~~ / \. <{compsuffix}> $/});
return @rest, @generated;
return flat @rest, @generated;
}

# default install location
Expand Down
4 changes: 2 additions & 2 deletions lib/Panda/Tester.pm
Expand Up @@ -21,7 +21,7 @@ method test($where, :$bone, :$prove-command = $*DISTRO.name eq 'mswin32' ?? 'pro
for @deps -> $lib {
$libs ~= ' -M' ~ $lib;
}
my ( :$output, :$stdout, :$stderr, :$passed ) := run-and-gather-output($prove-command, '-e', "$*EXECUTABLE $libs -Ilib", '-r', 't/');
my ( :$output, :$stdout, :$stderr, :$passed ) = run-and-gather-output($prove-command, '-e', "$*EXECUTABLE $libs -Ilib", '-r', 't/');

This comment has been minimized.

Copy link
@niner

niner Aug 25, 2015

run-and-gather-output returns a list of Pairs now that you List-assign to a list of Pairs.
Previously it didn't matter in which order run-and-gather-output returned the pairs, because we bound a Capture to the list of Pairs and it did the right thing. We lost this nice ability. I'd say we should not pretend that it still works that way and use a simple list assignment instead:
my ($output, $stdout, $stderr, $passed) = run-and-gather-output(...);
and a plain return $output, $stdtout, $stderr, $passed in run-and-gather-output.
That way it's clear that no magic is happening and we don't need the .value in line 33.


if $bone {
$bone.test-output = $output;
Expand All @@ -30,7 +30,7 @@ method test($where, :$bone, :$prove-command = $*DISTRO.name eq 'mswin32' ?? 'pro
$bone.test-passed = $passed;
}

fail "Tests failed" unless $passed;
fail "Tests failed" unless $passed.value;
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion t/installer.t
Expand Up @@ -27,7 +27,7 @@ my @lib = 'foo.pm', 'foo.' ~ compsuffix, 'bam.' ~ compsuffix,
'bam.pm', 'blaz.pm', 'blaz.' ~ compsuffix, 'shazam.js';
my @order = Panda::Installer.sort-lib-contents(@lib);
is-deeply @order,
[<foo.pm bam.pm blaz.pm shazam.js>,
[flat <foo.pm bam.pm blaz.pm shazam.js>,
'foo.' ~ compsuffix, 'bam.' ~ compsuffix, 'blaz.' ~ compsuffix],
"{compsuffix}s will get installed after rest of the things";

Expand Down

0 comments on commit f578a30

Please sign in to comment.