> On 8 Mar 2017, at 18:09, jn...@jnthn.net via RT > <perl6-bugs-follo...@perl.org> wrote: > > On Sat, 04 Mar 2017 13:40:22 -0800, c...@zoffix.com wrote: >> On Sat, 04 Mar 2017 13:24:08 -0800, comdog wrote: >>> This is the example from the Tap docs. I expect the output to be >>> "Tap closed", but I get no output using 2017.01: >>> >>> my $s = Supplier.new; >>> my $tap = $s.Supply.tap( >>> -> $v { say "the value is $v" }, >>> done => { say "Supply is done" }, >>> closing => { say "Tap closed" }, >>> quit => -> $ex { say "Supply finished with error $ex" }, >>> ); >>> >>> # later >>> $tap.close; >> >> >> I don't see `closing` param for that routine: >> https://github.com/rakudo/rakudo/blob/b597398/src/core/Supply.pm#L77 >> >> Unless this was missed during pre-Christmas Supplies rework, this may >> be just a doc bug. > > It's a doc bug (and, yes, probably a left-behind from an earlier design). The > correct way is using `on-close`. Example: > > my $t = Supply.interval(0.5).on-close({ say "bye" }).tap(&say); > sleep 3; > $t.close
I wonder whether these “public” functions should handle / warn about unknown named parameters being passed.