IPC::PerlSSH::Library - support package for declaring libraries of remote functions
IPC::PerlSSH::Library
This module allows the creation of pre-prepared libraries of functions which may be loaded into a remote perl running via IPC::PerlSSH.
IPC::PerlSSH
package IPC::PerlSSH::Library::Info; use strict; use IPC::PerlSSH::Library; func( uname => 'uname()' ); func( ostype => '$^O' ); func( perlbin => '$^X' ); 1;
This can be loaded by
use IPC::PerlSSH; my $ips = IPC::PerlSSH->new( Host => "over.there" ); $ips->load_library( "Info" ); print "Remote perl is running from " . $ips->call("perlbin") . "\n"; print " Running on a machine of type " . $ips->call("ostype") . $ips->call("uname") . "\n";
Declare a function called $name, which is implemented using the source code in $code. Note that $code must be a plain string, NOT a CODE reference.
Paul Evans <leonerd@leonerd.org.uk>
To install IPC::PerlSSH, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPC::PerlSSH
CPAN shell
perl -MCPAN -e shell install IPC::PerlSSH
For more information on module installation, please visit the detailed CPAN module installation guide.