Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Supply::on for @supply case
  • Loading branch information
lizmat committed Apr 20, 2014
1 parent ae2bc53 commit b1ace93
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/Supply.pm
Expand Up @@ -166,7 +166,18 @@ sub on(&setup) {
unless $tap ~~ Pair {
X::Supply::On::BadSetup.new.throw;
}
add( $_, $tap.value ) for $tap.key;
given $tap.key {
when Positional {
my $todo := $tap.value;
add( $_, $todo ) for .list;
}
when Supply {
add( $_, $tap.value );
}
default {
X::Supply::On::BadSetup.new.throw;
}
}
}
$sub
}
Expand Down

0 comments on commit b1ace93

Please sign in to comment.