import all tests from Fun
[p5sagit/Function-Parameters.git] / t / foreign / Fun / anon.t
CommitLineData
98478aff 1#!perl
2use strict;
3use warnings FATAL => 'all';
4use Test::More;
5
6use Function::Parameters;
7
8my $fun = fun ($x, $y) { $x * $y };
9
10is($fun->(3, 4), 12);
11
12my $fun2 = fun ($z, $w = 10) { $z / $w };
13
14is($fun2->(60), 6);
15
16done_testing;