Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

If I'm using modules, do I need an installer/makefile

by niku (Initiate)
on Mar 24, 2003 at 19:18 UTC ( [id://245509]=perlquestion: print w/replies, xml ) Need Help??

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

Two questions, although the second is based on the assumption that the answer to the first is yes.
1) If I am using the following modules:

use Getopt::Long; use Config::Auto;

will I need an installer/makefile of somesort?

2) If I do how do I do this/request for reccomended documentation.

TIA,
Nick

Replies are listed 'Best First'.
Re: If I'm using modules, do I need an installer/makefile
by bart (Canon) on Mar 24, 2003 at 20:22 UTC
    I gather you mean for distributing your script?

    Both are pure perl modules, meaning they don't really need to be installed to work. Having the necessary files in the proper location, should be enough. However...

    • Getopt::Long appears to be a standard module. That means that any normal perl installation should have it.
    • Config::Auto is not a standrad module, however, it's a simple and plain Perl module. All you need is the "Auto.pm" file, in a subfolder "Config", which must be in a directory that can be found through @INC. For example, if you put the directory "Config" in a directory "lib" next to your script, the following line near the top of your script should suffice:
      use lib './lib';
      It'll only work if the working directory, when your script is run, is the directory your script is in.
    If that all still sounds too complicated, you should look into PAR.

    Update: Uh-oh. I just looked at the top of the module Config::Auto. There's more to it than meets the eye. This module also requires XML::Simple — which in turn needs XML::Parser (or one of a few other XML parsing modules); and Config::IniFiles. Well OK, if on Windows, ActivePerl comes with XML::Parser included, so maybe it's not that bad... The other two are plain perl modules, so the mechanism as described for Config::Auto should still work.

Re: If I'm using modules, do I need an installer/makefile
by defyance (Curate) on Mar 24, 2003 at 19:48 UTC
    Did you download this modules source directly, or did you use CPAN?
    $ perl -MCPAN -e shell
    cpan>install Modulename
    Working on the assumption that you got the source, a MakeFile.PL should be included in the tar.gz file. If this is the case, then you will do perl MakeFile.PL and go from there.

    UPDATE: After reading the node again, it appears to me that you don't have the modules installed. You should see: A Guide to Installing Modules for detailed help :-)

    -- Can't never could do anything, so give me and inch, I'll make it a mile.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-30 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found