1#!/usr/bin/perl -w 2 3use strict; 4use warnings; 5 6use Test::More tests => 3; 7 8{ 9 package Bla; 10 use Test::More; 11 use Method::Signatures; 12 13 method new ($class:) { 14 bless {}, $class; 15 } 16 17 method array_param_at_end ($a, $b, @c) { 18 return "$a|$b|@c"; 19 } 20 21 eval q{ 22 method two_array_params ($a, @b, @c) {} 23 }; 24 like($@, qr{signature can only have one slurpy parameter}i, "Two array params"); 25 26 eval q{ 27 method two_slurpy_params ($a, %b, $c, @d, $e) {} 28 }; 29 like($@, qr{signature can only have one slurpy parameter}i, "Two slurpy params"); 30} 31 32is(Bla->new->array_param_at_end(1, 2, 3, 4), "1|2|3 4", "Array parameter at end"); 33