develooper Front page | perl.module-authors | Postings from September 2017

Is it ok taking the Refute::* namespace?

Thread Next
Konstantin S. Uvarin
September 6, 2017 11:24
Is it ok taking the Refute::* namespace?
Message ID:

  I would like to release a Refute or perhaps Refute::Contract module to
CPAN. I used to name it Test::Refute or Test::Contract, but it's not
actually a test module anymore.

  A refute( $reason, $comment ) is an inverted assertion: if $reason is a
false value, it is assumed to pass; otherwise it fails, and the exact
reason is already there!

  A $contract object represents a set of refutations and possibly other
things (execution plan, sidenotes, subcontracts, etc). A contract is either
fulfilled (refutations match plan), or failed.

  One can view a contract as a Test::More-based script encapsulated for
being executed and queried inside production code.

  This setup allows for very easy building of arbitrarily complex
assertions, err, refutations. For instance, is_deeply() can be recreated by
simply passing a recursive diff of two structures to refute().

  Now to the subject. Would it be fine to take up a whole top-level
namespace, or should I stick to a humbler naming scheme like
Assert::Refute? If I do take a namespace, what should I do aside from being
concerned and posting here?

  Thank you,

Konstantin S. Uvarin
skype: kuvarin

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About