API-PleskExpand

 view release on metacpan or  search on metacpan

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

  api_version -- default: 2.2.4.1
  username -- Expand user name (root as default).
  password -- Expand password.
  url -- full url to Expand XML RPC gate (https://ip.ad.dr.ess::8442/webgate.php').

=cut



sub new {
    (undef) = shift @_;
    my $self = __PACKAGE__->SUPER::new(@_);
    $self->{package_name} = __PACKAGE__;

    unless ($self->{api_version}) {
        $self->{api_version} = '2.2.4.1';
    }

    return $self;
}

t/expand.t  view on Meta::CPAN

    use_ok( 'API::PleskExpand' );
    use_ok( 'API::PleskExpand::Accounts' );
    use_ok( 'API::PleskExpand::Domains' );
    use_ok( 'API::Plesk::Response');
}


my $expand_client = API::PleskExpand->new( %TestData::online_expand_valid_params);
isa_ok( $expand_client, 'API::PleskExpand', 'STATIC call new' );

# Calling undefined method from Plesk.pm

{
    our $our_warning;
    local $SIG{__DIE__} = sub { $our_warning = shift; }; # confess <=> die
    eval { API::PleskExpand->new(%TestData::online_expand_valid_params)->aaa__bbbccc() };
    like($our_warning, qr/aaa__bbbccc/,
         'Checking AUTOLOAD by calling undefined method.');
}


my %create_account_data = (
    'select'        => 'optimal',
    'template-id'   =>  1,
    'general_info'  => {
        login   => 'suxdffffxx',
        pname   => 'stdsdffafff',
        passwd  => '1234d5678',



( run in 1.073 second using v1.01-cache-2.11-cpan-d80b1682f3f )