X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fforeign%2FMethod-Signatures%2Ftrailing_comma.t;fp=t%2Fforeign%2FMethod-Signatures%2Ftrailing_comma.t;h=4c91673b60782ec5f8aa86830e549a3bfc4d042c;hb=1a52f2db46f6d870454428a07bfae09e0359eeee;hp=0000000000000000000000000000000000000000;hpb=ff265988561375d3cf480004e29e3891094c0afb;p=p5sagit%2FFunction-Parameters.git diff --git a/t/foreign/Method-Signatures/trailing_comma.t b/t/foreign/Method-Signatures/trailing_comma.t new file mode 100644 index 0000000..4c91673 --- /dev/null +++ b/t/foreign/Method-Signatures/trailing_comma.t @@ -0,0 +1,18 @@ +#!perl + +# Make sure we allow a trailing comma. + +use strict; +use warnings FATAL => 'all'; + +use Test::More; + +use Function::Parameters qw(:strict); + +fun foo($foo, $bar,) { + return [$foo, $bar]; +} + +is_deeply foo(23, 42), [23, 42]; + +done_testing;