package Test::MyMore; use strict; use warnings; use Test::More; use base qw(Test::More); our @EXPORT=(@Test::More::EXPORT, qw(cmp_not_ok)); sub cmp_not_ok($$$;$) { my ($got,$op,$exp,$name)=@_; my $tb = Test::More->builder; my $error; my $ok; { local( $@, $!, $SIG{__DIE__} ); $ok=!eval "\$got $op \$exp"; $error=$@; } if($error) { $ok = $tb->ok( $ok, $name ); $tb->diag(" $error\n"); } else { $ok = $tb->ok( $ok, $name ); } return $ok; } 1;