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:

use Runtime::Test::Module; use My::Module; my $foo = My::Module->bloated_untestable_method; complain_if_the_following_does_not_hold { like $foo->{bar}, qr/f?o?r?m?a?t/; can_ok $foo->{baz}, qw(do_this do_that frobnicate); };

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...


In reply to Naming a block function to check a group of runtime assertions by Dallaylaen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.