1 package App::Clifton::Service;
3 use aliased 'App::Clifton::Task';
6 extends 'App::Clifton::Component';
9 my ($self, $do, $args) = @_;
11 my $body_call = $self->_capture_weakself("_body_for_${do}");
12 sub { $body_call->(@_) }
15 if ($self->can("_guard_for_${do}")) {
16 my $guard_call = $self->_capture_weakself("_guard_for_${do}");
17 (guard => sub { $guard_call->(@_) });
24 if (my $dep_call = $self->can("_dependencies_for_${do}")) {
25 $deps = $self->$dep_call($args);
27 $self->_new_child(Task, {
28 name => $do, body => $body, dependencies => $deps, @guard,