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

Hi,

I tried to install SOAP::Lite with CPAN like so :

cpan[1]> install SOAP::Lite

This lead to it installing dependencies, among them mod_perl, which resulted in it asking me where my apache source is :

Appending installation info to /usr/lib/perl5/5.20.1/x86_64-linux-thre +ad-multi/perllocal.pod PHRED/SOAP-Lite-1.20.tar.gz /usr/bin/make install -- OK Running install for module 'Apache' Fetching with LWP: http://www.cpan.org/authors/id/G/GO/GOZER/mod_perl-1.31.tar.gz Fetching with LWP: http://www.cpan.org/authors/id/G/GO/GOZER/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/G/GO/GOZER/mod_perl-1.31.t +ar.gz ok Configuring G/GO/GOZER/mod_perl-1.31.tar.gz with Makefile.PL Enter `q' to stop search Please tell me where I can find your apache src [../apache_x.x/src]

The thing is, I think mod_perl is already installed :

# zypper search apache2-mod_perl Loading repository data... Reading installed packages... S | Name | Summary --+------------------------+------------ i | apache2-mod_perl | package | apache2-mod_perl | srcpackage | apache2-mod_perl-devel | package

(I edited that output a bit due to verbosity, but you can see the gist, I hope). So, I'm a bit confused as to why cpan went to install mod_perl? I would have thought it would have picked up on what was already installed, even if that includes things installed without CPAN? I'm running SuSE linux, the version details are :

# cpan --version /usr/bin/cpan version 1.61 calling Getopt::Std::getopts (version 1.10 +[paranoid]), running under Perl version 5.20.1. [Now continuing due to backward compatibility and excessive paranoia +. See 'perldoc Getopt::Std' about $Getopt::Std::STANDARD_HELP_VERSION +.] # cat /etc/issue Welcome to openSUSE 13.2 "Harlequin" - Kernel \r (\l).

Any thoughts appreciated. Apologies if I have not posted this correctly - I've read from this site a lot, but this is my first post.

Thanks,

Niles

Replies are listed 'Best First'.
Re: CPAN not detecting installed modules
by hippo (Archbishop) on Sep 20, 2016 at 22:46 UTC

    The confusion is understandable, especially if you are not overly familiar with mod_perl. Essentially, cpan has determined that Apache is a prerequisite for SOAP::Lite and that since the Apache module is part of the mod_perl dist, that's what it tries to install. Your package manager shows that you have the vendor's mod_perl already, but that is mod_perl2 and it uses the Bundle::Apache2 metamodule and namespace which is quite different from Apache (the 2 is part of the module name, it's not really a version number. I did say it was confusing).

    TBH, I don't see why cpan is seeing Apache as a prerequisite of SOAP::Lite and am 100% sure that I have installed the latter without the former in the past. I suggest that you try to install SOAP::Lite by hand and (if you like) use cpan to install each prerequisite independently, but ignoring Apache as such. If you aren't going to be running SOAP::Lite on the server side, you won't need it anyway.

    See the mod_perl site for details of the renaming from 1 to 2 if you are so inclined.

Re: CPAN not detecting installed modules
by Anonymous Monk on Sep 20, 2016 at 22:36 UTC

    So, I'm a bit confused as to why cpan went to install mod_perl? I would have thought it would have picked up on what was already installed, even if that includes things installed without CPAN? I'm running SuSE linux, the version details are :

    mod_perl-2 is not the same as mod_perl-1

    the weird part here is that mod_perl was identified as a dependency of SOAP::Lite because its not