Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Running a ppm batch / bat file

by tphyahoo (Vicar)
on Aug 15, 2005 at 13:41 UTC ( #483851=perlquestion: print w/replies, xml ) Need Help??

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

UPDATE: I don't know what changed, but ppm works without the funny errors, catalyst is installed, so for the time being I'm forgetting that ever happened.

Hi, I am on winxp, active state, and currently running these four lines to get a basic install for catalyst, which executes over several minutes.

ppm install Module::Build ppm repository add Theoryx5 ppm repository add Catalyst +pms/ ppm install Catalyst
Is there some easy way I can put this in a dos batch file to get the whole thing done at one click, instead of having to keep check the dos window for when to run the next line? Just putting the four lines into a batch file didn't work.
UPDATE: Actually, even when I run all four lines, that doesn't work either. Weird thing is, when I ran it from my home computer a few hours ago, it did work. Now, when I run it I get, "PPM::PPD::init: not a PPD and not a file:" and a bunch of html. Not sure what is going on here. I have gotten these errors before, and worked around with nmake, nmake test, nmake install, and maybe that will work this time too, but I would like to better understand why magic ppm sometimes fails and if there is anything I can do other than reverting to making manually. Installing catalyst with ppm is a lot easier than the manual way.

Replies are listed 'Best First'.
Re: Running a ppm batch
by Corion (Pope) on Aug 15, 2005 at 13:49 UTC

    There is a peculiar difference between batch files and shell scripts, namely that a batch file will completetly transfer the execution to any other batch file called by it, much like exec does for shell scripts. The way to prevent this is the CALL keyword in batch files:

    @echo off call ppm install Module::Build call ppm repository add Theoryx5 call ppm repository add Catalyst +yst/ppms/ call ppm install Catalyst

    The above code should work. Of course, you could consider ditching ppm and installing via, but that might require a C compiler for the nastier parts.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://483851]
Approved by rinceWind
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2020-02-26 07:33 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (113 votes). Check out past polls.