switch to using Moo's constructor rather than hacking configure to avoid upsetting...
[scpubgit/Clifton.git] / lib / App / Clifton / Component.pm
index 2a51217..e6d592c 100644 (file)
@@ -9,7 +9,10 @@ sub _debug_self {
 use Log::Contextual qw(:log);
 use Moo;
 
-extends 'IO::Async::Notifier';
+extends 'Moo::Object', 'IO::Async::Notifier';
+
+# we're replacing Notifier's constructor so need to set up its default
+has children => (is => 'bare', default => sub { [] });
 
 sub BUILD {
   my ($self, $args) = @_;
@@ -21,12 +24,6 @@ sub BUILD {
   }
 }
 
-sub configure {
-  # If we called the superclass method, any ->new params that were populated
-  # into attributes would cause a croak. While the loss of error checking is
-  # annoying I've got other things to fix right now.
-}
-
 sub _new_child {
   my ($self, $class, $args) = @_;
   $class->new(%{$args||{}}, parent_component => $self);