Clownfish::Class - Class.
my $class = Clownfish::Class->fetch_class('Foo::Bar'); my $subclass = Clownfish::Class->singleton('Foo::Bar::Jr', $class);
Classes are first-class objects in Clownfish. Class objects are instances of Clownfish::Class.
my $class = Clownfish::Class->fetch_class($class_name);
Find a registered class. May return undef if the class is not registered.
my $class = Clownfish::Class->singleton( class_name => $class_name, # required parent => $parent, # required );
Return a singleton. If a Class can be found in the registry based on the supplied class name, it will be returned. Otherwise, a new Class will be created using
parent as a base.
parent is undef, an attempt will be made to find it. If the attempt fails, an error will result.
my $obj = $class->make_obj();
Create an empty object of the type defined by the Class: allocate, assign its class and give it an initial refcount of 1. The caller is responsible for initialization.
my $string = $class->get_name();
Return the name of the class.
my $result = $class->get_parent();
Return the parent class, or undef for a root of the class hierarchy.
my $int = $class->get_obj_alloc_size();
Return the number of bytes needed to hold an instance of the class.
Clownfish::Class isa Clownfish::Obj.