agjohnson/csistck

Added signal and on_repair to Role base object

Opened this issue · 0 comments

Allow for chaining of on_repair operations:

use Csistck;
use base 'Csistck::Role';

sub tests {
    shift->add(file(
        '/tmp/foo',
        '/dev/null',
        on_repair => sub { $self->signal }
    ));
}

so that:

role 'test' =>
    my::test->new(
        on_repair => sub { system('/etc/init.d/my restart') }
    );