Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

adding modules from CPAN to "packaged" mod_perl2

by glasswalk3r (Friar)
on Dec 05, 2016 at 02:19 UTC ( [id://1177189]=perlquestion: print w/replies, xml ) Need Help??

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

Hello fellow monks

I did some researching but I'm not being able to find how to add new modules from CPAN to a "packaged" (compiled and distributed, like DEB or RPM packages) but couldn't find anything.

If I want to install mod_perl2 from scratch that's easy, because I can do it from the perl installed from source code. But for package mod_perl2, I believe the interpreter won't be available. Or I'm guessing it wrong?

Or I can assume is the same perl that is available system wide (and controlled by root) and could try to install those new modules to a different location (and configure mod_perl2 to search for those modules there)?

Thanks in advance!

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Replies are listed 'Best First'.
Re: adding modules from CPAN to "packaged" mod_perl2
by hippo (Bishop) on Dec 05, 2016 at 09:31 UTC

    I'm having some trouble understanding what it is you are trying to accomplish here. If you are looking to install mod_perl2 (I think it's safe enough to just call it mod_perl these days) on an O/S via a packager then why not just use the mod_perl package provided by the distributor? mod_perl is available in RPM for CentOS 6 and 7 and various Fedora releases. I would be very surprised if it were not also available as a DEB for Ubuntu. By using the distributor's versions you know that the various components (apache, perl, libapreq2, etc.) will all play nicely together.

    If your question is more general than just mod_perl, perhaps you could explain in a bit more detail what you are trying to do and where precisely the problem lies. At the moment it sounds more like a packaging problem than a perl problem.

      Fair enough, I might edit the original post as well.

      In the case I have mod_perl2 already setup (with RPM, DEB, etc), imagine that I want to write a handler (connection, request) and for that I want to reuse code from CPAN.

      I would know to to install modules when I'm using the interpreter outside Apache (several methods to do that) but I'm not sure how to do it when I need to add those modules to the mod_perl2 @INC.

      Alceu Rodrigues de Freitas Junior
      ---------------------------------
      "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

        It's the same procedure. If the module is available as a package, install it via yum/dnf/apt-get. If not, download it from CPAN and follow the installation instructions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1177189]
Approved by beech
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found