- or download this
use Class::Trait 'LifeGuard';
use Class::Trait 'Dog' => { explicit => 'swim' };
- or download this
use Class::Trait (
'Trait::LifeGuard',
'Trait::Dog' => { explicit => 'swim' }
);
- or download this
Class::Trait->promise('doggie_treat');
Class::Trait->assemble; # this flattens the traits into this class
...
sub AUTOLOAD {
# we'll make &doggie_treat, if needed
}
- or download this
*{"${using_pkg}::$trait_method_name"} = \&{"${trait_pkg}::$trait_metho
+d_name"}
- or download this
package Person;
...
}
1;
- or download this
package Trait::LifeGuard;
...
}
1;