#!./perl
BEGIN {
chdir 't' if -d 't';
}
print "1..28\n";
my $i = 1;
eval "use 5.000"; # implicit semicolon
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
eval "use 5.000;";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
eval sprintf "use %.5f;", $];
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
print "not ";
}
print "ok ",$i++,"\n";
print "not ";
}
print "ok ",$i++,"\n";
{ use lib } # check that subparse saves pending tokens
eval "use lib 0.9";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 1.0";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 1.01";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 0.9 qw(fred)";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
print "ok ",$i++,"\n";
eval "use lib 1.0 qw(joe)";
if ($@) {
print "not ";
}
print "ok ",$i++,"\n";
print "ok ",$i++,"\n";
eval "use lib 1.01 qw(freda)";
print "not ";
}
print "ok ",$i++,"\n";
print "ok ",$i++,"\n";
{
eval "use lib v33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib v100.105";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib 100.105";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib v33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib v100.105";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib 100.105";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib v33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib v100.105";
print "not ";
}
print "ok ",$i++,"\n";
eval "use lib 33.55";
print "not " if $@;
print "ok ",$i++,"\n";
eval "use lib 100.105";
print "not ";
}
print "ok ",$i++,"\n";
}
{
# Regression test for patch 14937:
# Check that a .pm file with no package or VERSION doesn't core.
print F "1;\n";
close F;
eval "use lib '.'; use xxx 3;";
print "not ";
}
print "ok ",$i++,"\n";
}