remove redundant '; 1' after require
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / required.t
1 #!perl
2
3 use strict;
4 use warnings FATAL => 'all';
5
6 use Test::More;
7
8
9 {
10     package Stuff;
11
12     use Test::More;
13     use Test::Fatal;
14     use Function::Parameters qw(:strict);
15
16     method whatever($this) {
17         return $this;
18     }
19
20     is( Stuff->whatever(23),    23 );
21
22     like exception { Stuff->whatever() }, qr/Not enough arguments/;
23
24     method some_optional($that, $this = 22) {
25         return $that + $this
26     }
27
28     is( Stuff->some_optional(18), 18 + 22 );
29
30     like exception { Stuff->some_optional() }, qr/Not enough arguments/;
31 }
32
33
34 done_testing();