Ignore:
Timestamp:
05/29/12 10:25:51 (12 years ago)
Author:
nanardon
Message:
  • complete POD

This patch a basic documentation to all functions.
It also add two test to ensure all POD syntax are correct and coverage is full.

File:
1 edited

Legend:

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

    r1014 r1023  
    2222 
    2323=head1 FUNCTIONS 
     24 
     25=cut 
     26 
     27=head2 is_supported 
     28 
     29If exists, must return true or false if the object is supported or not 
    2430 
    2531=cut 
     
    136142} 
    137143 
     144=head2 attribute ($attribute) 
     145 
     146Return L<LATMOS::Accounts::Bases::Attributes> object for C<$attribute> 
     147 
     148=cut 
     149 
    138150sub attribute { 
    139151    my ($self, $attribute) = @_; 
     
    141153    my $attrinfo; 
    142154    if (! ref $attribute) { 
    143         $attrinfo = $self->base->get_attr_schema( 
    144             $self->type, $attribute 
    145         ) or return; 
     155        $attrinfo = $self->_get_attr_schema( 
     156            $self->base)->{$attribute} 
     157        or return; 
    146158        $attrinfo->{name} = $attribute; 
    147159    } else { 
     
    211223    return ref $res ? @{ $res } : ($res); 
    212224} 
     225 
     226=head2 get_state ($state) 
     227 
     228Return an on fly computed value 
     229 
     230=cut 
    213231 
    214232sub get_state { 
     
    241259} 
    242260 
     261=head2 queryformat ($fmt) 
     262 
     263Return formated string according C<$fmt> 
     264 
     265=cut 
     266 
    243267sub queryformat { 
    244268    my ($self, $fmt) = @_; 
     
    263287=cut 
    264288 
     289=head2 check_allowed_values ($attr, $values) 
     290 
     291Check if value C<$values> is allowed for attributes C<$attr> 
     292 
     293=cut 
     294 
    265295sub check_allowed_values { 
    266296    my ($self, $attr, $values) = @_; 
    267297    $self->base->check_allowed_values($self->type, $attr, $values); 
    268298} 
     299 
     300=head2 attr_allow_values ($attr) 
     301 
     302Return allowed for attribute C<$attr> 
     303 
     304=cut 
    269305 
    270306sub attr_allow_values { 
     
    377413} 
    378414 
     415=head2 check_password ($password) 
     416 
     417Check given password is secure using L<Crypt::Cracklib> 
     418 
     419=cut 
     420 
    379421sub check_password { 
    380422    my ( $self, $password ) = @_; 
     
    383425    return fascist_check($password, $dictionary); 
    384426} 
     427 
     428=head2 search ($base, @filter) 
     429 
     430Search object matching C<@filter> 
     431 
     432=cut 
    385433 
    386434sub search { 
     
    444492} 
    445493 
     494=head2 attributes_summary ($base, $attribute) 
     495 
     496Return list of values existing in base for C<$attribute> 
     497 
     498=cut 
    446499 
    447500sub attributes_summary { 
     
    464517} 
    465518 
     519=head2 find_next_numeric_id ($base, $field, $min, $max) 
     520 
     521Find next free uniq id for attribute C<$field> 
     522 
     523=cut 
     524 
    466525sub find_next_numeric_id { 
    467526    my ($class, $base, $field, $min, $max) = @_; 
     
    491550} 
    492551 
     552=head2 text_dump ($handle, $options, $base) 
     553 
     554Dump object into C<$handle> 
     555 
     556=cut 
     557 
    493558sub text_dump { 
    494559    my ($self, $handle, $options, $base) = @_; 
     
    496561    return 1; 
    497562} 
     563 
     564=head2 dump 
     565 
     566Return dump for tihs object 
     567 
     568=cut 
    498569 
    499570sub dump { 
     
    550621__END__ 
    551622 
    552 =head1 CANICALS FIELDS 
    553  
    554 =head2 User class 
    555  
    556 =head2 Group class 
    557623 
    558624=head1 SEE ALSO 
    559625 
    560 Mention other useful documentation such as the documentation of 
    561 related modules or operating system documentation (such as man pages 
    562 in UNIX), or any relevant external documentation such as RFCs or 
    563 standards. 
    564  
    565 If you have a mailing list set up for your module, mention it here. 
    566  
    567 If you have a web site set up for your module, mention it here. 
     626L<LATMOS::Accounts::Bases> 
    568627 
    569628=head1 AUTHOR 
Note: See TracChangeset for help on using the changeset viewer.