import some (modified) MXMS tests
[p5sagit/Function-Parameters.git] / t / foreign / MooseX-Method-Signatures / lib / InvalidCase01.pm
diff --git a/t/foreign/MooseX-Method-Signatures/lib/InvalidCase01.pm b/t/foreign/MooseX-Method-Signatures/lib/InvalidCase01.pm
new file mode 100644 (file)
index 0000000..d0ccc1a
--- /dev/null
@@ -0,0 +1,18 @@
+package InvalidCase01;
+use strict;
+use warnings; no warnings 'syntax';
+use Function::Parameters qw(:strict);
+use Carp qw/croak/;
+
+method meth1{
+  croak "Binary operator $op expects 2 children, got " . $#$_
+    if @{$_} > 3;
+}
+
+method meth2{ {
+  "a" "b"
+}
+
+method meth3 {}
+1;
+