basic test for import_into
Lukas Mai [Tue, 2 Mar 2010 20:37:14 +0000 (21:37 +0100)]
t/elsewhere.t [new file with mode: 0644]

diff --git a/t/elsewhere.t b/t/elsewhere.t
new file mode 100644 (file)
index 0000000..432a1fc
--- /dev/null
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Function::Parameters ();
+
+BEGIN { Function::Parameters::import_into __PACKAGE__; }
+
+ok fun ($x) { $x }->(1);
+
+BEGIN { Function::Parameters::import_into 'Cu::Ba', 'gorn'; }
+
+{
+       package Cu::Ba;
+
+       gorn wooden ($gorn) { !$gorn }
+}
+
+ok Cu::Ba::wooden;
+
+done_testing;