From: Father Chrysostomos Date: Sat, 12 May 2012 03:27:46 +0000 (-0700) Subject: Test that ‘require v5’ ignores sub named v5 X-Git-Tag: upstream/5.20.0~6803 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1647a8f2ff38f2080e08a6e87b979fea169be893;p=platform%2Fupstream%2Fperl.git Test that ‘require v5’ ignores sub named v5 This is something I broke in my first (unapplied) attempt to clean up require’s parsing madness. --- diff --git a/t/comp/require.t b/t/comp/require.t index d704762..e958fdd 100644 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -22,7 +22,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc); my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 53; +my $total_tests = 54; if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } print "1..$total_tests\n"; @@ -58,6 +58,11 @@ eval { require v5.5.630; }; print "# $@\nnot " if $@; print "ok ",$i++,"\n"; +sub v5 { die } +eval { require v5; }; +print "# $@\nnot " if $@; +print "ok ",$i++," - require v5 ignores sub named v5\n"; + eval { require 10.0.2; }; print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.2 required/; print "ok ",$i++,"\n";