Ignore:
File:
1 edited

Legend:

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

    r12 r28  
    2222=cut 
    2323 
    24 =head2 new($base, $type, $id, ...) 
     24=head2 list($base) 
    2525 
    26 Return a new object of type $type having unique identifier 
    27 $id, all remaining arguments are passed to the subclass. 
     26List object supported by this module existing in base $base 
     27 
     28=cut 
     29 
     30sub list { 
     31    my ($class) = @_; 
     32    return; 
     33} 
     34 
     35=head2 new($base, $id) 
     36 
     37Create a new object having $id as uid. 
    2838 
    2939=cut 
    3040 
    3141sub new { 
     42    my ($class, $base, $id, @args) = @_; 
     43    # So can be call as $class->SUPER::new() 
     44    bless { 
     45        _base => $base, 
     46        _type => ($class =~ m/[^:]*$/)[0], 
     47    }, $class; 
     48} 
     49 
     50# _new($base, $type, $id, ...) 
     51 
     52# Return a new object of type $type having unique identifier 
     53# $id, all remaining arguments are passed to the subclass. 
     54 
     55sub _new { 
    3256    my ($class, $base, $otype, $id, @args) = @_; 
    3357 
     
    3963    return $newobj; 
    4064} 
     65 
     66=head2 type 
     67 
     68Return the type of the object 
     69 
     70=cut 
    4171 
    4272sub type { 
Note: See TracChangeset for help on using the changeset viewer.