Calling API1 functions from a custom Cpanel module

RSimoes

Member
PartnerNOC
Oct 9, 2008
18
0
51
Austin, TX
I'd like to call the API1 function Mysql::adddb from a Perl cPanel module I wrote. It is trivial to call API2 functions by just use'ing the necessary module and calling the api2_ sub, but this does not seem to be the case with API1. Is there an easy way to do this?
 

RSimoes

Member
PartnerNOC
Oct 9, 2008
18
0
51
Austin, TX
OK, I found a (the?) function after digging around in /usr/local/cpanel/Cpanel/. In case anyone else is curious:

Code:
use Cpanel::AdminBin;
Cpanel::AdminBin::adminrun('mysql', 'ADDDB', 'dbname');
 
Last edited: