import some (modified) MS tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / anon.t
diff --git a/t/foreign/Method-Signatures/anon.t b/t/foreign/Method-Signatures/anon.t
new file mode 100644 (file)
index 0000000..10a4c37
--- /dev/null
@@ -0,0 +1,22 @@
+#!perl
+use strict;
+use warnings FATAL => 'all';
+
+use Test::More 'no_plan';
+
+{
+    package Stuff;
+
+    use Test::More;
+    use Function::Parameters qw(:strict);
+
+    method echo($arg) {
+        return $arg
+    }
+
+    my $method = method ($arg) {
+        return $self->echo($arg)
+    };
+
+    is( Stuff->$method("foo"), "foo" );
+}