[freeside-commits] freeside/FS/FS/part_export acct_plesk.pm, 1.1, 1.2 www_plesk.pm, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Sat Oct 14 16:53:42 PDT 2006


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv2420

Modified Files:
	acct_plesk.pm www_plesk.pm 
Log Message:
don't load Net::Plesk until its needed, to prevent every install from depending on it

Index: www_plesk.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/www_plesk.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- www_plesk.pm	14 Oct 2006 20:47:11 -0000	1.1
+++ www_plesk.pm	14 Oct 2006 23:53:39 -0000	1.2
@@ -3,8 +3,6 @@
 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 _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 _plesk_command {
   my( $self, $method, @args ) = @_;
+
+  eval "use Net::Plesk'";
+  return $@ if $@;
   
   local($Net::Plesk::DEBUG) = 1
     if $self->option('debug');

Index: acct_plesk.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/acct_plesk.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- acct_plesk.pm	14 Oct 2006 20:47:11 -0000	1.1
+++ acct_plesk.pm	14 Oct 2006 23:53:39 -0000	1.2
@@ -46,6 +46,9 @@
 
 sub _plesk_command {
   my( $self, $method, $domain, @args ) = @_;
+
+  eval "use Net::Plesk'";
+  return $@ if $@;
   
   local($Net::Plesk::DEBUG) = 1
     if $self->option('debug');



More information about the freeside-commits mailing list