lkinley / Net-SSH-Perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
14 stars 9 forks source link

Net::SSH::Perl::Key is not being loaded by Net::SSH::Perl::Agent prior to using it #10

Closed loic-prieto closed 7 years ago

loic-prieto commented 7 years ago

When using the Net::SSH::Perl::Agent class instantiated with the version 2, and try to obtain a key with first_identy (or next_identity), I get this error:

Can't locate object method "new_from_blob" via package "Net::SSH::Perl::Key" (perhaps you forgot to load "Net::SSH::Perl::Key"?) at /home/loic/desarrollo/project_name/local/lib/perl5/x86_64-linux/Net/SSH/Perl/Agent.pm line 117.

If I load the Net::SSH::Perl::Key class prior to invoking the method, this does not occur. Indeed, if one looks at the line 117 of the Agent class, and checks what packages are being loaded, we can see that Net::SSH::Perl::Key isn't one of them.

Perhaps, just a "use Net::SSH::Perl::Key" at the beggining of the file may fix this problem. If it is a problem, and I'm just not using correctly the library as it was intended.

Kind regards, and thank you for your great work on the library :)

lkinley commented 7 years ago

Thanks, I'll fix this in the next release.

loic-prieto commented 7 years ago

You're welcome!