Change 14953 by ams@lustre on 2002/03/03 04:15:49
Subject: RE: VERSION core
From: "Paul Marquess" <[EMAIL PROTECTED]>
Date: Sat, 2 Mar 2002 22:50:44 -0000
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/t/comp/use.t#13 edit
Differences ...
==== //depot/perl/t/comp/use.t#13 (xtext) ====
Index: perl/t/comp/use.t
--- perl/t/comp/use.t.~1~ Sat Mar 2 21:30:05 2002
+++ perl/t/comp/use.t Sat Mar 2 21:30:05 2002
@@ -5,7 +5,7 @@
@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";
}
+
+
+{
+ # 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';
+}
End of Patch.