Subject: | Crypt::RSA uses FindBin improperly |
Crypt::RSA uses FindBin to calculate the location of lib directories for further inclusion. This is problematic for a few reasons:
1) it assumes the directory layout of the calling module
2) FindBin::Bin is calculated only once during a BEGIN block for the entire application
3) it is generally unnecessary when using fully namespaced modules
4) it breaks code running under modperl, or really any forking server that runs includes the library after forking
I have successfully tested the latest version with the following lines deleted
From Crypt::RSA :
use FindBin qw($Bin);
use lib "$Bin/../../lib";
From Crypt::RSA::Key::Private::SSH :
use FindBin qw($Bin);
use lib "$Bin/../../../../../lib";