Ignore:
Timestamp:
04/25/09 23:55:25 (15 years ago)
Author:
nanardon
Message:
  • add L::A::create_synchro()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r49 r50  
    66use base qw(Config::IniFiles); 
    77use LATMOS::Accounts::Bases; 
     8use LATMOS::Accounts::Synchro; 
    89 
    910our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     
    8081}  
    8182 
     83sub create_synchro { 
     84    my ($self, $from, $to, %options) = @_; 
     85 
     86    my $labfrom = $from ? $self->base($from) : $self->default_base; 
     87 
     88    my @labto = map { $self->base($_) } 
     89        @{ $to || []} 
     90        ? @{ $to } 
     91        : ($self->config_sync_base($from 
     92                ? $from 
     93                : $self->default_base_name)); 
     94 
     95    my $sync = LATMOS::Accounts::Synchro->new( 
     96        $labfrom, [ @labto ], 
     97        state_file => $self->val('_default_', 'state_file'), 
     98    ); 
     99} 
     100 
     101 
    821021; 
    83103 
Note: See TracChangeset for help on using the changeset viewer.