This patch avoid load() on base to be call several time. Bases are supposed to be load by end point script and not lazilly to check access is OK. The problem with this patch is we need to check all tools to verify load() is really called :\ Dangerous at time. Index: lib/LATMOS/Accounts/Synchro.pm =================================================================== --- lib/LATMOS/Accounts/Synchro.pm (révision 1531) +++ lib/LATMOS/Accounts/Synchro.pm (copie de travail) @@ -75,7 +75,9 @@ foreach (ref($to) eq 'ARRAY' ? @{ $to || []} : ($to)) { push(@{$self->{to}}, $_); } - bless($self, $class) + bless($self, $class); + $self->from->load or return; + return $self; } sub name { @@ -103,6 +105,7 @@ my ($self) = @_; my @loaded; my $unloaded = 0; + foreach ($self->to) { if($_->load) { push(@loaded, $_); @@ -117,10 +120,10 @@ sub enter_synch_mode { my ($self) = @_; - $self->from->load or return; + # $self->from->load or return; # if any cannot be loaded, return, # TODO we need a way to force if some still can be sync - $self->load_dest and return; + my %state = (); $state{$self->from->label} = $self->from->wexported(0); foreach ($self->to) { Index: lib/LATMOS/Accounts.pm =================================================================== --- lib/LATMOS/Accounts.pm (révision 1531) +++ lib/LATMOS/Accounts.pm (copie de travail) @@ -156,7 +156,6 @@ la_log(LA_WARN, "Cannot instanciate base $section ($type)"); return; }; - $base->load or return; $base; } @@ -234,6 +233,12 @@ ); } + my @unload = grep { ! $_->load } @obases; + if (@unload) { + la_log(LA_ERR, "Cannot load base part of syncaccess %s", join(', ', map + { $_->label } @unload)); + return; + } LATMOS::Accounts::SynchAccess->new([ @obases ]); }