in reply to execution of a perl script
Is there a reason why you are not using CPAN.pm to install your modules?
If you still need to do the installation locally, the following sequence will install the modules as if you typed the commands yourself:
use Cwd; my $package = 'Tie-File-0.96'; sub run { my (@command) = @_; print "Running @command"; system(@command) == 0 or die "Couldn't run : $!"; }; my $old_dir = getcwd; run("tar", "xvzf", "$module.tar.gz" ); chdir $module or die "Couldn't chdir into '$module': $!"; run($^X,"-w","Makefile.PL"); run("make"); run("make","test"); run("make","install"); chdir $old_dir or die "Couldn't chdir into '$old_dir': $!";
Update: Added restoral of the old directory
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: execution of a perl script
by BUU (Prior) on Nov 10, 2005 at 10:07 UTC |