Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: config env script help building gradle from perl script (system/open tips needed)

by Corion (Pope)
on Jun 11, 2013 at 17:11 UTC ( #1038291=note: print w/ replies, xml ) Need Help??


in reply to config env script help building gradle from perl script (system/open tips needed)

Why not simply write a batch file (using Perl) that invokes the environment setup, and afterwards invokes that gradle command?

call ..\\abc-env\\setenv.cmd call gradle

As an alternative, you could try a technique like Get default login environment except for Windows, and then stuff these changes into %ENV.

Replies are listed 'Best First'.
Re^2: config env script help building gradle from perl script (system/open tips needed)
by gj2666 (Beadle) on Jun 11, 2013 at 18:07 UTC
    I'm not sure I see how your suggestion is different than what I'm doing? Referencing PerlDoc I only see system(), ``, open(), and exec() as ways to execute commands in the shell. What am I missing?

      My suggestion is different because batch files executed by cmd.exe modify the environment of the cmd.exe process they are called in.

        so...
        Why not simply write a batch file (using Perl) that invokes the environment setup...
        ...you're saying create a .bat or .cmd file can be created containing perl code?

        Never occurred to me to try something like that.

        (*brain collapsing in on itself*)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2016-06-25 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.