assertion
- \As*ser"tion\, n. [L. assertio, fr. asserere.] The act of asserting, or that which is asserted; positive declaration or averment; affirmation; statement asserted; position advanced.
-
<programming>
An expression which, if false, indicates an
error. Assertions are used for debugging by catching
can't happen errors.
-
<programming>
In logic programming, a new fact or rule added to the
database by the program at run time. This is an
extralogical or impure feature of logic programming
languages.
Dictionary.com
Id just like to note that in newer versions of perl (5.10) there will be a much more extensive and powerful assertion/debugging interface than was available in earlier versions. You will be able to use a switch to compile time remove all asssertion code, as well as a number of other features. Carp::Assert will at that time become obsolete, or perhaps a wrapper for cross version compatibility.
BTW: whenever you say something like
sub do_something {
my $with_x=shift or die "Must have an x to do_something with!";
}
you are doing an assertion.
---
demerphq
<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.