augment class Block {

=begin item arity

=end item
    method arity() {
        my $arity = 0;
        my @params = self.signature.params;
        for @params -> $p {
            $arity++ unless $p.slurpy || $p.optional;
        }
        $arity
    }

=begin item count

=end item
    method count() {
        my $count = 0;
        my @params = self.signature.params;
        for @params -> $p {
            $count++ unless $p.slurpy;
        }
        $count
    }

    method ACCEPTS($topic) {
        self.count == 0 ?? self.() !! self.($topic);
    }

}

# vim: ft=perl6

augment class Block {

=begin item arity

=end item
    method arity() {
        my $arity = 0;
        my @params = self.signature.params;
        for @params -> $p {
            $arity++ unless $p.slurpy || $p.optional;
        }
        $arity
    }

=begin item count

=end item
    method count() {
        my $count = 0;
        my @params = self.signature.params;
        for @params -> $p {
            $count++ unless $p.slurpy;
        }
        $count
    }

    method ACCEPTS(Mu $topic) {
        self.count == 0 ?? self.() !! self.($topic);
    }

}

# vim: ft=perl6

Tweak to a signature that we got away with before due to method signature generation bug.
Tweak to a signature that we got away with before due to method signature generation bug.
