How to use another script for input.

Hey, all. I've written a script that does a bunch of OpenStack API
stuff. Yay. But now I'm writing a CGI front-end, and I'd like to use
the first script to inform the new one, so to speak. I assume I have to
do classes in the "back-end" script, and then access them from the CGI

I have no idea how to make this happen, aside from the fact that
"require" is probably involved.

Can someone point me to a site that could help me figure that out?



Unsubscribe: <>


Re: How to use another script for input.

By Greg Navis at 12/06/2018 - 03:26


It's hard to make specific recommendations without seeing the script but
you have at least two options:

1. Call "require 'your-script-name'" and use the API from within the CGI
2. Call your script as a standalone script via fork/exec.

Best regards
Greg Navis