summaryrefslogtreecommitdiffstats
path: root/t/fun/package.t
diff options
context:
space:
mode:
Diffstat (limited to 't/fun/package.t')
-rw-r--r--t/fun/package.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/fun/package.t b/t/fun/package.t
new file mode 100644
index 0000000..52a2266
--- /dev/null
+++ b/t/fun/package.t
@@ -0,0 +1,17 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/fun/lib';
+
+use Fun;
+
+fun Foo::foo ($x, $y) {
+ $x + $y;
+}
+
+ok(!main->can('foo'));
+ok(Foo->can('foo'));
+is(Foo::foo(1, 2), 3);
+
+done_testing;