http://qs321.pair.com?node_id=635843


in reply to Testing a XS module

You're not using Test::More's tests, even though when you use it, you tell it you will (via tests => 4). I would be inclined to rewrite your tests as follows:

use Test::More tests => 4; BEGIN {use_ok('Mytest')} is( Mytest::is_even(0), 1, 'is_even says 0 is even' ); is( Mytest::is_even(1), 0, 'is_even says 1 is not even' ); is( Mytest::is_even(2), 1, 'is_even says 2 is even' );

--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)