package Security::Guard { use Role::Tiny; requires "sound"; sub raise_alarm { my $self = shift; $self->sound; } } package Guard::Dog { use base "Pet::Dog"; use Role::Tiny::With; with "Security::Guard"; }