in reply to Help needed with terminology - different formats of modules

Out of curiosity, are you the same AM who posted Very confused about system perl and local perl and path to perl on umbuntu? Have you read Installing Modules from the tutorials section?

"If I want to install a Perl module manually (without CPAN) on Linix, in what format do I need to download the module. Specifically what is the proper name for this format so I can search for repositories of these modules"

Download the modules from http://search.cpan.org, each module has it's own page with a download link on the right. Unpack pack them (in ubutnu you can use the Archive Manager as previously discussed). What 'repositories' are you going to search? People have various preferences about how to build their modules. See perlmod. Modules can be pure perl or include other code which needs to be compiled. For this you'll need a compiler. IIRC Ubuntu ships with gcc so you don't need to worry about that. Installing modules manually will mean that you may have to keep going back and installing all the dependences (again, manually). If you install via the CPAN command this can take care of this for you.

" If I want to install modules using apt-get, what format must be modules be in? I've seen them described as apt-get packages but I don't know if this is the proper name"

As mentioned in Very confused about system perl and local perl, using apt-get will install to your system perl, doing this defeats the purpose of what you set out to do, which was keep your modules separate. If you want to learn about apt-get, Wikipedia has an entry and links to official documentation.

" Lastly, although you may have already answered this question by this point, I am presuming that for manual installation and CPAN you are downloading source code. With a manual installation you have to compile and build it yourself whereas CPAN takes care of those steps for you. Is this right?"

Yes you have to run:

$HOME/localperl/bin/perl Makefile.PL make make test make install

If you read the documentation for most modules, they'll tell you how to install them. Again, you may want to consider registering an account here, to keep track of your posts and their responses.

Replies are listed 'Best First'.
Re^2: Help needed with terminology - different formats of modules
by Anonymous Monk on Oct 28, 2010 at 16:26 UTC

    Yes I've read that tutorial but it doesn't answer any of the questions I have asked in this post. I may have asked other general questions in the past but this is a specific question unrelated to other posts. I hope that's ok

    I wanted to have a go at installing a module manually without CPAN for the experience which is why I asked for the format 'raw' modules come in so I could have find a module and install it. I presume they are just the source code but I don't know if it is correct to say (or search for in google) 'I need the source code of the CGI::Session module'

    Regardless of whether I use CPAN or apt-get to install a module, I would like to know what formats the modules come in for these 2 different tools. I can't discuss my problems with people if I don't know the right terms. I know apt-get uses .deb files but I don't know if it is correct to say something like 'I need the .deb version of a perl module.' Similarly if I don't know if it is correct to say 'I need the CPAN version of a Perl module.' It would also be nice to have a small insight into the different between the CPAN version and the .deb version of a module. I'm not being lazy in asking in a forum. I've spent the past 2 days tirelessly searching the internet but its like finding a needle in a haystack. Most websites simply tell you what to do without giving any insight into what you are doing and why.

    Does that make more sense? I hope so :)

      "Yes I've read that tutorial but it doesn't answer any of the questions I have asked in this post. I may have asked other general questions in the past but this is a specific question unrelated to other posts. I hope that's ok."

      I don't believe you've read this properly then. From A Guide to Installing Modules:

      The Basics of Module Installation

      Most modules are available from CPAN - the Comprehensive Perl Archive Network. They are supplied in what is known as a tarball. A tarball is a gzip compressed tar file. When a module is made the directory structure it lives in is converted to a single file that contains both the files and the directory information. A program called tar performs this function and the resultant file is called a tar file. Tar files have a .tar file extension. This tar file is then compressed using the gzip (GNU Zip) program. Gzipped files have a .gz extension thus a standard module will be called something like:" Some-Module-0.01.tar.gz

      That tutorial then goes on to explain what I've already told you about Modules being pure perl or containing code which needs to be compiled. Which is something you asked about.

      If you want to know what a deb file is, look it up, use Google, read the wikipedia article.

      For clarification, Cpan, the website is essentially dumb storage. The cpan command line utility can be used to fetch,install and upgrade modules, including their dependencies. This is described in the documentation I've linked you to before.

      Think of .deb files as software packages for the Debian (which Ubuntu is based on) operating systems packaging tool (dpkg/apt-get). And the downloads from CPAN as archives for the CPAN tool.

      Once again, if you install a module from a .deb file or via apt-get you are altering the system perl. This install method uses a packaging system for your operating system to make it easy for the OS to be maintained and install other applications. The alternatives have been explained to you several times now, re read your previous posts.

      "I don't know if it is correct to say something like 'I need the .deb version of a perl module.' Similarly if I don't know if it is correct to say 'I need the CPAN version of a Perl module.'"

      Why would you be saying this to anyone? If you wanted to install (a deb file) via apt-get it would fetch it automatically for you from your systems configured software sources. If you want to install your own module from source http://search.cpan.org is the place to go looking. I think you're confusion stems from the following:

      • You're new to linux
      • You don't understand package management
      • You're new to Perl

      These aren't criticisms. I believe these are just the things you need to become acquainted with in order to understand what you want to know at a level you seem to want to understand it.

      "I can't discuss my problems with people if I don't know the right terms."

      If you have a DBI problem, that's what you say to people. "I have a problem with fetching records from Oracle using DBI". IMHO most of the time your problems wont be dependant on how you installed a module.

      Update: Added last sentence.

        I did read that page and it still didn't explain things to me. It might be obvious to someone who knows what they are doing, but when I read that it wasn't clear to me that some modules just contain perl code which can simply be copied to the appropriate location whereas some contain C code which may need to be compiled. When i read it I didn't understand why it started talking about C compilers. I just assumed that was something to do with linux I didn't understand. I got a lot of help from reading this forum post
        http://www.codingforums.com/archive/index.php/t-121250.html
        It's also my fault that I forgot that Perl was interpreted and not compiled because I couldn't work out whether you downloaded source code and compiled byte codes from module repositories. This area of Perl seems to be a bit of a minefield. I was able to read 2 Perl books in a week to get to the stage where I could write object oriented Perl. I'm still fuzzy on the details of this though after 2 days banging my head against the wall :)