Subject: | version checking does not understand underscores |
I'm not sure if this is a result of me running on perl 5.8.8, but your
module is crashing when I run using the developer version of this code.
I'm pretty sure this will fix the problem:
--- oldlib/Net/OpenSSH.pm 2009-02-13 03:54:08.000000000 -0500
+++ newlib/Net/OpenSSH.pm 2009-03-02 15:14:14.154088000 -0500
@@ -1,10 +1,11 @@
package Net::OpenSSH;
-our $VERSION = '0.30';
-
use strict;
use warnings;
+use version 0.74;
+our $VERSION = '0.30';
+
our $debug ||= 0;
use Carp qw(carp croak);
@@ -598,6 +599,7 @@
my %loaded_module;
sub _load_module {
my ($module, $version) = @_;
+ $version = version->new($version);
$loaded_module{$module} ||= do {
do {
local $SIG{__DIE__};
@@ -609,6 +611,7 @@
};
if (defined $version) {
my $mv = eval "\$${module}::VERSION" || 0;
+ $mv = version->new($mv);
croak "$module version $version required, $mv is available"
if $mv < $version;
}