laziness, impatience, and hubris | |
PerlMonks |
Checking multiple named assertions (outside Test::More and co)by Dallaylaen (Chaplain) |
on Aug 18, 2013 at 13:30 UTC ( [id://1049906]=perlquestion: print w/replies, xml ) | Need Help?? |
Dallaylaen has asked for the wisdom of the Perl Monks concerning the following question: Suppose I have a set of named conditions which should hold true for each element in a set of data. The conditions may be reasonably complex, like $x->foo < $x->bar * 2; etc. And I'd like to see which of the conditions were not met, for each data element. Now, there is an obvious although a bit verbose way:
I believe the same can be done via dispatch tables. However, I'd like to have a more, um, DWIM-ish way:
I believe this is reasonably simple to write from scratch, but is there a module that does something similar already?
Back to
Seekers of Perl Wisdom
|
|