Test duck_type under the debugger
Florian Ragwitz [Thu, 25 Aug 2011 13:35:03 +0000 (15:35 +0200)]
It used to only work without the debugger.

xt/author/debugger-duck_type.t [new file with mode: 0644]

diff --git a/xt/author/debugger-duck_type.t b/xt/author/debugger-duck_type.t
new file mode 100644 (file)
index 0000000..6bea48c
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+use FindBin qw/ $Bin /;
+
+BEGIN {
+#line 1
+#!/usr/bin/perl -d
+
+    push @DB::typeahead, "c", "q";
+
+    # try to shut it up at least a little bit
+    open my $out, ">", \my $out_buf;
+    $DB::OUT = $out;
+    open my $in, "<", \my $in_buf;
+    $DB::IN = $in;
+}
+
+require "$Bin/type_constraints/duck_types.t";