projects
/
p5sagit/Function-Parameters.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
version 1.0401
[p5sagit/Function-Parameters.git]
/
t
/
foreign
/
MooseX-Method-Signatures
/
named_defaults.t
1
#!perl
2
use strict;
3
use warnings FATAL => 'all';
4
use Test::More;
5
6
{
7
package Foo;
8
9
use Function::Parameters qw(:strict);
10
11
method new($class:) { bless {}, $class }
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;