Commit | Line | Data |
---|---|---|
98e6239b | 1 | #!perl |
2 | use strict; | |
3 | use warnings FATAL => 'all'; | |
98e6239b | 4 | use Test::More; |
5 | ||
6 | { | |
7 | package Foo; | |
8 | ||
9 | use Function::Parameters qw(:strict); | |
10 | ||
1a52f2db | 11 | method new($class:) { bless {}, $class } |
98e6239b | 12 | method bar (:$baz = 42) { $baz } |
13 | } | |
14 | ||
15 | my $o = Foo->new; | |
16 | is($o->bar, 42); | |
17 | is($o->bar(baz => 0xaffe), 0xaffe); | |
18 | ||
19 | done_testing; |