On Tue, Feb 20, 2001 at 10:48:18PM -0500, barries wrote:
> Might also be nice to have a member like assert_valid() that could do
> runtime self-checks, perhaps, and SelfTest could stub it out as sub
> assert_valid() {} if need be.  Stray thought that, though I've found
> self-testing objects at runtime to be worth the slowdown in many cases.

See Carp::Assert for an example of how to do exactly just that (and
the problems involved).

-- 
Michael G Schwern   <[EMAIL PROTECTED]>   http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One

Reply via email to