sub _new_child {
my ($self, $class, $args) = @_;
- $class->new(%{$args||{}}, parent_component => $self);
+ if ($class->isa('App::Clifton::Component')) {
+ $class->new(%{$args||{}}, parent_component => $self);
+ } else {
+ my $new = $class->new(%{$args||{}});
+ $self->add_child($new);
+ $new;
+ }
}
sub _schedule {