summaryrefslogtreecommitdiffstats
path: root/t/fun/closure-proto.t
diff options
context:
space:
mode:
Diffstat (limited to 't/fun/closure-proto.t')
-rw-r--r--t/fun/closure-proto.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/fun/closure-proto.t b/t/fun/closure-proto.t
new file mode 100644
index 0000000..bc9ede5
--- /dev/null
+++ b/t/fun/closure-proto.t
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Test::More;
+use lib 't/fun/lib';
+
+use Fun;
+
+{
+ my $x = 10;
+
+ fun bar ($y) {
+ $x * $y
+ }
+}
+
+is(bar(3), 30);
+
+done_testing;