Class::Dynamic - Rudimentary support for coderefs in @ISA


NAME

Class::Dynamic - Rudimentary support for coderefs in @ISA


SYNOPSIS

  package Blargh;
  use Class::Dynamic;
  our @ISA = ("Foo", sub { rand < 0.5 ? "Bar" : "Baz" } );


DESCRIPTION

This module allows you to insert coderefs into a class's @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...


BUGS

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.


LICENSE

GPL & AL.


AUTHOR

Simon Cozens, simon@cpan.org

 Class::Dynamic - Rudimentary support for coderefs in @ISA