It seems your cpan
client is misconfigured, it doesn't seem to have a proper list of CPAN modules. cpanm
is a more user friendly CPAN client than cpan
, I recommend using it instead.
If a freshly installed cpanm
installs the module but you're still getting the error, and if which perl
and the Perl in your #!
line are the same, then your modules are probably getting installed outside the standard Perl library locations. There's a few ways this could happen, the first is to check for environment variables affecting your installation. env | grep -i perl
is a good start. Things like PERL_MB_OPT
and PERL_MM_OPT
will alter how cpan
and cpanm
call the Build.PL and Makefile.PL installers.
If PERL_M*_OPT
are set then there should be a corresponding PERL5LIB
to tell Perl to look in the non-standard location for those modules.
This is usually done to allow non-root users to install modules into their home directory.
In your case you seem to have PERL_M*_OPT
set but no PERL5LIB
. You'll need to set PERL5LIB
to where ever the modules got installed, probably /home/bronson/perl5/lib/perl5/
.
This can all get a bit hairy. There's two tools to make this easier.
First is Perlbrew. It installs Perl in your home directory and configures everything for you. It can even support multiple versions. This is the simplest and recommended way to develop Perl. It gives you full control over the Perl installation, you're not tied to what the system has installed.
The other is to use local::lib
to manage your Perl environment. It will help you set Perl environment variables to install Perl modules to your home directory and use them. You might have a mangled version of that right now.