Class::TraitClass::Trait is a Perl implementation of Traits in Perl. | |
Download |
Class::Trait Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Stevan Little
- Publisher web site:
- http://search.cpan.org/~stevan/
Class::Trait Tags
Class::Trait Description
Class::Trait is a Perl implementation of Traits in Perl. Class::Trait is a Perl implementation of Traits in Perl.SYNOPSIS # to turn on debugging (do this before # any other traits are loaded) use Class::Trait 'debug'; # nothing happens, but the module is loaded use Class::Trait; # loads these two traits and flatten them # into the current package use Class::Trait qw(TPrintable TComparable); # loading a trait and performing some # trait operations (alias, exclude) first use Class::Trait ( 'TPrintable' => { alias => { "stringValue" => "strVal" }, exclude => "stringValue", }, ); # loading two traits and performing # a trait operation (exclude) on one # module to avoid method conflicts use Class::Trait 'TComparable' => { # exclude the basic equality method # from TComparable and use the ones # in TEquality instead. exclude => }, 'TEquality' # Requirements: · Perl
Class::Trait Related Software