From: Alex J. G. BurzyƄski Date: Fri, 29 Jul 2011 12:18:09 +0000 (+0100) Subject: test for odd number of arguments X-Git-Tag: v0.009011~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1311f9e1cf74738b5e86e3554b4763a9648e185;p=gitmo%2FMoo.git test for odd number of arguments --- diff --git a/t/buildargs.t b/t/buildargs.t index 1a541bd..90cd9f8 100644 --- a/t/buildargs.t +++ b/t/buildargs.t @@ -88,6 +88,13 @@ foreach my $class (qw(Qux Quux)) { like( $@, qr/Single parameters to new\(\) must be a HASH ref/, "new() requires a list or a HASH ref" ); + + eval { + $class->new( bar => 42, baz => 47, 'quux' ); + }; + like( $@, qr/You passed an odd number of arguments/, + "new() requires a list or a HASH ref" + ); } done_testing;