package Person; use Class::Trait 'LifeGuard'; use Class::Trait 'Dog' => { explicit => 'swim' }; Class::Trait->promise('doggie_treat'); Class::Trait->assemble; # this flattens the traits into this class sub AUTOLOAD { # we'll make &doggie_treat, if needed } 1;