Changeset 6 for LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
- Timestamp:
- 02/27/09 19:00:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r5 r6 40 40 if ($@) { return } # error message ? 41 41 return "LATMOS::Accounts::Bases::$pclass"->new(%options); 42 } 43 44 sub _load_obj_class { 45 my ($self, $otype) = @_; 46 47 # finding perl class: 48 my $pclass = ref $self; 49 $pclass .= '::' . ucfirst(lc($otype)); 50 eval "require $pclass;"; 51 if ($@) { return } # error message ? 52 return $pclass; 53 } 54 55 =head2 list_canonicals_fields($otype) 56 57 Return the list of supported fields by the database for object type $otype. 58 59 =cut 60 61 sub list_canonicals_fields { 62 my ($self, $otype) = @_; 63 my $pclass = $self->_load_obj_class($otype) or return; 64 $pclass->canonical_fields; 42 65 } 43 66
Note: See TracChangeset
for help on using the changeset viewer.