lib/Pod/t/man.t should use TODO with not ok to express its intentions
[p5sagit/p5-mst-13.2.git] / lib / CPAN / Version.pm
index 68a4fec..f47c7c6 100644 (file)
@@ -30,6 +30,10 @@ version strings visible and comparable.
 
 package CPAN::Version;
 
+use strict;
+use vars qw($VERSION);
+$VERSION = sprintf "%.2f", substr(q$Rev: 254 $,4)/100;
+
 # CPAN::Version::vcmp courtesy Jost Krieger
 sub vcmp {
   my($self,$l,$r) = @_;
@@ -109,7 +113,11 @@ sub readable {
 
     # And if they say v1.2, then the old perl takes it as "v12"
 
-    $CPAN::Frontend->mywarn("Suspicious version string seen [$n]\n");
+    if (defined $CPAN::Frontend) {
+      $CPAN::Frontend->mywarn("Suspicious version string seen [$n]\n");
+    } else {
+      warn("Suspicious version string seen [$n]\n");
+    }
     return $n;
   }
   my $better = sprintf "v%vd", $n;