From 5df4b323ce05ce1c7f9261685804fb4bc7aadbce Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 18 Oct 2006 14:41:26 +0000 Subject: [PATCH] Test for the interaction between ; and _ in prototypes p4raw-id: //depot/perl@29039 --- t/comp/uproto.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/comp/uproto.t b/t/comp/uproto.t index d09461f..f5472d5 100644 --- a/t/comp/uproto.t +++ b/t/comp/uproto.t @@ -6,7 +6,7 @@ BEGIN { require "./test.pl"; } -plan(tests => 30); +plan(tests => 32); sub f($$_) { my $x = shift; is("@_", $x) } @@ -63,3 +63,6 @@ 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 _") } +opt("seen"); -- 2.7.4