Better config logic
[scpubgit/App-SCS.git] / lib / App / SCS / Page.pm
index 7c4350c..28edde4 100644 (file)
@@ -17,16 +17,10 @@ sub _my_path { io->dir($_[0]->_top_dir)->catdir($_[0]->path) }
 with 'App::SCS::Role::PageChildren';
 
 has $_ => (is => 'ro') for qw(
-  title subtitle description keywords plugins html created path
+  title subtitle description keywords  html created path
 );
 
-has plugin_config => (is => 'lazy');
-
-sub _build_plugin_config {
-  my ($self) = @_;
-
-  return $self->plugins;
-}
+has plugin_config => (is => 'rw', 'required' => 1);
 
 sub has_plugin_config { exists $_[0]->plugin_config->{$_[1]} }
 
@@ -41,7 +35,7 @@ sub with_plugin_config {
         : ($name, $config)
     );
   }
-  return $self->with(plugins => pond_write_datum(\@new));
+  return $self->with(plugin_config => \@new);
 }
 
 has _raw_page_plugins => (is => 'lazy', builder => sub {