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

module installation

by prarie dawn (Sexton)
on Jun 15, 2001 at 16:04 UTC ( #88761=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I'm reasonably comfortable with perl, but have never been savvy with the module installation/admin side of things.

I'm thinking of using the AxKit module. I do not have a Web Host yet, but I guess I should consider that most Web Hosts only have standard modules installed.

AxKit requires changes to apache config files - does this make it unlikely to be an option for me with most Web Hosts? I assume most would urr-and-umm about making Apache modifications.

Also, ignoring Apache config changes, how easy is it to install an average perl module? Do I need to be an admin? I'm guessing I could build perl modules in my local cgi-bin with a bit of fiddling, or do I need to be an admin so I can place them in proper library directories?

thanks for any advice

Replies are listed 'Best First'.
Re: module installation
by azatoth (Curate) on Jun 15, 2001 at 16:11 UTC
    Modules are fairly easy to install, provided you follow the instructions included in the Readme (update : an example of which can be seen in the post below). Most also come with a makefile script which does the hard work for you.

    Another option, if for some reason you have trouble installing in the "proper" directories, is to use lib. A handy tool that lets you point to any directory (in which you have installed your mods).

    Also, a while ago, I posted a link of a webhost that let's you upload modules - hang on, lemme find it...aah, here it is.

    Azatoth a.k.a Captain Whiplash

    Make Your Die Messages Full of Wisdom!
    Get YOUR PerlMonks Stagename here!
    Want to speak like a Londoner?
      Thought I'd tack on a question here. Why isn't there an easy module loader for Unix like ActiveState provides for win32? PPM kicks righteous booty (when their network is up), and compiling standardized modules does not. Is there a project in the works to bring PPM functionality to Unix using Perl coders?

      I'm currently porting a Win32 CGI app to Linux and it's more of a pain to install the proper modules than it is to port the process generation code (which is a pain itself).

        UNIX has "cpan" (or perl -MCPAN -e 'shell') which is full featured. It will list, search, download, install, cache, etc.
        --Paris
        
Re: module installation
by Aighearach (Initiate) on Jun 15, 2001 at 16:41 UTC
    On unix systems you can generally install your own perl in user space, and not have to worry about modules being a problem. This is ideal, if you have the disk space on the host.

    Alternatively, you can install individual packages in your home dir for use with the site's main perl using this formula: (assumes bash shell)

    perl Makefile.PL prefix=$HOME
    make
    make test
    make install
    
    You'll want to look at your Perl docs to read about @INC, also.
    --Paris
    
Re: module installation
by mattr (Curate) on Jun 15, 2001 at 16:51 UTC
    Hrmm, yep, lib looks nice. I remember seeing it a few times but for some reason never used it in this case, just said #!/usr/bin/perl -I./mylibs -I./some/other/libs and so on.

    Some providers give you your own apache config file especially if mod_perl is supported, maybe someone has more info about that.

    If you have telnet (or ssh) and gnu tools like gcc and make then you can compile in your local directory. Read the man page for make and you should see where to add the PREFIX directive when building. configure --help might do it too. But don't try to compile on a different machine first that probably won't work.

    The easiest thing is to use CPAN (I haven't used it for installation in a different directory myself) to install modules. You might want to check the CPAN nonstandard directory installation docs. This is how to build a Perl Module on the command line, not inside the cpan utility (which is started with perl -MCPAN -e shell).

    Incidentally, you can build but just not install a module in your local directory, just do make but not make install. It may work fine.

Re: module installation
by tomhukins (Curate) on Jun 15, 2001 at 17:55 UTC

    AxKit runs under mod_perl, which must be compiled into your Apache server.

    Because mod_perl hooks straight into the Apache server, it is standard practice to run your own dedicated server for such projects. Most hosting companies that serve multiple customers on one machine won't support mod_perl, because a bug or problem with one customer's site will affect others on the same machine much more than under standard CGI. Having said that there are some hosting companies that support mod_perl.

    Other answers have already dealt with module installation issues, so I just want to focus on one point: if you're running AxKit, it's best to do so on your own machine.

Re: module installation
by mk (Initiate) on Jun 15, 2001 at 18:05 UTC
    The README is important--and I can see the big 'GOTCHA' for web hosts being the importance of compiling apache with --disable-rule-EXPAT . If the web host is Apache-based with a RedHat RPM installation or something like that, it has likely been built with the built-in expat XML parser enabled (the default). And if you're getting segfaults instead of XSLT transforms, that's why.
Re: module installation
by toma (Vicar) on Jun 15, 2001 at 20:07 UTC
    Be careful not to install perl in your cgi-bin directory since this causes security problems.

    It is a good idea for you to learn to compile perl and install modules. Perl modules are easy to install, but there is one thing to be careful about, which is that the module installation step:

    perl Makefile.PL

    runs the correct version of perl, so either be careful to have your version of perl first in your $PATH environment variable, or specify a full path to your version of perl:

    /home/username/perl5/bin/perl

    Almost all CPAN modules do a good job of installing themselves in the right place if you do this. Very rarely (I have only seen it once) you might find an obscure bug where something assumes that perl is in /usr/bin/perl.

    It should work perfectly the first time! - toma

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2023-12-09 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (38 votes). Check out past polls.

    Notices?