package Net::Plesk::Method::domain_add; use strict; use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); @ISA = qw( Net::Plesk::Method ); $VERSION = '0.02'; $DEBUG = 0; =head1 NAME Net::Plesk::Method::domain_add - Perl extension for Plesk XML Remote API domain addition =head1 SYNOPSIS use Net::Plesk::Method::domain_add my $p = new Net::Plesk::Method::domain_add ( $clientID, 'domain.com' ); $request = $p->endcode; =head1 DESCRIPTION This module implements an interface to construct a request for a domain addition using SWSOFT's Plesk. =head1 METHODS =over 4 =item init args ... Initializes a Plesk domain_add object. The I, I, and $ options are required. =cut sub init { my ($self, $domain, $client, $ip, $template, $user, $pass) = @_; my $xml = join ( "\n", ( '', '', '', '', $self->encode($domain), '', '', $self->encode($client), '', )); $xml .= 'vrt_hst' if defined($user); $xml .= join ( "\n", ( '', $self->encode($ip), '', '', )); if (defined($user)) { $xml .= "" . $self->encode($user); $xml .= "" . $self->encode($pass); $xml .= "" . $self->encode($ip); $xml .= ""; } if ($template) { $xml .= "" . $self->encode($template) . ""; } $xml .= ''; $$self = $xml; } =back =head1 BUGS Creepy crawlies. =head1 SEE ALSO SWSOFT Plesk Remote API documentation (1.4.0.0 or later) =head1 AUTHOR Jeff Finucane Ejeff@cmh.netE =head1 COPYRIGHT AND LICENSE Copyright (C) 2006 Jeff Finucane This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1;