sub new_not_ok { my ($class,$args) = @_; my $error; eval { $class->new( $args ); 1; } or $error = 1; ok !$error, 'new failed'; }