API-CPanel

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

abstract:           interface to the CPanel Hosting Panel API ( http://cpanel.net )
author:
    - Konstantin Vlasov <knvlasov@reg.ru>
license:            unknown
distribution_type:  module
configure_requires:
    ExtUtils::MakeMaker:  0
build_requires:
    ExtUtils::MakeMaker:  0
requires:
    Data::Dumper:    0
    Exporter::Lite:  0
    Getopt::Long:    0
    LWP::UserAgent:  0
    XML::Simple:     0
no_index:
    directory:
        - t
        - inc
generated_by:       ExtUtils::MakeMaker version 6.56
meta-spec:

Makefile.PL  view on Meta::CPAN

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'API::CPanel',
    VERSION_FROM      => 'lib/API/CPanel.pm',
    PREREQ_PM         => {
        'Exporter::Lite' => '0',
        'XML::Simple'    => '0',
        'Getopt::Long'   => '0',
        'LWP::UserAgent' => '0',
        'Data::Dumper'   => '0',
    },
    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM  => 'lib/API/CPanel.pm', # retrieve abstract from module
       AUTHOR         => 'Konstantin Vlasov <knvlasov@reg.ru>') : ()),
);

lib/API/CPanel.pm  view on Meta::CPAN

package API::CPanel;

use strict;
use warnings;
use lib qw(../..);

use Exporter::Lite;
use LWP::UserAgent;
#use XML::LibXML;
use XML::Simple;
use Data::Dumper;
use MIME::Base64;
# Main packages
use API::CPanel::Ip;
use API::CPanel::User;
use API::CPanel::Misc;
use API::CPanel::Package;
use API::CPanel::Domain;
use API::CPanel::Mysql;


lib/API/CPanel/Domain.pm  view on Meta::CPAN

package API::CPanel::Domain;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.09;

# Âîçâðàùàåò ñïèñîê äîìåíîâ
sub list {
    my $params = shift;

    return API::CPanel::action_abstract(
	params       => $params,
	func         => 'listaccts',

lib/API/CPanel/Ip.pm  view on Meta::CPAN

package API::CPanel::Ip;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.07;

# Âîçâðàùàåò ñïèñîê ip àäðåñîâ
sub list {
    my $params = shift;

    return API::CPanel::fetch_array_abstract(
	params       => $params,
	func         => 'listips',

lib/API/CPanel/Misc.pm  view on Meta::CPAN

package API::CPanel::Misc;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.07;

# Ïåðåãðóæàåì CPanel
sub reload {
    my $params = shift;

    return API::CPanel::action_abstract(
	params         => $params,
	func           => 'restartservice',

lib/API/CPanel/Mysql.pm  view on Meta::CPAN

package API::CPanel::Mysql;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.07;

# Äîáàâëÿåò ïîëüçîâàòåëÿ â áàçó mysql
# IN:
#   - do_as_user - cPanel ïîëüçîâàòåëü äëÿ êîòîðîãî ñîçäàåòñÿ mysql-ïîëüçîâàòåëü
#   - username   - Èìÿ mysql-ïîëüçîâàòåëÿ äëÿ ñîçäàíèÿ 
#                  (ôàêòè÷åñêè áóäåò ñîçäàí mysql-ïîëüçîâàòåëü ñ èìåíåì: <do_as_user>_<username>).
#   - password   - Ïàðîëü äëÿ mysql-ïîëüçîâàòåëÿ.
sub adduser {

lib/API/CPanel/Package.pm  view on Meta::CPAN

package API::CPanel::Package;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.07;

# Äîáàâèòü ïàêåò
# name* (string)	-- Name of package.
# featurelist (string)	-- Name of the feature list to be used when creating a new package.
# quota (integer)	-- Disk space quota in Megabytes.
# ip (string)		-- Whether or not the domain has a dedicated IP address.
# cgi (boolean)		-- Whether or not the domain has CGI access.
# frontpage (boolean)	-- Whether or not the domain has FrontPage extensions installed.

lib/API/CPanel/User.pm  view on Meta::CPAN

package API::CPanel::User;

use strict;
use warnings;

use API::CPanel;
use Data::Dumper;

our $VERSION = 0.08;

# Âîçâðàùàåò ñïèñîê ïîëüçîâàòåëåé
sub list {
    my $params = shift;

    return API::CPanel::fetch_hash_abstract(
	params       => $params,
	func         => 'listaccts',

t/01-test.t  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use warnings;
use lib qw( ./lib );

use Data::Dumper;

our $ONLINE;

BEGIN {
    #$ENV{auth_user}   = 'restest';
    #$ENV{auth_passwd} = '123';
    #$ENV{host}        = '192.168.123.1';
    $ONLINE = $ENV{auth_user} && $ENV{auth_passwd} && $ENV{host};
}



( run in 0.677 second using v1.01-cache-2.11-cpan-a5abf4f5562 )