The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Calling API1 functions from a custom Cpanel module

Discussion in 'cPanel Developers' started by RSimoes, Jan 27, 2010.

  1. RSimoes

    RSimoes Member
    PartnerNOC

    Joined:
    Oct 9, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  2. RSimoes

    RSimoes Member
    PartnerNOC

    Joined:
    Oct 9, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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');
    
     
    #2 RSimoes, Jan 27, 2010
    Last edited: Jan 27, 2010
Loading...

Share This Page