sub load_plugin {
my ($self, $name, $config) = @_;
+ my $class = ($name =~ s/^\+// ? $name : "App::SCS::Plugin::${name}");
push(
@{$self->plugins},
- use_module("App::SCS::Plugin::${name}")->new(
+ use_module($class)->new(
app => $self,
config => $config
)
use Data::Pond qw(pond_read_datum pond_write_datum);
use List::Util qw(reduce);
use Module::Runtime qw(use_module);
+use HTML::Zoom;
use Moo;
has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set);
} HTML::Zoom->from_html($self->html), @{$self->_page_plugins};
}
+sub body {
+ my ($self) = @_;
+ HTML::Zoom->from_html($self->html)
+ ->collect(body => { into => \my @ev })
+ ->run;
+ HTML::Zoom->from_events(\@ev)->to_html;
+}
+
no Moo;
sub with {