$check->newrule( -name => 'myname', #required, if no element specified, takes this. -element => ['one','two'], #Takes arrayref or string -required => 0, #required has no effect unless the data is omitted altogether. -tests => { -def => ['array','of','test','names'], -custom => [ sub($$) : modifies { #code }, sub(@) { #code }, ], } ); #Or $check->newrule( -name => 'myname', #required, if no element specified, takes this. -element => ['one','two'], #Takes arrayref or string -required => 0, #required has no effect unless the data is omitted altogether. -tests => { -def => ['array','of','test','names'], -custom => [ ctest( -args => 2, -mod => 1, -code => sub { #code }, ), ctest( -args => '*', -code => sub { #code }, ), ], } );