Class::Dynamic - Rudimentary support for coderefs in @ISA
package Blargh; use Class::Dynamic; our @ISA = ("Foo", sub { rand < 0.5 ? "Bar" : "Baz" } );
This module allows you to insert coderefs into a class's @ISA.
@ISA
The coderef is called with the object and method name as parameters, so that it can determine which class is appropriate. The coderef should return a string representing the class to delegate the method to.
Suggested uses: mixins, random dispatch, creating classes at runtime...
Almost certainly. This is almost throw-away code, although it does do something vaguely useful, so I'm not really inclined to answer bug reports without patches.
GPL & AL.
Simon Cozens, simon@cpan.org
simon@cpan.org
To install Class::Dynamic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Dynamic
CPAN shell
perl -MCPAN -e shell install Class::Dynamic
For more information on module installation, please visit the detailed CPAN module installation guide.