From: Nicholas Clark Date: Fri, 9 Oct 2009 11:44:10 +0000 (+0200) Subject: In opt(), use is(..., undef) rather than ok(!defined ...) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d899d640007cb6cbc676620da4d0aba415fdff6;p=p5sagit%2Fp5-mst-13.2.git In opt(), use is(..., undef) rather than ok(!defined ...) --- diff --git a/t/comp/uproto.t b/t/comp/uproto.t index 9b908eb..265854f 100644 --- a/t/comp/uproto.t +++ b/t/comp/uproto.t @@ -65,7 +65,11 @@ like( $@, qr/Malformed prototype for main::wrong1/, 'wrong1' ); eval q{ sub wrong2 ($__); wrong2(1,2) }; like( $@, qr/Malformed prototype for main::wrong2/, 'wrong2' ); -sub opt ($;_) { is($_[0], "seen"); ok(!defined $_[1], "; has precedence over _") } +sub opt ($;_) { + is($_[0], "seen"); + is($_[1], undef, "; has precedence over _"); +} + opt("seen"); sub unop (_) { is($_[0], 11, "unary op") }