Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Question WHM Perl Modules Documentation

    I am presently developing some plugins for WHM, but am unable to find any documentation whatsoever on any of the Whostmgr:: perl modules, I have managed to cobble a few things together by looking at chirpys work but dont know where to look for docs on the methods available.

    For example, im looking for a list of methods for: Whostmgr::HTMLInterface

    Does anyone know where I can find this info out?

    TIA

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,768
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by nickp666 View Post
    I am presently developing some plugins for WHM, but am unable to find any documentation whatsoever on any of the Whostmgr:: perl modules, I have managed to cobble a few things together by looking at chirpys work but dont know where to look for docs on the methods available.

    For example, im looking for a list of methods for: Whostmgr::HTMLInterface

    Does anyone know where I can find this info out?

    TIA
    Perl methods look like:

    Code:
    sub foo{
    Thus, looking at all the lines that start with sub will give you a list of methods. As for parameters, those are usually just underneath the method name, like:

    Code:
    my( $self, $one, $two) =@_;
    or
    Code:
    my $self = shift;
    my $one = shift;
    my $two = shift;
    where $one and $two are the arguments you provide and [b]$self[/$b] is a reference to the object (not all will have $self).

    UPDATE:
    As for documentation itself, that is what the code is for.
    Last edited by cpanelkenneth; 10-28-2008 at 04:56 PM. Reason: documentation

  3. #3
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    Thanks Kenneth, where will i find the perl module files?

    TIA

  4. #4
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    /usr/local/cpanel/Whostmgr/

    on any cPanel server. If you are looking to access specific WHM methods, the preferred method is through the XML API:

    http://www.cpanel.net/plugins/xmlapi/

    We do not recommend relying on perl modules as they will not remain constant.

  5. #5
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    The plugins I am developing have no need for the functions provided by the XMLAPI.

    I noticed this morning with the latest CURRENT that Whostmgr::HTMLInterface has been changed - surely this is a pre-requisite to any WHM Plugin?

  6. #6
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    While utilizing these libraries can help out, it is not required. We cannot guarantee that these modules will not change, in fact they change frequently to provide new/updated features in WHM. The core aspects of the software are provided through APIs and hooks which retain backwards compatibility.

  7. #7
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    Thanks for the clarification, but is there some way we can be notified when there are changes to the WHM perl modules (as the changelog is a little unspecific)

    Every plugin I have ever looked at for WHM (and every plugin I have developed) makes use of:

    Cpanel::Form
    Whostmgr::HTMLInterface
    Whostmgr::ACLS
    Cpanel::SafeFile

    It would be nice to know when changes are made to these as they are so commonly used, realistically specific changes dont need to be detailed, as plugin developers should be expected to actually read the syntax, but knowing when we need to would be a good idea rather than waiting for our clients to scream that plugins dont work
    Last edited by nickp666; 11-04-2008 at 07:07 AM. Reason: More detail

  8. #8
    cPanel Staff cpanelnick's Avatar
    Join Date
    Feb 2003
    Location
    Houston, TX
    Posts
    4,514

    Default

    Quote Originally Posted by nickp666 View Post
    Thanks for the clarification, but is there some way we can be notified when there are changes to the WHM perl modules (as the changelog is a little unspecific)

    Every plugin I have ever looked at for WHM (and every plugin I have developed) makes use of:

    Cpanel::Form
    Whostmgr::HTMLInterface
    Whostmgr::ACLS
    Cpanel::SafeFile

    It would be nice to know when changes are made to these as they are so commonly used, realistically specific changes dont need to be detailed, as plugin developers should be expected to actually read the syntax, but knowing when we need to would be a good idea rather than waiting for our clients to scream that plugins dont work
    All 4 of those as well as Whostmgr::UI are generally kept backwards compatible
    -Nick
    cPanel Inc.

    Need support? Submit a request here. These forums are not an official support channel.

  9. #9
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    Quote Originally Posted by nickp666 View Post
    Thanks for the clarification, but is there some way we can be notified when there are changes to the WHM perl modules (as the changelog is a little unspecific)

    Every plugin I have ever looked at for WHM (and every plugin I have developed) makes use of:

    Cpanel::Form
    Whostmgr::HTMLInterface
    Whostmgr::ACLS
    Cpanel::SafeFile

    It would be nice to know when changes are made to these as they are so commonly used, realistically specific changes dont need to be detailed, as plugin developers should be expected to actually read the syntax, but knowing when we need to would be a good idea rather than waiting for our clients to scream that plugins dont work
    Nick,
    We typically don't document changes to the modules as we don't encourage plugin developers to develop against these modules. We can offer you a development license however which can be set to a tree that will provide insight on changes before they hit your users. Please pm me for info on getting a development license set up.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 08-22-2011, 12:03 PM
  2. Replies: 21
    Last Post: 02-10-2011, 08:17 AM
  3. WHM does not install perl modules to the right place
    By cortecds in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 09-01-2009, 11:44 AM
  4. Documentation for creating modules
    By sparek-3 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-05-2005, 10:22 AM
  5. Perl 5.8.1 Installed modules reveal they are still Updated: perl v5.6.1
    By markie in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-05-2003, 01:26 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube