1 # -*- Mode: cperl; coding: utf-8; -*-
8 next if tr/.// > 1 && $]<5.006; # multidot tests are not for pre-5.6.0
18 my $has_sort_versions = eval { require Sort::Versions; 1 };
19 my $has_versionpm = eval { require version; 1 };
21 my($l,$r,$exp) = @{shift @$D};
22 my $res = CPAN::Version->vcmp($l,$r);
24 print "# l[$l]r[$r]exp[$exp]res[$res]\n";
28 if ($has_sort_versions) {
29 if (Sort::Versions::versioncmp($l,$r) != $res) {
30 push @other, sprintf "SV: %d", Sort::Versions::versioncmp($l,$r);
35 my $vpack = "version"; # hide the name from 5.004
36 my $vres = $vpack->new($l) cmp $vpack->new($r);
38 push @other, sprintf "v.pm: %d", $vres;
41 my $other = @other ? " (".join("; ", @other).")" : "";
42 printf "ok %2d # %12s %12s %3d%s\n", $N-@$D, $l, $r, $res, $other;
43 die "Panic" if CPAN::Version->vgt($l,$r) && CPAN::Version->vlt($l,$r);
65 20000000.00 19990108 1
95 # cperl-indent-level: 2