cPanel::APIClient::Transport::CLISync
Call cPanel as an unprivileged user:
my $cp = cPanel::APIClient->create( service = 'cpanel', transport => ['CLISync'], );
Call cPanel for bob as root:
bob
my $cp = cPanel::APIClient->create( service = 'cpanel', transport => ['CLISync'], credentials => { username => 'bob' }, );
Call WHM as root:
my $cp = cPanel::APIClient->create( service = 'whm', transport => ['CLISync'], );
Call WHM for reseller sue as root:
sue
my $cp = cPanel::APIClient->create( service = 'whm', transport => ['CLISync'], credentials => { username => 'sue' }, );
This module implements synchronous local transport (via cPanel & WHM’s CLI API commans) for API requests.
Copyright 2020 cPanel, L. L. C. All rights reserved. http://cpanel.net
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install cPanel::APIClient, copy and paste the appropriate command in to your terminal.
cpanm
cpanm cPanel::APIClient
CPAN shell
perl -MCPAN -e shell install cPanel::APIClient
For more information on module installation, please visit the detailed CPAN module installation guide.