desertcrocodile has asked for the wisdom of the Perl Monks concerning the following question:

Hey guys, I'm trying to use cpan to install modules on Ubuntu, and although it always shows up as having installed, the perl program still seems to think that the modules are missing when I try to run it. I also cannot find the modules anywhere in the perl library where the other modules are kept, so it doesn't seem to be installing them even though it tells me that it has. Cam anyone think why this is? I am using both cpan and cpanm to install modules. Any help would be greatly appreciated.

Replies are listed 'Best First'.
Re: cpan modules not installing
by Corion (Patriarch) on Feb 10, 2015 at 08:35 UTC

    Without knowing any of the specifics, I can only guess. You can help us help you better by showing how you install modules, and by telling us which cpan tool you're using to install modules and which Perl you invoke to run your script, and how things fail.

    If you're using the system Perl, install modules through the Ubuntu package manager. If you're using your own Perl, most likely the cpan tool uses the system Perl instead of your own, or the script you're invoking is run with the other Perl.

Re: cpan modules not installing
by vinoth.ree (Monsignor) on Feb 10, 2015 at 09:28 UTC

    Hi desertcrocodile,

    Use ExtUtils::Installed module to find the list of modules installed in your system.

    #!/usr/bin/perl -w use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @modules = $inst->modules(); foreach $module (@modules){ print $module . "\n"; }

    Even if this program does not return the module you are looking for, then do direct find command with the module name as find / -iname 'module.pm', it will do a file search.

    Update:

    If you find the path to your perl module add that path into @INC array.


    All is well