Changeset 192


Ignore:
Timestamp:
05/26/09 18:42:07 (15 years ago)
Author:
nanardon
Message:
  • warn if base does not load
File:
1 edited

Legend:

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

    r191 r192  
    5353        defattr => { map { $_ => ($self->val('_defattr_', $_)) } $self->Parameters('_defattr_') }, 
    5454    ); 
    55     my $base = LATMOS::Accounts::Bases->new($type, %params, label => $section) 
    56         or return; 
     55    my $base = LATMOS::Accounts::Bases->new($type, %params, label => $section) or do { 
     56        warn "Cannot instanciate base $section ($type)"; 
     57        return; 
     58    }; 
    5759    $base->load or return; 
    5860    $base; 
     
    122124    my $labfrom = $options{from} ? $self->base($options{from}) : $self->default_base; 
    123125 
    124     my @labto = map { $self->base($_) } @{ $options{to} || []} or return; 
     126    my @labto = 
     127        grep { $_ } 
     128        map { $self->base($_) } 
     129        @{ $options{to} || []} 
     130        or return; 
    125131 
    126132    my $sync = LATMOS::Accounts::Synchro->new( 
Note: See TracChangeset for help on using the changeset viewer.