|XP is just a number|
Naming a block function to check a group of runtime assertionsby Dallaylaen (Hermit)
|on Dec 24, 2017 at 20:48 UTC||Need Help??|
Dallaylaen has asked for the
wisdom of the Perl Monks concerning the following question:
Hello dear esteemed monks,
Let's say I have a block function that checks several conditions and fails loudly if any of those are not met ("loudly" means carp/croak/some callback depending on per-caller settings). The names of conditions themselves follow the conventions of Test::More. This is done so to allow for moving them to a test script after good enough testing environment is available.
So the usage is as follows:
My question is: how should such a function be named?
The module already has refute for checking a single condition (stressing the fact that we only can disprove things by testing). It also has a contract block function to save a set of conditions for later execution.
What I could come up with so far:
Also if there is a CPAN module for blocks of multiple runtime assertions I would love to see a link. What I've seen so far is either Test::* stuff, one-at-a-time assertions, or full-blown design by contract frameworks. But maybe I just got my keywords wrong...