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