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

Re^3: perl standalone to run perl script as a parameter

by dasgar (Deacon)
on Jul 17, 2012 at 02:36 UTC ( #982115=note: print w/ replies, xml ) Need Help??


in reply to Re^2: perl standalone to run perl script as a parameter
in thread perl standalone to run perl script as a parameter

Based on what you're describing, I personally would approach this in a totally different manner.

It sounds like you're running something on a central system that issues remote commands to remote systems. That sounds like a network is involved. If so, the solution is very simple if you have the remote systems access a file share on the network.

Here's what I would do in your situation:

  • Download a portable version of Strawberry Perl from here.
  • Put the unzipped portable Strawberry Perl in a shared network folder that can be accessed by the "client" systems.

With portable Strawberry Perl, you're not installing Perl. Instead, you run a batch file that opens a command prompt and sets environment variables for just that command prompt. From that command prompt and only that command prompt, you can run Perl. With a little batch file tweaking, you can modify it to take inputs (such as the Perl script to run) and then it can run a Perl script with the full Perl environment.

For example, I want to add the Win32::TieRegistry module.

To have that or any other Perl module available, you just need to install those modules into the portable Strawberry Perl that's on that network share and then all of your "client" systems can use that module.

To allow others to run their modified version of the Perl script without installing Perl on the remote systems, I believe this may be one of the easiest methods to do so.


Comment on Re^3: perl standalone to run perl script as a parameter
Re^4: perl standalone to run perl script as a parameter
by eammendola (Initiate) on Jul 18, 2012 at 04:35 UTC
    This is a great solution! In fact, I may use this sometime in the future for a different need. After reading this I set Strawberry Perl up on network share and tested it out. It certainly works (with my logon) and the modules can be installed in one place for everyone. Again, I really like this solution. Unfortunately, the tool calling the perl only has local admin privileges, so it cannot access shares setup to require logged on network accounts. After further discussion, I decided to use the old build and just do the extra coding instead of trying to compile my own with a few specific modules. I'd like to spend more time learning how to roll my own, but I am under time constraints to get this up and running. Thanks again.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-12-20 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls