Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have recently released Remote::Use at CPAN, which
addresses the problem of loading modules from a binary compatible Perl Module Server. It is in partially in debt
with this node and idsfa comment.
There was an actual motivation to have - as idsfa remarks - a solution that does not install the module (as Module::AutoINC), but one that only requires limited knowledge and no privileges.
At the institution I work the student
laboratories contain hundreds of computers
that can be started in Linux or Windows. The
OS is replicated from a master copy in a
server. Remote::Use helps to solve these sort of problems. It provides ways to run a Perl program even if some libraries aren't availables at start time. The libraries will be downloaded from a specified server using a specified application that runs on top of some protocol. The clients must be binary compatibles with the server if binary libraries - See Remote::Use::Tutorial for examples - are involved. Typical downloaders are "Rsync" and "Wget" but any suitable alternative like lwp-mirror or "CURL" can be used. This means that many different protocols can be used for the transference: SSH, SFTP, HTTP, HTTPS, FTP, etc. This way, my students can download the modules their programs use to a scratch directory. Once the modules are downloaded they will not be downloaded again, unless the modules are removed from the scratch disk. Read Remote::Use::Tutorial if you want to know more. The way to make it work is simple. Consider the following program: The client machine does not have installed Math::Prime::XS. As the name suggest, the modules involves some binary libraries. By declaring the use of Remote::Use first, the libraries will be downloaded and the program can complete its execution: The libraries are stored in a cache directory. consequently succesive executions don't pay extra overhead: The programmer has however to set a configuration file rsyncconfig setting the parameters that govern the downloading process:
Casiano In reply to Re: Remote Module "use"
by casiano
|
|