Changeset 27


Ignore:
Timestamp:
04/22/09 12:45:40 (15 years ago)
Author:
nanardon
Message:
  • hide false new functions which load any object
Location:
LATMOS-Accounts/lib/LATMOS/Accounts
Files:
2 edited

Legend:

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

    r17 r27  
    8888    my ($self, $otype, $id) = @_; 
    8989 
    90     return LATMOS::Accounts::Bases::Objects->new($self, $otype, $id); 
     90    return LATMOS::Accounts::Bases::Objects->_new($self, $otype, $id); 
    9191} 
    9292 
     
    102102sub create_object { 
    103103    my ($self, $otype, $id, %data) = @_; 
    104     return; 
     104    my $pclass = $self->_load_obj_class($otype); 
     105    $pclass->create($id, %data) or return; 
     106    $self->get_object($otype, $id); 
    105107} 
    106108 
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r12 r27  
    2222=cut 
    2323 
    24 =head2 new($base, $type, $id, ...) 
     24=head2 new($base, $id) 
    2525 
    26 Return a new object of type $type having unique identifier 
    27 $id, all remaining arguments are passed to the subclass. 
     26Create a new object having $id as uid. 
    2827 
    2928=cut 
    3029 
    31 sub new { 
     30# _new($base, $type, $id, ...) 
     31 
     32# Return a new object of type $type having unique identifier 
     33# $id, all remaining arguments are passed to the subclass. 
     34 
     35sub _new { 
    3236    my ($class, $base, $otype, $id, @args) = @_; 
    3337 
Note: See TracChangeset for help on using the changeset viewer.