From: Paul Marquess Date: Sat, 2 Mar 2002 22:50:44 +0000 (+0000) Subject: RE: VERSION core X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8312d5eed0ccd02647bf95699e93c1d5dd24974a;p=p5sagit%2Fp5-mst-13.2.git RE: VERSION core From: "Paul Marquess" Message-Id: p4raw-id: //depot/perl@14953 --- diff --git a/t/comp/use.t b/t/comp/use.t index fb59777..e0281b4 100755 --- a/t/comp/use.t +++ b/t/comp/use.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..27\n"; +print "1..28\n"; my $i = 1; eval "use 5.000"; # implicit semicolon @@ -168,3 +168,18 @@ print "ok ",$i++,"\n"; } print "ok ",$i++,"\n"; } + + +{ + # 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 "use lib '.'; use xxx 3;"; + unless ($@ =~ /^xxx defines neither package nor VERSION--version check failed at/) { + print "not "; + } + print "ok ",$i++,"\n"; + unlink 'xxx.pm'; +}