1 # -*- Mode: cperl; coding: utf-8; -*-
7 # for debugging uncomment the next two lines
9 # $CPAN::DEBUG = 16384;
12 next if tr/.// > 1 && $]<5.006; # multidot tests are not for pre-5.6.0
22 my $has_sort_versions = eval { require Sort::Versions; 1 };
23 my $has_versionpm = eval { require version; 1 };
25 my($l,$r,$exp) = @{shift @$D};
26 my $res = CPAN::Version->vcmp($l,$r);
28 print "# l[$l]r[$r]exp[$exp]res[$res]\n";
32 if ($has_sort_versions) {
33 if (Sort::Versions::versioncmp($l,$r) != $res) {
34 push @other, sprintf "SV: %d", Sort::Versions::versioncmp($l,$r);
39 my $vpack = "version"; # hide the name from 5.004
40 my $vres = eval { $vpack->new($l) cmp $vpack->new($r); };
42 push @other, "v.pm: $@";
43 } elsif ($vres != $res) {
44 push @other, sprintf "v.pm: %d", $vres;
47 my $other = @other ? " (".join("; ", @other).")" : "";
48 printf "ok %2d # %12s %12s %3d%s\n", $N-@$D, $l, $r, $res, $other;
49 die "Panic" if CPAN::Version->vgt($l,$r) && CPAN::Version->vlt($l,$r);
73 20000000.00 19990108 1
104 # cperl-indent-level: 2