From af960927ad50186c85697a35dcb7f98e805303c4 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 20 Jul 2026 18:20:09 +0200 Subject: [PATCH 1/2] don't add v prefix when displaying version after loading module A v prefix is meaningful in perl versions, so it can be misleading to add a v. And for modules using a version that includes a v, it would display starting with two vs. --- lib/CPAN.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CPAN.pm b/lib/CPAN.pm index ceab25a3..dbd5d180 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -1255,7 +1255,7 @@ sub has_inst { # as a proxy for a checksum. $CPAN::Shell::reload->{$file} = $mtime; my $v = eval "\$$mod\::VERSION"; - $v = $v ? " (v$v)" : ""; + $v = $v ? " ($v)" : ""; CPAN::Shell->optprint("load_module","CPAN: $mod loaded ok$v\n"); if ($mod eq "CPAN::WAIT") { push @CPAN::Shell::ISA, 'CPAN::WAIT'; From 7b6c706e546ec61be45e30a2dcc12fec677e56de Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 20 Jul 2026 18:22:34 +0200 Subject: [PATCH 2/2] check YAML version using VERSION method Checking versions should be done using the ->VERSION method. New versions of YAML are using three part versions, so checking with a numeric comparison won't work correctly. --- lib/CPAN.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CPAN.pm b/lib/CPAN.pm index dbd5d180..7bb638ea 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -534,7 +534,7 @@ sub _yaml_module () { && $CPAN::META->has_inst($yaml_module) && - $YAML::VERSION < 0.60 + !eval { YAML->VERSION(0.60) } && !$Have_warned->{"YAML"}++ ) {