in reply to Data Object Verification Modules?
Data::Processor is pretty close to what you describe. Though I think you might find Types::Standard does what you want in a slightly different way.
use Types::Standard -types; my $state = StrMatch[qr/^[A-Z]{2}$/]; my $token = Str->where(sub { $database->check_valid_token($_) }); my $thing = Dict[token => $token, state => ArrayRef[$state]]; if ($thing->check($data)) { ...; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data Object Verification Modules?
by mwb613 (Beadle) on Jun 06, 2018 at 23:20 UTC |