method instantiate(Str $type) { # _getclass will return something like 'Utils::File::Something' my $class = $self->_getclass($type); eval("use $class"); my $obj = $class->new( {'id' => $type} ); if ( $obj->isa('Utils::File::Section') ) { return $obj; } else { die("The $class class is not a type of Section!"); } }