steal more tests from other modules
[p5sagit/Function-Parameters.git] / t / foreign / MooseX-Method-Signatures / named_defaults.t
CommitLineData
98e6239b 1#!perl
2use strict;
3use warnings FATAL => 'all';
4
5use 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
16my $o = Foo->new;
17is($o->bar, 42);
18is($o->bar(baz => 0xaffe), 0xaffe);
19
20done_testing;