Skip Menu |

This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id: 43781
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: salva [...] cpan.org
Requestors: toddr [...] cpanel.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.48_03
Fixed in: (no value)



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; }
From: todd.e.rinaldo [...] jpmorgan.com
Sorry, version doesn't like undef passed to it. You'll have to alter the new code like this: - $version = version->new($version); + $version = version->new($version) if($version); - $mv = version->new($mv); + $mv = version->new($mv) if($mv);