[Affelio-cvs 610] CVS update: affelio/lib

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 10月 25日 (火) 03:41:21 JST


Index: affelio/lib/Affelio.pm
diff -u affelio/lib/Affelio.pm:1.21 affelio/lib/Affelio.pm:1.22
--- affelio/lib/Affelio.pm:1.21	Tue Oct 25 02:39:54 2005
+++ affelio/lib/Affelio.pm	Tue Oct 25 03:41:21 2005
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: Affelio.pm,v 1.21 2005/10/24 17:39:54 slash5234 Exp $
+# $Id: Affelio.pm,v 1.22 2005/10/24 18:41:21 slash5234 Exp $
 
 package Affelio;
 {
@@ -447,7 +447,7 @@
     ######################################################################
     sub get_farm_connecter{
 	my $self = shift;
-	if( !(self->{farm_con}) ){
+	if( !($self->{farm_con}) ){
 	    my $Config = Config::Tiny->new();
 
 	    $Config = Config::Tiny->read($self->{cfg_path});
@@ -455,24 +455,29 @@
 		throw Affelio::exception::SystemException("affelio.cfg not found");
 	    }
 
-	    $self->{farm__connecter} = $Config->{affelio_farm}->{farm_connecter};
-	    if(($self->{farm__connecter} eq "" )
-	       || !($self->{farm__connecter}) ){
+	    $self->{farm__connecter_path} = $Config->{affelio_farm}->{farm_connecter};
+	    if(($self->{farm__connecter_path} eq "" )
+	       || !($self->{farm__connecter_path}) ){
 		return("");
 	    }
+	    debug_print("Affelio::get_farm_con: [$self->{farm__connecter_path}]");
 
-	    my ($con_type, $con_arg) = split(':', $self->{farm__connecter});
-	    my $con_class = "Affelio::Backbone::FarmConnecter::" . $con_type;
+	    my ($con_type, $con_arg) = split(':', $self->{farm__connecter_path});
+	    my $con_class = "Affelio::Backplane::FarmConnecter::" . $con_type;
+	    debug_print("Affelio::get_farm_con: [$con_class]");
+	    debug_print("Affelio::get_farm_con: [$con_arg]");
 
 	    eval "use $con_class";
 	    if($@){
-		throw Affelio::exception::SystemException("Could not load [$con_class].");
+		debug_print("Affelio::get_farm_con: con=[$self->{farm_con}]1");
 	    }
 	    
-	    eval "$self->{farm_con} = new $con_class()";
+	    $self->{farm_con} = $con_class->new(path => $con_arg);
 	    if($@){
+		debug_print("$@");
 		throw Affelio::exception::SystemException("Could not instantiate [$con_class].");
 	    }
+	    debug_print("Affelio::get_farm_con: con=[$self->{farm_con}]");
 
 	}
 	   


Affelio-cvs メーリングリストの案内
Back to archive index