in reply to Parameter Asserts - How do you use them?
assertion
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.
|
|---|