If you are concerned about zero or near zero speed impact when not
in test mode. Check out the code for Carp::Assert.


On Mon, Mar 18, 2002 at 11:41:03AM -0500, Dan McCormick wrote:
> Howdy,
> 
> This is more of a Perl question, but since it's POE-related...
> 
> How do you conditionally turn on something like ASSERT_STATES?
> 
> I'd like to do something like...
> 
> if ($TEST_MODE) {
>   sub POE::Kernel::ASSERT_STATES () { 1 } 
> }
> use POE;
> 
> .... but of course the subroutine gets compiled regardless of $TEST_MODE.
> 
> Is there a trick around this?
> 
> Thanks,
> Dan

Reply via email to