summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/eval.t11
-rw-r--r--t/eval/Bar.pm6
-rw-r--r--t/eval/Foo.pm3
3 files changed, 20 insertions, 0 deletions
diff --git a/t/eval.t b/t/eval.t
new file mode 100644
index 0000000..d9ce952
--- /dev/null
+++ b/t/eval.t
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/eval';
+use Test::More;
+
+no circular::require;
+
+use_ok('Foo');
+
+done_testing;
diff --git a/t/eval/Bar.pm b/t/eval/Bar.pm
new file mode 100644
index 0000000..10b8543
--- /dev/null
+++ b/t/eval/Bar.pm
@@ -0,0 +1,6 @@
+package Bar;
+sub import {
+ eval "require Baz";
+ die $@ unless $@ =~ /\(eval /;
+}
+1;
diff --git a/t/eval/Foo.pm b/t/eval/Foo.pm
new file mode 100644
index 0000000..1558402
--- /dev/null
+++ b/t/eval/Foo.pm
@@ -0,0 +1,3 @@
+package Foo;
+use Bar;
+1;