| 1 | package CDP::Connect; | ||
| 2 | |||
| 3 | use Frontier::Client; | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, ); | ||
| 9 | require Exporter; | ||
| 10 | require DynaLoader; | ||
| 11 | require AutoLoader; | ||
| 12 | |||
| 13 | @ISA = qw(Exporter DynaLoader AutoLoader); | ||
| 14 | # Items to export into callers namespace by default. Note: do not export | ||
| 15 | # names by default without a very good reason. Use EXPORT_OK instead. | ||
| 16 | # Do not simply export all your public functions/methods/constants. | ||
| 17 | @EXPORT = | ||
| 18 | qw/ | ||
| 19 | OpenCDP | ||
| 20 | /; | ||
| 21 | |||
| 22 | @EXPORT_OK = | ||
| 23 | qw/ | ||
| 24 | OpenCDP | ||
| 25 | /; | ||
| 26 | |||
| 27 | %EXPORT_TAGS = ( | ||
| 28 | 'ALL' => \@EXPORT_OK, | ||
| 29 | 'CONST' => [qw//], | ||
| 30 | ); | ||
| 31 | |||
| 32 | Exporter::export_ok_tags(keys %EXPORT_TAGS); | ||
| 33 | |||
| 34 | |||
| 35 | my $debug = 0; | ||
| 36 | my $encoding = 'ISO-8859-1'; | ||
| 37 | |||
| 38 | sub OpenCDP { | ||
| 39 | my ($cdp_url, $u_name, $pw, ) = @_; | ||
| 40 | |||
| 41 | my $control_server_url = "http://$u_name:$pw\@$cdp_url:8084/xmlrpc"; | ||
| 42 | |||
| 43 | my $client = Frontier::Client->new( | ||
| 44 | 'url' => $control_server_url, | ||
| 45 | 'debug' => $debug, | ||
| 46 | 'encoding' => $encoding, | ||
| 47 | ); | ||
| 48 | } | ||
| 49 | |||
| 50 | __END__ |