[VPM] Assertions

Peter Scott Peter at PSDT.com
Fri Jun 6 16:42:00 CDT 2003


At 02:34 PM 6/6/2003 -0700, abez wrote:
>Has any one used a good assertions package which allows for disabling of
>assertions in perl s.t. the assertions will not be run. or choose what 
>level of
>assertions to have?
>
>I'm thinking of eiffel assertions (pre, post, assert) but I want to be able to
>disable them for performance reasons.

Let's see, I read about those in this great book, oh, what's it 
called... ah, "Perl Debugged" :-)

Try Carp::Assert.  For more O-O variation like you describe, try 
Class::Contract.  It claims it can be selectively disabled.

(Page 96, in case you were wondering... :-)


-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/




More information about the Victoria-pm mailing list