- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm
r12 r28 22 22 =cut 23 23 24 =head2 new($base, $type, $id, ...)24 =head2 list($base) 25 25 26 Return a new object of type $type having unique identifier 27 $id, all remaining arguments are passed to the subclass. 26 List object supported by this module existing in base $base 27 28 =cut 29 30 sub list { 31 my ($class) = @_; 32 return; 33 } 34 35 =head2 new($base, $id) 36 37 Create a new object having $id as uid. 28 38 29 39 =cut 30 40 31 41 sub 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 55 sub _new { 32 56 my ($class, $base, $otype, $id, @args) = @_; 33 57 … … 39 63 return $newobj; 40 64 } 65 66 =head2 type 67 68 Return the type of the object 69 70 =cut 41 71 42 72 sub type {
Note: See TracChangeset
for help on using the changeset viewer.