diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-09-18 14:14:57 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-09-18 14:14:57 +0100 |
commit | b17397621f1e997fadd615214400d296c2677d96 (patch) | |
tree | 9f01d7496f938f1e08adea8082036de553475312 /t | |
parent | dd90d555fd3323e29dc92c0ff0b2a6569cd2cc2e (diff) | |
download | perl-b17397621f1e997fadd615214400d296c2677d96.tar.gz |
Avoid re-creating a temporary file with constant contents for use.t
Diffstat (limited to 't')
-rwxr-xr-x | t/comp/use.t | 9 | ||||
-rw-r--r-- | t/lib/test_use_14937.pm | 1 |
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; |