From 70cbe021e8ecc7b77dc3a3c25b778d0f21fca94e Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 14 Oct 2006 23:53:39 +0000 Subject: [PATCH] don't load Net::Plesk until its needed, to prevent every install from depending on it --- FS/FS/part_export/acct_plesk.pm | 3 +++ FS/FS/part_export/www_plesk.pm | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/FS/FS/part_export/acct_plesk.pm b/FS/FS/part_export/acct_plesk.pm index e295a01c5..0028a2e86 100644 --- a/FS/FS/part_export/acct_plesk.pm +++ b/FS/FS/part_export/acct_plesk.pm @@ -46,6 +46,9 @@ sub _export_insert { sub _plesk_command { my( $self, $method, $domain, @args ) = @_; + + eval "use Net::Plesk'"; + return $@ if $@; local($Net::Plesk::DEBUG) = 1 if $self->option('debug'); diff --git a/FS/FS/part_export/www_plesk.pm b/FS/FS/part_export/www_plesk.pm index 383959672..a4ebbf517 100644 --- a/FS/FS/part_export/www_plesk.pm +++ b/FS/FS/part_export/www_plesk.pm @@ -3,8 +3,6 @@ package FS::part_export::www_plesk; use vars qw(@ISA %info); use Tie::IxHash; use FS::part_export; -use Net::Plesk; -use Net::Plesk::Response; @ISA = qw(FS::part_export); @@ -37,7 +35,10 @@ sub rebless { shift; } sub _export_insert { my( $self, $www ) = ( shift, shift ); - + + eval "use Net::Plesk'"; + return $@ if $@; + my $plesk = new Net::Plesk ( 'POST' => $self->option('URL'), ':HTTP_AUTH_LOGIN' => $self->option('login'), @@ -79,6 +80,9 @@ sub _export_insert { sub _plesk_command { my( $self, $method, @args ) = @_; + + eval "use Net::Plesk'"; + return $@ if $@; local($Net::Plesk::DEBUG) = 1 if $self->option('debug'); -- 2.11.0