Test-Exception - Re: Test::Exception and XS code

Posted on Mon Aug 15 22:37:48 2005 by adrianh in response to 893 (See the whole thread of 3)
Re: Test::Exception and XS code

As Yitzchak Scott-Thoennes correctly points out this is nothing to do with XS, but with Test::Exception not being used at compile time. You can get around this by either wrapping the conditional loading up in a BEGIN block:

BEGIN { eval "use Test::Exception"; plan skip_all => "Test::Exception needed" if $@; }

or by calling the Test::Exception functions without prototypes. I've added a note to make this clearer in the documentation.

Write a response