summaryrefslogtreecommitdiffstats
path: root/t/fun/closure-proto.t
blob: 83ff3ada0245323b0c1fc6a8bba4626147baa7ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use lib 't/fun/lib';

use Test::Requires 'Sub::Name';

use Fun;

{
    my $x = 10;

    fun bar ($y) {
        $x * $y
    }
}

is(bar(3), 30);

done_testing;