Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script fot automation of module installation

Status
Not open for further replies.

user2base

Technical User
Oct 16, 2002
29
0
0
GB
I've got a few perl scripts that use specific modules. I want to run them on many different systems that are not connected to the internet and I would like to save time and to make the installation of these modules easy for other users.
My idea is to create an installation script that will include the installation of these modules.

Is there any way to do that?




 
Yep - can be done. Not trivial I'll grant you but there's a good mechanism to do it on systems that use Activeperl.

From the PPM documentation:

How do I make a PPM package?
If you want to make a PPM package for use on other machine you can do it like this:

Specify the AUTHOR and ABSTRACT parameters in the Makefile.PL. However you should only pass them to WriteMakefile if the version of the perl is greater than 5.005 - older perls do not have these parameters added and do not expect to see them. This is an example Makefile.PL:

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Term::Control',
'VERSION_FROM' => 'Control.pm', # finds $VERSION
($] ge '5.005') ? (
'AUTHOR' => 'Johnny Doel (johnny@doel.org)',
'ABSTRACT' => 'Control the IO for terminals',
) : (),
);

Then you make the archive with the commands

perl Makefile.PL
nmake

The resulting files are placed in the blib directory that is created when you run nmake. These files should be packed into an archive like this:

tar cvf package.tar blib
gzip --best package.tar

You now have an archive called package.tar.gz. Then you generate the PPD file by:

nmake ppd

You have to edit the resulting PPD file and add the location of the package archive into <CODEBASE HREF=&quot;&quot; />. The location is relative to the PPD file.

You can get nmake from
Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top