The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
package Greeting;
use Moo;
has hello => ( is => 'ro' );
has who => ( is => 'ro' );
has default => ( is => 'ro' );
sub greet {
    my ( $self, @who ) = @_;
    @who = $self->default if !@who;
    return join ". ", map { sprintf "%s, %s", $self->hello, $_ } @who;
}
1;