summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-18 14:14:57 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-18 14:14:57 +0100
commitb17397621f1e997fadd615214400d296c2677d96 (patch)
tree9f01d7496f938f1e08adea8082036de553475312 /t
parentdd90d555fd3323e29dc92c0ff0b2a6569cd2cc2e (diff)
downloadperl-b17397621f1e997fadd615214400d296c2677d96.tar.gz
Avoid re-creating a temporary file with constant contents for use.t
Diffstat (limited to 't')
-rwxr-xr-xt/comp/use.t9
-rw-r--r--t/lib/test_use_14937.pm1
2 files changed, 4 insertions, 6 deletions
diff --git a/t/comp/use.t b/t/comp/use.t
index 56d2d8103d..a7ecda8d4a 100755
--- a/t/comp/use.t
+++ b/t/comp/use.t
@@ -191,12 +191,9 @@ is("@test_use::got", "joe");
{
# Regression test for patch 14937:
# Check that a .pm file with no package or VERSION doesn't core.
- open F, ">xxx$$.pm" or die "Cannot open xxx$$.pm: $!\n";
- print F "1;\n";
- close F;
- eval "BEGIN {unshift \@INC, '.'}; use xxx$$ 3;";
- like ($@, qr/^xxx$$ defines neither package nor VERSION--version check failed at/);
- unlink "xxx$$.pm";
+ # (git commit 2658f4d9934aba5f8b23afcc078dc12b3a40223)
+ eval "use test_use_14937 3";
+ like ($@, qr/^test_use_14937 defines neither package nor VERSION--version check failed at/);
}
my @ver = split /\./, sprintf "%vd", $^V;
diff --git a/t/lib/test_use_14937.pm b/t/lib/test_use_14937.pm
new file mode 100644
index 0000000000..0afc6045cf
--- /dev/null
+++ b/t/lib/test_use_14937.pm
@@ -0,0 +1 @@
+1;