NAME

Kvasir::TypeDecl - Helper class for maintaining types used in engines

SYNOPSIS

use Kvasir::TypeDecl;

# Will create a Foo::Bar instance by calling new in Foo::Bar
my $type1 = Kvasir::TypeDecl->new("Foo::Bar");
my $obj1 = $type1->instantiate();

# Will keep around an already existing reference to an object
# and return that when instantiating.
my $existing_obj = get_some_object();
my $type2 = Kvasir::TypeDecl->new($existing_obj);
my $obj2 = $type2->instantiate();

INTERFACE

CLASS METHODS

new ( TARGET [, ARGS ... ])

Wraps a type. If TARGET is an object it will be returned when instantiating the type. If not new will be called on TARGET with any ARGS passed as a list.

INSTANCE METHODS

instantiate

Instantiates the type. See new above for semantics.