Changeset 1023


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.

Location:
trunk/LATMOS-Accounts
Files:
2 added
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/bin/la-search

    r861 r1023  
    7575=back 
    7676 
     77=back 
     78 
    7779=cut 
    7880 
  • trunk/LATMOS-Accounts/bin/la-sql-edit-form

    r975 r1023  
    99=head1 NAME 
    1010 
    11     la-edit - Tools to edit forms (accreq) 
     11    la-sql-edit-form - Tools to edit forms (accreq) 
    1212 
    1313=head1 SYNOPSIS 
    1414 
    15     la-edit [options] obj_id 
     15    la-sql-edit-form formid 
    1616 
    1717=cut 
     
    113113=head2 SYNTAX 
    114114 
    115 The form must be describe in YAML format (L<TODO: Wikipedia link>). 
     115The form must be describe in YAML format (L<http://en.wikipedia.org/wiki/YAML>). 
    116116 
    117117=head2 OPTIONS 
  • trunk/LATMOS-Accounts/bin/la-sql-rev

    r1007 r1023  
    3535Query this specific base instead of the default one. 
    3636 
     37=back 
     38 
    3739=cut 
    3840 
  • trunk/LATMOS-Accounts/bin/la-sync-manager

    r983 r1023  
    1111use LATMOS::Accounts::Task; 
    1212 
     13=head1 NAME 
     14 
     15    la-sync-manager - Daemon performing synchronisation and various tasks 
     16 
     17=head1 SYNOPSIS 
     18 
     19    la-sync-manager [options...] 
     20 
     21=cut 
     22 
    1323GetOptions( 
    1424    'nodaemon' => \my $nodaemon, 
    1525    'c|config=s'   => \my $config, 
    1626    'help'         => sub { pod2usage(0) }, 
    17     'test'         => \my $test, 
    1827    'wait=i'       => \my $wait, 
    1928) or pod2usage(); 
     29 
     30=head1 OPTIONS 
     31 
     32=over 4 
     33 
     34=item --nodaemon 
     35 
     36Don't go into background 
     37 
     38=item -c|--config configdir 
     39 
     40Use this configuration instead default one 
     41 
     42=item --help 
     43 
     44Display this help 
     45 
     46=item --wait minutes 
     47 
     48Wait this number of minutes before process synchronisation (default is 5 
     49minutes) 
     50 
     51=back 
     52 
     53=cut 
    2054 
    2155my $needsync = 2; 
     
    118152} 
    119153 
     154__END__ 
     155 
     156=head1 SEE ALSO 
     157 
     158L<la-sync-manager.ini>, L<latmos-accounts.ini> 
     159 
     160=head1 AUTHOR 
     161 
     162Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     163 
     164=head1 COPYRIGHT AND LICENSE 
     165 
     166Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     167 
     168This library is free software; you can redistribute it and/or modify 
     169it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     170at your option, any later version of Perl 5 you may have available. 
     171 
     172=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r1022 r1023  
    309309__END__ 
    310310 
    311 =head1 SEE ALSO 
    312  
    313311=head1 AUTHOR 
    314312 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Acls.pm

    r918 r1023  
    66 
    77our $VERSION = (q$Rev: 330 $ =~ /^Rev: (\d+) /)[0]; 
     8 
     9=head1 NAME 
     10 
     11LATMOS::Accounts::Acls - Acl support in L<LATMOS::Accounts> 
     12 
     13=head1 FUNCTIONS 
     14 
     15=cut 
     16 
     17=head1 new($file) 
     18 
     19Instanciate Acls from C<$file> 
     20 
     21=cut 
    822 
    923sub new { 
     
    6175 
    6276ACL are applied in the order they appear in the file. 
     77 
     78=cut 
     79 
     80=head2 read_acl_file ($file) 
     81 
     82Load acls from file C<$file>. 
    6383 
    6484=cut 
     
    118138} 
    119139 
     140=head2 add ($obj_dot_attr, $list) 
     141 
     142A new acl for C<$obj_dot_attr> (in form C<object.attribute>) with C<$list> 
     143permissions. 
     144 
     145=cut 
     146 
    120147sub add { 
    121148    my ($self, $obj, $list) = @_; 
     
    126153} 
    127154 
     155=head2 check ($obj, $attr, $perm, $who, $groups) 
     156 
     157Return true is this acl apply to C<$obj>/C<$attr> for C<$perm> by user 
     158C<$who> in groups C<$groups>. 
     159 
     160=cut 
     161 
    128162sub check { 
    129163    my ($self, $obj, $attr, $perm, $who, $groups) = @_; 
     
    148182use strict; 
    149183use warnings; 
     184 
     185=head1 LATMOS::Accounts::Acls::acl 
     186 
     187=head2 new($objdotatt, $list) 
     188 
     189Create new sub acl where C<$objdotatt> is object in form C<Object.Attribute> and 
     190C<$list> the list of permission. 
     191 
     192=cut 
    150193 
    151194sub new { 
     
    168211} 
    169212 
     213=head2 add_perm($perm) 
     214 
     215Add a permission to this sub acl 
     216 
     217=cut 
     218 
    170219sub add_perm { 
    171220    my ($self, $perm) = @_; 
     
    187236    1 
    188237} 
     238 
     239=head2 match($obj, $attr, $perm, $who, $groups) 
     240 
     241Return true is this sub acl apply to C<$obj>/C<$attr> for C<$perm> by user 
     242C<$who> in groups C<$groups>. 
     243 
     244=cut 
    189245 
    190246sub match { 
     
    228284} 
    229285 
     286=head2 dump 
     287 
     288Return a textual dump of the sub acl 
     289 
     290=cut 
     291 
    230292sub dump { 
    231293    my ($self) = @_; 
     
    243305 
    244306__END__ 
     307 
     308=head1 SEE ALSO 
     309 
     310=head1 AUTHOR 
     311 
     312Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     313 
     314=head1 COPYRIGHT AND LICENSE 
     315 
     316Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 
     317 
     318This library is free software; you can redistribute it and/or modify 
     319it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     320at your option, any later version of Perl 5 you may have available. 
     321 
     322=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm

    r1002 r1023  
    5555} 
    5656 
     57=head2 wexported 
     58 
     59See L</unexported> 
     60 
     61=cut 
     62 
    5763sub wexported { unexported(@_) } 
     64 
     65=head2 unexported ($wexported) 
     66 
     67Set base to report unexported object or not 
     68 
     69=cut 
    5870 
    5971sub unexported { 
     
    90102} 
    91103 
     104=head2 type 
     105 
     106Return the type of the base 
     107 
     108=cut 
     109 
    92110sub type { 
    93111    $_[0]->{_type}; 
     
    101119 
    102120sub la { $_[0]->{_la} }; 
     121 
     122=head2 options ($opt) 
     123 
     124Return options from config 
     125 
     126=cut 
    103127 
    104128sub options { 
     
    132156    return @sobj; 
    133157} 
     158 
     159=head2 ordered_objects 
     160 
     161Return supported object type ordered in best order for synchronisation 
     162 
     163=cut 
    134164 
    135165sub ordered_objects { 
     
    356386} 
    357387 
     388=head2 obj_attr_allowed_values ($otype, $attr) 
     389 
     390Return value allowed for this attribute 
     391 
     392=cut 
     393 
    358394sub obj_attr_allowed_values { 
    359395    my ($self, $otype, $attr) = @_; 
     
    364400    return(); 
    365401} 
     402 
     403=head2 check_allowed_values ($otype, $attr, $attrvalues) 
     404 
     405Check attributes C<$attr> of object type C<$otype> allow values C<$attrvalues> 
     406 
     407=cut 
    366408 
    367409sub check_allowed_values { 
     
    406448} 
    407449 
     450=head2 get_attr_schema 
     451 
     452Deprecated 
     453 
     454=cut 
     455 
     456# TODO: kill this 
     457 
    408458sub get_attr_schema { 
    409459    my ($self, $otype, $attribute) = @_; 
     
    415465    } 
    416466} 
     467 
     468=head2 attribute($otype, $attribute) 
     469 
     470Return attribute object. 
     471 
     472See L<LATMOS::Accounts::Bases::Attribute> 
     473 
     474=cut 
    417475 
    418476sub attribute { 
     
    434492    ); 
    435493} 
     494 
     495=head2 delayed_fields 
     496 
     497DEPRECATED 
     498 
     499=cut  
     500 
     501# TODO: kill this 
    436502 
    437503sub delayed_fields { 
     
    449515    @attrs 
    450516} 
     517 
     518=head2 ochelper ($otype) 
     519 
     520Return L<LATMOS::Accounts::Bases::OChelper> object 
     521 
     522=cut 
    451523 
    452524sub ochelper { 
     
    580652} 
    581653 
     654=head2 postcommit 
     655 
     656Run postcommit command 
     657 
     658=cut 
     659 
    582660sub postcommit { 
    583661    my ($self) = @_; 
     
    642720    } 
    643721} 
     722 
     723=head2 sync_object_from($srcbase, $otype, $id, %options) 
     724 
     725Sync object type C<$otype> C<$id> from base C<$srcbase> to current base. 
     726 
     727C<%options>: 
     728 
     729=over 4 
     730 
     731=item nodelete 
     732 
     733Don't delete object if the object synchronize don't exist in source base 
     734 
     735=back 
     736 
     737=cut 
    644738 
    645739sub sync_object_from { 
     
    733827} 
    734828 
     829=head2 attributes_summary($otype, $attr) 
     830 
     831Return couple object id / value for attribute C<$attr> of object type C<$otype> 
     832 
     833This method is designed to be faster than fetching object one by one. 
     834 
     835=cut 
     836 
    735837sub attributes_summary { 
    736838    my ($self, $otype, $attr) = @_; 
     
    739841} 
    740842 
     843=head2 find_next_numeric_id($otype, $field, $min, $max) 
     844 
     845Return, if possible, next numeric id available (typically unix user UID). 
     846 
     847=cut 
     848 
    741849sub find_next_numeric_id { 
    742850    my ($self, $otype, $field, $min, $max) = @_; 
     
    744852    $pclass->find_next_numeric_id($self, $field, $min, $max); 
    745853} 
     854 
     855=head2 authenticate_user($username, $passwd) 
     856 
     857Return true if authentication success. 
     858 
     859Must be override by driver if the base have a proper authentication method 
     860 
     861=cut 
    746862 
    747863sub authenticate_user { 
     
    784900} 
    785901 
     902=head2 connect($username, $password) 
     903 
     904Authenticate the user and store the username as connected 
     905 
     906=cut 
     907 
    786908sub connect { 
    787909    my ($self, $username, $password) = @_; 
     
    793915    return $auth; 
    794916} 
     917 
     918=head2 check_acl($obj, $attr, $perm) 
     919 
     920Return true if connected user have C<$perm> permission on attribute C<$attr> of 
     921object C<$obj>. 
     922 
     923=cut 
    795924 
    796925sub check_acl { 
     
    813942} 
    814943 
     944=head2 text_empty_dump($fh, $otype, $options) 
     945 
     946Empty object dump 
     947 
     948=cut 
     949 
    815950sub text_empty_dump { 
    816951    my ($self, $fh, $otype, $options) = @_; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm

    r959 r1023  
    1414 
    1515=head2 new($attributes, $base_or_object, $maybe_otype) 
     16 
     17Instanciate a new Attributes object. 
    1618 
    1719=cut 
     
    4345} 
    4446 
     47=head2 base 
     48 
     49Return base handle 
     50 
     51=cut 
     52 
    4553sub base  { $_[0]->{_base}  } 
     54 
     55=head2 name 
     56 
     57Return attribute name 
     58 
     59=cut 
     60 
    4661sub name  { $_[0]->{_name}  } 
     62 
     63=head2 otype 
     64 
     65Return object type for this attribute 
     66 
     67=cut 
     68 
     69 
    4770sub otype { $_[0]->{_otype} } 
     71 
     72=head2 mandatory 
     73 
     74Return true if attribute is mandatory 
     75 
     76=cut 
     77 
    4878sub mandatory { $_[0]->{mandatory} || 0 } 
     79 
     80=head2 object 
     81 
     82Return handle object if any 
     83 
     84=cut 
     85 
    4986sub object { $_[0]->{_object} } 
    5087 
     
    65102} 
    66103 
    67 =head2 
     104=head2 iname 
    68105 
    69106Return internal name of attributes 
     
    73110sub iname { $_[0]->{iname} || $_[0]->name } 
    74111 
     112=head2 label 
     113 
     114Return the label to display 
     115 
     116=cut 
     117 
    75118sub label { $_[0]->{label} || $_[0]->{_name} } 
     119 
     120=head2 has_values_list 
     121 
     122Return true if the attribute have a fixed list of accepted values 
     123 
     124=cut 
    76125 
    77126sub has_values_list { 
     
    87136    } 
    88137} 
     138 
     139=head2 can_values 
     140 
     141Return possible value allowed by this attribute 
     142 
     143=cut 
    89144 
    90145sub can_values { 
     
    107162} 
    108163 
     164=head2 display ($value) 
     165 
     166Return the well formated value according attribute 
     167 
     168=cut 
     169 
    109170sub display { 
    110171    my ($self, $value) = @_; 
     
    116177} 
    117178 
     179=head2 input ($value) 
     180 
     181Return well formated single value for insert into base 
     182 
     183=cut 
     184 
    118185sub input { 
    119186    my ($self, $value) = @_; 
     
    125192} 
    126193 
     194=head2 readable 
     195 
     196Return true if attribute can be read 
     197 
     198=cut 
     199 
     200sub readable { 
     201    my ($self) = @_; 
     202    if (ref $self->{readable} eq 'CODE') { 
     203        return $self->{readable}->($self->object) || 0; 
     204    } else { 
     205        return defined($_[0]->{readable}) ? $_[0]->{readable} : 1; 
     206    } 
     207} 
     208 
     209=head2 ro 
     210 
     211Return true if the attribute cannot be write by design 
     212 
     213=cut 
     214 
    127215sub ro { 
    128216    my ($self) = @_; 
     
    134222} 
    135223 
    136 sub readable { 
    137     my ($self) = @_; 
    138     if (ref $self->{readable} eq 'CODE') { 
    139         return $self->{readable}->($self->object) || 0; 
    140     } else { 
    141         return defined($_[0]->{readable}) ? $_[0]->{readable} : 1; 
    142     } 
    143 } 
     224=head2 readonly 
     225 
     226Return true if attribute cannot be read according acls or attributes state 
     227 
     228=cut 
    144229 
    145230sub readonly {  
     
    150235} 
    151236 
     237=head2 check_acl ($mode) 
     238 
     239Return true is access to C<$mode> is granted 
     240 
     241=cut 
     242 
    152243sub check_acl { 
    153244    my ($self, $mode) = @_; 
     
    160251} 
    161252 
     253=head2 real_form_type 
     254 
     255Return the way the fields must be show in GUI. 
     256For each type option maybe given by form_option 
     257 
     258=head3 LABEL 
     259 
     260=over 4 
     261 
     262=item length 
     263 
     264The length to use to show the attribute 
     265 
     266=back 
     267 
     268=head3 TEXT 
     269 
     270=head3 TEXTAREA 
     271 
     272=head3 DATE 
     273 
     274=head3 LIST 
     275 
     276=head3 CHECKBOX 
     277 
     278=over 4 
     279 
     280=item rawvalue 
     281 
     282The real value of the attribute must be show 
     283 
     284=back 
     285 
     286=cut 
     287 
     288sub real_form_type { $_[0]->{formtype} || 'TEXT' } 
     289 
    162290=head2 form_type 
    163291 
    164 Return the way the fields must be show in GUI. 
    165 For each type option maybe given by from_option 
    166  
    167 =head3 LABEL 
    168  
    169 =over 4 
    170  
    171 =item length 
    172  
    173 The length to use to show the attribute 
    174  
    175 =back 
    176  
    177 =head3 TEXT 
    178  
    179 =head3 TEXTAREA 
    180  
    181 =head3 DATE 
    182  
    183 =head3 LIST 
    184  
    185 =head3 CHECKBOX 
    186  
    187 =over 4 
    188  
    189 =item rawvalue 
    190  
    191 The real value of the attribute must be show 
    192  
    193 =back 
    194  
    195 =cut 
    196  
    197 sub real_form_type { $_[0]->{formtype} || 'TEXT' } 
     292Return the way the attribute must be displayed 
     293 
     294=cut 
    198295 
    199296sub form_type { 
     
    204301} 
    205302 
     303=head2 form_option ($option) 
     304 
     305Return the form option C<$option> 
     306 
     307=cut 
     308 
    206309sub form_option { 
    207310    my ($self, $option) = @_; 
     
    209312} 
    210313 
     314=head2 uniq 
     315 
     316Return true is attribute value must be uniq 
     317 
     318=cut 
     319 
    211320sub uniq { $_[0]->{uniq} || 0 } 
    212321 
     322=head2 multiple 
     323 
     324Return true is attribute value can be set several times 
     325 
     326=cut 
     327 
    213328sub multiple { $_[0]->{multiple} || 0 } 
    214329 
     330=head2 hidden 
     331 
     332Return true if attributes must not appear in list by can be query. 
     333 
     334=cut 
     335 
    215336sub hidden { $_[0]->{hide} || 0 } 
     337 
     338=head2 delayed 
     339 
     340Return true if attribute must be set after object creation during 
     341synchronisation 
     342 
     343=cut 
    216344 
    217345sub delayed { $_[0]->{delayed} || 0 } 
     
    232360    } 
    233361} 
     362 
     363=head2 set ($values) 
     364 
     365Set attribute value to attached object 
     366 
     367=cut 
    234368 
    235369sub set { 
     
    250384} 
    251385 
     386=head2 default_value 
     387 
     388Return default value for this attribute 
     389 
     390=cut 
     391 
    252392sub default_value { 
    253393    my ($self) = @_; 
     
    258398 
    2593991; 
     400 
     401__END__ 
     402 
     403=head1 SEE ALSO 
     404 
     405L<LATMOS::Accounts::Bases> 
     406 
     407=head1 AUTHOR 
     408 
     409Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     410 
     411=head1 COPYRIGHT AND LICENSE 
     412 
     413Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     414 
     415This library is free software; you can redistribute it and/or modify 
     416it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     417at your option, any later version of Perl 5 you may have available. 
     418 
     419=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Dummy.pm

    r3 r1023  
    44use warnings; 
    55use base qw(LATMOS::Accounts::Bases); 
     6 
     7=head1 NAME 
     8 
     9LATMOS::Accounts::Bases::Dummy - Dummy base for testing purpose 
     10 
     11=head1 DESCRIPTION 
     12 
     13This base does nothing except returning true, it can be used to test process 
     14 
     15=cut 
    616 
    717our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     
    1323 
    14241; 
     25 
     26__END__ 
     27 
     28=head1 SEE ALSO 
     29 
     30L<LATMOS::Accounts::Bases> 
     31 
     32=head1 AUTHOR 
     33 
     34Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     35 
     36=head1 COPYRIGHT AND LICENSE 
     37 
     38Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     39 
     40This library is free software; you can redistribute it and/or modify 
     41it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     42at your option, any later version of Perl 5 you may have available. 
     43 
     44=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Dummy/User.pm

    r861 r1023  
    44use warnings; 
    55use base qw(LATMOS::Accounts::Bases::Objects); 
     6 
     7=head1 NAME 
     8 
     9LATMOS::Accounts::Bases::Dummy::User - User support for Dummy base 
     10 
     11=cut 
    612 
    713our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     
    2935 
    30361; 
     37 
     38__END__ 
     39 
     40=head1 SEE ALSO 
     41 
     42L<LATMOS::Accounts::Bases::Sql>, L<LATMOS::Accounts::Bases::Sql::DataRequest> 
     43 
     44=head1 AUTHOR 
     45 
     46Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     47 
     48=head1 COPYRIGHT AND LICENSE 
     49 
     50Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     51 
     52This library is free software; you can redistribute it and/or modify 
     53it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     54at your option, any later version of Perl 5 you may have available. 
     55 
     56=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Heimdal.pm

    r917 r1023  
    8282} 
    8383 
    84 sub param { 
     84sub _param { 
    8585    my ($self, $var) = @_; 
    8686    return $self->{_param}{$var} 
     
    9393    $self->{_heimdal} and return 1; 
    9494 
    95     if (!$self->param('realm')) { 
    96         if ($self->param('domain')) { 
     95    if (!$self->_param('realm')) { 
     96        if ($self->_param('domain')) { 
    9797            $self->{_param}{realm} = $self->_domain2realm or do { 
    9898                $self->log(LA_ERR, 
    9999                    'Cannot find kerberos TXT record for domain `%s\'', 
    100                     $self->param('domain'), 
     100                    $self->_param('domain'), 
    101101                ); 
    102102                return; 
    103103            }; 
    104             $self->log(LA_DEBUG, 'kerberos REALM is %s', $self->param('realm')); 
     104            $self->log(LA_DEBUG, 'kerberos REALM is %s', $self->_param('realm')); 
    105105        } else { 
    106106            # No way to find realm 
     
    108108        } 
    109109    } 
    110     my @servers = $self->param('server') 
    111         ? ($self->param('server')) 
    112         : $self->param('domain') 
     110    my @servers = $self->_param('server') 
     111        ? ($self->_param('server')) 
     112        : $self->_param('domain') 
    113113            ? $self->_domain2server 
    114114            : (); 
     
    125125            # Port   => '8899', 
    126126            # Required: 
    127             Principal => $self->param('login'), 
    128             Realm  => $self->param('realm'), 
     127            Principal => $self->_param('login'), 
     128            Realm  => $self->_param('realm'), 
    129129            # --- Either --- 
    130             Password => $self->param('password'), 
     130            Password => $self->_param('password'), 
    131131            # --- Or --- 
    132             # Keytab => $self->param('keytab'), 
     132            # Keytab => $self->_param('keytab'), 
    133133        ); 
    134134 
     
    157157 
    158158    my $resolver = Net::DNS::Resolver->new; 
    159     my $query = $resolver->query("_kerberos-adm._tcp." . $self->param('domain'), 
     159    my $query = $resolver->query("_kerberos-adm._tcp." . $self->_param('domain'), 
    160160        "SRV") or return; 
    161161    foreach my $rr ( 
     
    173173    my $resolver = Net::DNS::Resolver->new; 
    174174    my $query = $resolver->query( 
    175         "_kerberos." . $self->param('domain'), 
     175        "_kerberos." . $self->_param('domain'), 
    176176        "TXT") or return; 
    177177    foreach my $rr ($query->answer) { 
     
    182182} 
    183183 
     184=head2 heimdal 
     185 
     186Return heimdal handle. 
     187 
     188=cut 
     189 
    184190sub heimdal { 
    185191    return $_[0]->{_heimdal}; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Heimdal/User.pm

    r933 r1023  
    8080} 
    8181 
    82 sub uid2prin { 
     82=head2 uid2principal ($uid, $base) 
     83 
     84Convert UID to kerberos principal 
     85 
     86=cut 
     87 
     88sub uid2principal { 
    8389    my ($self, $uid, $base) = @_; 
    8490    my $ba = $base || $self->base; 
     
    9298     
    9399    _is_ignored_user($base, $uid) and return; 
    94     my $entry = $base->heimdal->getPrincipal($class->uid2prin($uid, $base)); 
     100    my $entry = $base->heimdal->getPrincipal($class->uid2principal($uid, $base)); 
    95101    return if (!$entry); 
    96102    bless({ entry => $entry, _base => $base, _id => $uid }, $class); 
     
    104110        return; 
    105111    }; 
    106     my $principal = $base->heimdal->makePrincipal($class->uid2prin($id, $base)); 
     112    my $principal = $base->heimdal->makePrincipal($class->uid2principal($id, $base)); 
    107113    exists($data{krb5KDCFlags}) or $data{krb5KDCFlags} = 0; 
    108114    exists($data{krb5MaxRenew}) or $data{krb5MaxRenew} = 604800; 
     
    121127    my $obj = $class->new($base, $uid) or return; 
    122128 
    123     my $code = $base->heimdal->deletePrincipal($class->uid2prin($uid, $base)); 
     129    my $code = $base->heimdal->deletePrincipal($class->uid2principal($uid, $base)); 
    124130 
    125131    if (!$code) { 
     
    188194 
    189195    $self->base->heimdal->changePassword( 
    190         $self->uid2prin(), 
     196        $self->uid2principal(), 
    191197        $clear_pass 
    192198    ); 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Ldap.pm

    r792 r1023  
    8383} 
    8484 
    85 sub param { 
     85sub _param { 
    8686    my ($self, $var) = @_; 
    8787    return $self->{_param}{$var} 
    8888} 
     89 
     90=head2 object_base_dn ($otype) 
     91 
     92Return the dn of obecjt containers 
     93 
     94=cut 
    8995 
    9096sub object_base_dn { 
    9197    my ($self, $otype) = @_; 
    9298    return join(',', 
    93         ($self->param($otype . '_container') || 'cn=Users'), 
     99        ($self->_param($otype . '_container') || 'cn=Users'), 
    94100        $self->top_dn, 
    95101    ); 
     
    134140    ) 
    135141} 
     142 
     143=head2 ldap 
     144 
     145Return the L<Net::LDAP> handle 
     146 
     147=cut 
    136148 
    137149sub ldap { 
     
    235247at your option, any later version of Perl 5 you may have available. 
    236248 
    237  
    238 =cut 
     249=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Ldap/objects.pm

    r861 r1023  
    132132} 
    133133 
     134=head2 ldap 
     135 
     136A shortcut to return the L<Net::LDAP> object 
     137 
     138=cut 
     139 
    134140sub ldap { 
    135141    return $_[0]->base->{_ldap}; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Mail.pm

    r861 r1023  
    1010 
    1111our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0]; 
     12 
     13=head1 NAME 
     14 
     15LATMOS::Accounts::Bases::Mail - Base support for mail files 
     16 
     17=head1 DESCRIPTION 
     18 
     19This base is designed to generated aliases/revaliases files used by postfix or 
     20sendmail. This allow to centralise all information and to automated alias 
     21generation from user real name. 
     22 
     23=cut 
    1224 
    1325sub new { 
     
    160172 
    1611731; 
     174 
     175__END__ 
     176 
     177=head1 SEE ALSO 
     178 
     179=head1 AUTHOR 
     180 
     181Olivier Thauvin, E<lt>olivier.thauvin@aerov.jussieu.frE<gt> 
     182 
     183=head1 COPYRIGHT AND LICENSE 
     184 
     185Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     186 
     187This library is free software; you can redistribute it and/or modify 
     188it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     189at your option, any later version of Perl 5 you may have available. 
     190 
     191=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Mail/Aliases.pm

    r861 r1023  
    88 
    99our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0]; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::Bases::Mail::Aliases - Aliases support for mail base. 
     14 
     15=cut 
    1016 
    1117sub new { 
     
    4652 
    47531; 
     54 
     55__END__ 
     56 
     57=head1 SEE ALSO 
     58 
     59L<LATMOS::Accounts::Bases::Mail> 
     60 
     61=head1 AUTHOR 
     62 
     63Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     64 
     65=head1 COPYRIGHT AND LICENSE 
     66 
     67Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     68 
     69This library is free software; you can redistribute it and/or modify 
     70it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     71at your option, any later version of Perl 5 you may have available. 
     72 
     73=cut 
     74 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Mail/Revaliases.pm

    r861 r1023  
    66use base qw(LATMOS::Accounts::Bases::Mail::objects); 
    77use LATMOS::Accounts::Log; 
     8 
     9=head1 NAME 
     10 
     11LATMOS::Accounts::Bases::Mail::Revaliases - RevAliases support for Mail base. 
     12 
     13=cut 
    814 
    915our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0]; 
     
    3945 
    40461; 
     47 
     48__END__ 
     49 
     50=head1 SEE ALSO 
     51 
     52L<LATMOS::Accounts::Bases::Mail> 
     53 
     54=head1 AUTHOR 
     55 
     56Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     57 
     58=head1 COPYRIGHT AND LICENSE 
     59 
     60Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     61 
     62This library is free software; you can redistribute it and/or modify 
     63it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     64at your option, any later version of Perl 5 you may have available. 
     65 
     66=cut 
     67 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Mail/objects.pm

    r861 r1023  
    99our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0]; 
    1010 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::Bases::Mail::objects - Parent class for Mail base's objects 
     14 
     15=head1 SEE ALSO 
     16 
     17L<LATMOS::Accounts::Bases::Mail> 
     18 
     19=head1 AUTHOR 
     20 
     21Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     22 
     23=head1 COPYRIGHT AND LICENSE 
     24 
     25Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     26 
     27This library is free software; you can redistribute it and/or modify 
     28it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     29at your option, any later version of Perl 5 you may have available. 
     30 
     31=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/OCHelper.pm

    r861 r1023  
    55use strict; 
    66use warnings; 
     7 
     8=head1 NAME 
     9 
     10LATMOS::Accounts::Bases::OCHelper - Object creation helper 
     11 
     12=head1 DESCRIPTION 
     13 
     14This module is designed to be subclassed. 
     15 
     16=head1 FUNCTIONS 
     17 
     18=cut 
     19 
     20=head2 new($base, $otype) 
     21 
     22=cut 
    723 
    824sub new { 
     
    1430} 
    1531 
     32=head2 $ochelper->base 
     33 
     34Return base object 
     35 
     36=cut 
     37 
    1638sub base { $_[0]->{_base} } 
     39 
     40=head2 $ochelper->otype 
     41 
     42Return object type for this OChelper. 
     43 
     44=cut 
     45 
    1746sub otype { $_[0]->{_otype} } 
    1847 
    19 # return STATUS, $info 
    20 # info = { 
    21 #   step => 0, 
    22 #   name => { # name of object 
    23 #     ask => 0/1, 
    24 #     content => ... 
    25 #   }, 
    26 #   ask => [ list ], 
    27 #   contents => { name => ... } 
    28 # } 
    29 # STATUS => 'NEEDINFO', 'CREATED', 'ERROR', undef (what??) 
     48=head2 $ochelper->step($info) 
     49 
     50Process next step by submitting C<$info> and return the status and new 
     51information to continue process. 
     52 
     53C<$info> must look like: 
     54 
     55    info = { 
     56      step => 0, 
     57      name => { # name of object 
     58        ask => 0/1, 
     59        content => ... 
     60      }, 
     61      ask => [ list ], 
     62      contents => { name => ... } 
     63    } 
     64 
     65STATUS will be one of 'NEEDINFO', 'CREATED', 'ERROR', undef. 
     66 
     67=cut 
    3068 
    3169sub step { 
     
    75113 
    761141; 
     115 
     116__END__ 
     117 
     118=head1 SEE ALSO 
     119 
     120L<LATMOS::Accounts::Bases>, L<LATMOS::Accounts::Bases::Objects> 
     121 
     122=head1 AUTHOR 
     123 
     124Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     125 
     126=head1 COPYRIGHT AND LICENSE 
     127 
     128Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     129 
     130This library is free software; you can redistribute it and/or modify 
     131it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     132at your option, any later version of Perl 5 you may have available. 
     133 
     134=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/OCHelper/User.pm

    r1014 r1023  
    1010=head1 NAME 
    1111 
    12     LATMOS::Accounts::Bases::OCHelper::User - 
    13     Helper to create user in L<LATMOS::Accounts> system 
     12LATMOS::Accounts::Bases::OCHelper::User - 
     13Helper to create user in L<LATMOS::Accounts> system 
    1414 
    1515=cut 
     
    105105=head1 SEE ALSO 
    106106 
     107L<LATMOS::Accounts::Bases::OCHelper> 
     108 
    107109=head1 AUTHOR 
    108110 
  • 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 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm

    r983 r1023  
    6060    $self->{_db} && $self->{_db}->rollback; 
    6161} 
     62 
     63=head2 db 
     64 
     65Return a L<DBI> handle over database, load it if need. 
     66 
     67=cut 
    6268 
    6369sub db { 
     
    8490        $self->{_db}->do(q{set DATESTYLE to 'DMY'}); 
    8591        $self->log(LA_DEBUG, 'New connection to DB'); 
     92        $self->{_db}->commit; 
    8693        return $self->{_db}; 
    8794    } 
     
    153160}  
    154161 
    155  
    156 # Extra non standard functions 
     162=head1 SPECIFICS FUNCTIONS 
     163 
     164=head2 get_global_value ($varname) 
     165 
     166Return global value set into base 
     167 
     168=cut 
    157169 
    158170sub get_global_value { 
     
    167179    $res->{val} 
    168180} 
     181 
     182=head2 set_global_value ($varname, $value) 
     183 
     184Set global value. 
     185 
     186=cut 
    169187 
    170188sub set_global_value { 
     
    181199} 
    182200 
     201=head2 generate_rsa_key ($password) 
     202 
     203Return public and private peer rsa keys 
     204 
     205=cut 
     206 
    183207sub generate_rsa_key { 
    184208    my ($self, $password) = @_; 
     
    195219} 
    196220 
     221=head2 private_key ($password) 
     222 
     223Load and return private rsa key 
     224 
     225=cut 
     226 
    197227sub private_key { 
    198228    my ($self, $password) = @_; 
     
    204234    $privkey 
    205235} 
     236 
     237=head2 get_rsa_password 
     238 
     239Return hash with peer username => encryptedPassword 
     240 
     241=cut 
    206242 
    207243sub get_rsa_password { 
     
    221257} 
    222258 
     259=head2 store_rsa_key ($public, $private) 
     260 
     261Store public and private RSA key info data base 
     262 
     263=cut 
     264 
    223265sub store_rsa_key { 
    224266    my ($self, $public, $private) = @_; 
     
    231273} 
    232274 
     275=head2 find_next_expire_users ($expire) 
     276 
     277Search user expiring in C<$expire> delay 
     278 
     279=cut 
    233280 
    234281sub find_next_expire_users { 
     
    252299} 
    253300 
     301=head2 find_expired_users ($expire) 
     302 
     303Return list of user going to expires in C<$expire> delay 
     304 
     305=cut 
     306 
    254307sub find_expired_users { 
    255308    my ($self, $expire) = @_; 
     
    271324} 
    272325 
     326=head2 rename_nethost ($nethostname, $to, %options) 
     327 
     328Facility function to rename computer to new name 
     329 
     330=cut 
     331 
    273332sub rename_nethost { 
    274333    my ($self, $nethostname, $to, %options) = @_; 
     
    287346    return 1; 
    288347} 
     348 
     349=head2 nethost_exchange_ip ($ip1, $ip2) 
     350 
     351Exchange ip1 with ip2 in base 
     352 
     353=cut 
    289354 
    290355sub nethost_exchange_ip { 
     
    316381} 
    317382 
     383=head1 ATTRIBUTES FUNCTIONS 
     384 
     385=head2 register_attribute ($otype, $attribute, $comment) 
     386 
     387Register a new attribute in base 
     388 
     389=cut 
     390 
    318391sub register_attribute { 
    319392    my ($self, $otype, $attribute, $comment) = @_; 
     
    322395} 
    323396 
     397=head2 is_registered_attribute ($otype, $attribute) 
     398 
     399Return true is attribute already exists 
     400 
     401=cut 
     402 
    324403sub is_registered_attribute { 
    325404    my ($self, $otype, $attribute) = @_; 
     
    328407} 
    329408 
     409=head2 get_attribute_comment ($otype, $attribute) 
     410 
     411Return the comment associated to attribute 
     412 
     413=cut 
     414 
    330415sub get_attribute_comment { 
    331416    my ($self, $otype, $attribute) = @_; 
     
    334419} 
    335420 
     421=head2 set_attribute_comment ($otype, $attribute, $comment) 
     422 
     423Set comment to attribute 
     424 
     425=cut 
     426 
    336427sub set_attribute_comment { 
    337428    my ($self, $otype, $attribute, $comment) = @_; 
     
    340431} 
    341432 
    342 sub check_user_manager { 
     433sub _check_user_manager { 
    343434    $_[0]->_handle_by_unexported('user', 'manager', 'active'); 
    344435} 
    345436 
    346 sub check_group_manager { 
     437sub _check_group_manager { 
    347438    $_[0]->_handle_by_unexported('group', 'managedBy'); 
    348439} 
    349440 
    350 sub check_nethost_owner { 
     441sub _check_nethost_owner { 
    351442    $_[0]->_handle_by_unexported('nethost', 'owner', 'active'); 
    352443} 
     
    372463} 
    373464 
     465=head2 get_datarequest ($id) 
     466 
     467Return user request C<$id> 
     468 
     469=cut 
     470 
    374471sub get_datarequest { 
    375472    my ($self, $id) = @_; 
     
    388485} 
    389486 
     487=head2 list_requests 
     488 
     489List user request currently waiting in base 
     490 
     491=cut 
     492 
    390493sub list_requests { 
    391494    my ($self) = @_; 
     
    404507    @ids 
    405508} 
     509 
     510=head2 list_pending_requests 
     511 
     512List user request to apply 
     513 
     514=cut 
    406515 
    407516sub list_pending_requests { 
     
    422531    @ids 
    423532} 
     533 
     534=head2 list_auto_pending_requests 
     535 
     536List automatic request 
     537 
     538=cut 
    424539 
    425540sub list_auto_pending_requests { 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Accreq.pm

    r1014 r1023  
    9595} 
    9696 
     97=head2 parse_form 
     98 
     99Load C<form> attribute and return reference to data read from YAML data 
     100 
     101=cut  
     102 
    97103sub parse_form { 
    98104    my ($self) = @_; 
     
    102108        return { attrs => [] }; 
    103109    } 
    104 } 
    105  
    106 sub attr_info { 
    107     my ($self, $wanted_attr) = @_; 
    108  
    109     my $ref = $self->parse_form; 
    110  
    111     my @attrs = @{ $ref->{attrs} }; 
    112     while (my $attr = shift(@attrs)) { 
    113         my $attrname = ref $attr 
    114             ? $attr->{name} 
    115             : $attr; 
    116         if ($wanted_attr eq $attrname) { 
    117             if (ref $attr) { 
    118                 return $attr; 
    119             } else { 
    120                 return; 
    121             } 
    122         } 
    123     } 
    124     return; 
    125110} 
    126111 
     
    146131} 
    147132 
     133=head2 attr_info($attr) 
     134 
     135Return information for attribute C<$attr> from form. 
     136 
     137=cut 
     138 
     139sub attr_info { 
     140    my ($self, $wanted_attr) = @_; 
     141 
     142    my $ref = $self->parse_form; 
     143 
     144    my @attrs = @{ $ref->{attrs} }; 
     145    while (my $attr = shift(@attrs)) { 
     146        my $attrname = ref $attr 
     147            ? $attr->{name} 
     148            : $attr; 
     149        if ($wanted_attr eq $attrname) { 
     150            if (ref $attr) { 
     151                return $attr; 
     152            } else { 
     153                return; 
     154            } 
     155        } 
     156    } 
     157    return; 
     158} 
     159 
     160 
    1481611; 
    149162 
     
    151164 
    152165=head1 SEE ALSO 
     166 
     167L<LATMOS::Accounts::Bases::Sql> 
    153168 
    154169=head1 AUTHOR 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Address.pm

    r1014 r1023  
    1111=head1 NAME 
    1212 
    13 LATMOS::Ad - Perl extension for blah blah blah 
    14  
    15 =head1 SYNOPSIS 
    16  
    17   use LATMOS::Accounts::Bases; 
    18   my $base = LATMOS::Accounts::Bases->new('sql'); 
    19   ... 
     13LATMOS::Accounts::Bases::Sql::Address - Physical office Adress Support 
    2014 
    2115=head1 DESCRIPTION 
    2216 
    23 Account base access over standard unix file format. 
     17C<Address> objects allow to store user's several office addresses. 
    2418 
    25 =head1 FUNCTIONS 
    26  
    27 =cut 
    28  
    29 =head2 new(%options) 
    30  
    31 Create a new LATMOS::Ad object for windows AD $domain. 
    32  
    33 domain / server: either the Ad domain or directly the server 
    34  
    35 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     19Notice most of other bases (Ldap, ...) support only one address. 
    3620 
    3721=cut 
     
    174158=head1 SEE ALSO 
    175159 
     160L<LATMOS::Accounts::Bases::Sql> 
     161 
     162L<LATMOS::Accounts::Bases::Sql::Onlyaddress> 
     163 
    176164=head1 AUTHOR 
    177165 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm

    r1014 r1023  
    1212=head1 NAME 
    1313 
    14 LATMOS::Ad - Perl extension for blah blah blah 
    15  
    16 =head1 SYNOPSIS 
    17  
    18   use LATMOS::Accounts::Bases; 
    19   my $base = LATMOS::Accounts::Bases->new('sql'); 
    20   ... 
    21  
    22 =head1 DESCRIPTION 
    23  
    24 Account base access over standard unix file format. 
    25  
    26 =head1 FUNCTIONS 
    27  
    28 =cut 
    29  
    30 =head2 new(%options) 
    31  
    32 Create a new LATMOS::Ad object for windows AD $domain. 
    33  
    34 domain / server: either the Ad domain or directly the server 
    35  
    36 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     14LATMOS::Accounts::Bases::Sql::Aliases - Mail alias object 
    3715 
    3816=cut 
     
    175153=head1 SEE ALSO 
    176154 
     155L<LATMOS::Accounts::Bases::Sql> 
     156 
     157L<LATMOS::Accounts::Bases::Sql::Revaliases> 
     158 
    177159=head1 AUTHOR 
    178160 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/DataRequest.pm

    r1011 r1023  
    1212=head1 NAME 
    1313 
    14     LATMOS::Accounts::Bases::Sql::DataRequest 
     14LATMOS::Accounts::Bases::Sql::DataRequest - Object modification request 
    1515 
    1616=head1 DESCRIPTION 
     
    4040} 
    4141 
     42=head2 ar_id 
     43 
     44Return the id of this form 
     45 
     46=cut 
     47 
    4248sub ar_id { $_[0]->{id} } 
    4349 
     
    4854sub otype { $_[0]->accreq->get_attributes('oType') } 
    4955 
    50 =head2 attributes 
     56=head2 attributes ($attr) 
     57 
     58Return the value for attributes C<$attr> of attached C<Accreq>. 
     59 
     60Return attr 
    5161 
    5262=cut 
     
    5565    $_[0]->accreq->get_attributes('attributes') 
    5666} 
     67 
     68=head2 attribute_info ($attr) 
     69 
     70Return information for attribute C<$attr> of attached C<Accreq>. 
     71 
     72=cut 
    5773 
    5874sub attribute_info { 
     
    6076    $self->accreq->attr_info($attr); 
    6177} 
     78 
     79=head2 oobject 
     80 
     81Return object attached to this form if any 
     82 
     83=cut 
    6284 
    6385sub oobject { 
     
    7092} 
    7193 
     94=head2 set_ptr_object ($ptr) 
     95 
     96Set the name of attached object, C<$ptr> can either the object name, either the 
     97object itself. 
     98 
     99=cut 
     100 
    72101sub set_ptr_object { 
    73102    my ($self, $ptr) = @_; 
     
    80109} 
    81110 
     111=head2 is_for_new_object 
     112 
     113Return true if the form is about object creation 
     114 
     115=cut 
     116 
    82117sub is_for_new_object { 
    83118    my ($self) = @_; 
     
    102137} 
    103138 
     139=head2 object_name 
     140 
     141Return the name of attached object 
     142 
     143=cut 
     144 
    104145sub object_name { 
    105146    my ($self) = @_; 
     
    110151} 
    111152 
     153=head2 user 
     154 
     155Return the user id submiting the request if any 
     156 
     157=cut 
     158 
    112159sub user { 
    113160    my ($self) = @_; 
     
    115162    return ($self->_infos || {})->{user}; 
    116163} 
     164 
     165=head2 o_user 
     166 
     167Return the user object, see L</user> 
     168 
     169=cut 
    117170 
    118171sub o_user { 
     
    123176} 
    124177 
     178=head2 apply 
     179 
     180Return the date the form must be validated 
     181 
     182=cut 
     183 
    125184sub apply { 
    126185    my ($self) = @_; 
     
    129188} 
    130189 
     190=head2 due 
     191 
     192=cut 
     193 
    131194sub due { 
    132195    my ($self) = @_; 
     
    135198} 
    136199 
     200=head2 automated 
     201 
     202Return true if form is an automated one 
     203 
     204=cut 
     205 
    137206sub automated { 
    138207    my ($self) = @_; 
     
    141210} 
    142211 
     212=head2 objrev 
     213 
     214Return the object revision at form registration 
     215 
     216=cut 
     217 
    143218sub objrev { 
    144219    my ($self) = @_; 
     
    146221    return ($self->_infos || {})->{objrev}; 
    147222} 
     223 
     224=head2 register ($options, %info) 
     225 
     226Register the form. C<%info> must contains submitted informations. 
     227 
     228C<$options> is a hashref where 
     229 
     230=over 4 
     231 
     232=item user 
     233 
     234The username registering this form 
     235 
     236=item auto 
     237 
     238The form must automatically be validated 
     239 
     240=item apply 
     241 
     242The date the form must be validated 
     243 
     244=back 
     245 
     246=cut 
    148247 
    149248sub register { 
     
    225324} 
    226325 
     326=head2 notify 
     327 
     328Send mail when registering 
     329 
     330=cut 
     331 
    227332sub notify { 
    228333    my ($self) = @_; 
     
    289394    } 
    290395} 
     396 
     397=head2 get_values 
     398 
     399Return hash with registering value 
     400 
     401=cut 
    291402 
    292403sub get_values { 
     
    330441} 
    331442 
     443=head2 register_discard ($comment) 
     444 
     445Discard the form 
     446 
     447=cut 
     448 
    332449sub register_discard { 
    333450    my ($self, $comment) = @_; 
     
    356473} 
    357474 
     475=head2 unset_auto 
     476 
     477Set the form has no longer automatic 
     478 
     479=cut 
     480 
    358481sub unset_auto { 
    359482    my ($self) = @_; 
     
    364487    return $sth->execute($self->ar_id); 
    365488} 
     489 
     490=head2 auto_apply_to_object ($comment) 
     491 
     492Apply modification automatically 
     493 
     494=cut 
    366495 
    367496sub auto_apply_to_object { 
     
    386515    $self->apply_to_object($comment); 
    387516} 
     517 
     518=head2 apply_to_object ($comment, %attrs) 
     519 
     520Apply modification to the object, C<%attrs> overload informations from forms. 
     521 
     522=cut 
    388523 
    389524sub apply_to_object { 
     
    523658=head1 SEE ALSO 
    524659 
     660L<LATMOS::Accounts::Bases::Sql>, L<LATMOS::Accounts::Bases::Sql::Accreq> 
     661 
    525662=head1 AUTHOR 
    526663 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Group.pm

    r1014 r1023  
    1212=head1 NAME 
    1313 
    14 LATMOS::Ad - Perl extension for blah blah blah 
    15  
    16 =head1 SYNOPSIS 
    17  
    18   use LATMOS::Accounts::Bases; 
    19   my $base = LATMOS::Accounts::Bases->new('sql'); 
    20   ... 
    21  
    22 =head1 DESCRIPTION 
    23  
    24 Account base access over standard unix file format. 
    25  
    26 =head1 FUNCTIONS 
    27  
    28 =cut 
    29  
    30 =head2 new(%options) 
    31  
    32 Create a new LATMOS::Ad object for windows AD $domain. 
    33  
    34 domain / server: either the Ad domain or directly the server 
    35  
    36 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     14LATMOS::Accounts::Bases::Sql::Group - Groups objects support 
    3715 
    3816=cut 
     
    181159=head1 SEE ALSO 
    182160 
     161L<LATMOS::Accounts::Bases::Sql> 
     162 
    183163=head1 AUTHOR 
    184164 
     
    193173at your option, any later version of Perl 5 you may have available. 
    194174 
    195  
    196175=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm

    r1014 r1023  
    1212=head1 NAME 
    1313 
    14 LATMOS::Ad - Perl extension for blah blah blah 
    15  
    16 =head1 SYNOPSIS 
    17  
    18   use LATMOS::Accounts::Bases; 
    19   my $base = LATMOS::Accounts::Bases->new('sql'); 
    20   ... 
    21  
    22 =head1 DESCRIPTION 
    23  
    24 Account base access over standard unix file format. 
    25  
    26 =head1 FUNCTIONS 
    27  
    28 =cut 
    29  
    30 =head2 new(%options) 
    31  
    32 Create a new LATMOS::Ad object for windows AD $domain. 
    33  
    34 domain / server: either the Ad domain or directly the server 
    35  
    36 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     14LATMOS::Accounts::Bases::Sql::Nethost - A Network Host entry 
    3715 
    3816=cut 
     
    188166=head1 SEE ALSO 
    189167 
     168L<LATMOS::Accounts::Bases::Sql::Netzones>, L<LATMOS::Accounts::Bases::Sql> 
     169 
    190170=head1 AUTHOR 
    191171 
     
    194174=head1 COPYRIGHT AND LICENSE 
    195175 
    196 Copyright (C) 2008, 2009 CNRS SA/CETP/LATMOS 
     176Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
    197177 
    198178This library is free software; you can redistribute it and/or modify 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Netzone.pm

    r1014 r1023  
    1111=head1 NAME 
    1212 
    13 LATMOS::Ad - Perl extension for blah blah blah 
    14  
    15 =head1 SYNOPSIS 
    16  
    17   use LATMOS::Accounts::Bases; 
    18   my $base = LATMOS::Accounts::Bases->new('sql'); 
    19   ... 
     13LATMOS::Accounts::Bases::Sql::Netzone - Network management 
    2014 
    2115=head1 DESCRIPTION 
    2216 
    23 Account base access over standard unix file format. 
    24  
    25 =head1 FUNCTIONS 
    26  
    27 =cut 
    28  
    29 =head2 new(%options) 
    30  
    31 Create a new LATMOS::Ad object for windows AD $domain. 
    32  
    33 domain / server: either the Ad domain or directly the server 
    34  
    35 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     17The C<Netzone> object handle information for dns or dhcp management. 
    3618 
    3719=cut 
     
    194176=head1 SEE ALSO 
    195177 
     178L<LATMOS::Accounts::Bases::Sql> 
     179L<LATMOS::Accounts::Bases::Sql::Nethost> 
     180 
    196181=head1 AUTHOR 
    197182 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/OCHelper/Accreq.pm

    r1012 r1023  
    55=head1 NAME 
    66 
    7     LATMOS::Accounts::Bases::Sql::OCHelper::User - Helper to create accreq 
    8     object 
     7LATMOS::Accounts::Bases::Sql::OCHelper::User - Helper to create accreq 
     8object 
    99 
    1010=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Onlyaddress.pm

    r1014 r1023  
    77 
    88our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     9 
     10=head1 NAME 
     11 
     12LATMOS::Accounts::Bases::Sql::Onlyaddress - Secondary office Address support SQL base 
     13 
     14=head1 DESCRIPTION 
     15 
     16This module handle object for office address, allowing to support multiple 
     17address per people. 
     18 
     19=cut 
    920 
    1021sub list { 
     
    7889 
    79901; 
     91 
     92__END__ 
     93 
     94=head1 SEE ALSO 
     95 
     96L<LATMOS::Accounts::Bases::Sql> 
     97 
     98L<LATMOS::Accounts::Bases::Sql::Address> 
     99 
     100=head1 AUTHOR 
     101 
     102Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     103 
     104=head1 COPYRIGHT AND LICENSE 
     105 
     106Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 
     107 
     108This library is free software; you can redistribute it and/or modify 
     109it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     110at your option, any later version of Perl 5 you may have available. 
     111 
     112=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Revaliases.pm

    r1014 r1023  
    7272=head1 SEE ALSO 
    7373 
     74L<LATMOS::Accounts::Bases::Sql::Aliases>, L<LATMOS::Accounts::Bases::Sql>  
     75 
    7476=head1 AUTHOR 
    7577 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Site.pm

    r1014 r1023  
    1111=head1 NAME 
    1212 
    13 LATMOS::Ad - Perl extension for blah blah blah 
    14  
    15 =head1 SYNOPSIS 
    16  
    17   use LATMOS::Accounts::Bases; 
    18   my $base = LATMOS::Accounts::Bases->new('sql'); 
    19   ... 
     13LATMOS::Accounts::Bases::Sql::Site - Common Location/Address object 
    2014 
    2115=head1 DESCRIPTION 
    2216 
    23 Account base access over standard unix file format. 
    24  
    25 =head1 FUNCTIONS 
    26  
    27 =cut 
    28  
    29 =head2 new(%options) 
    30  
    31 Create a new LATMOS::Ad object for windows AD $domain. 
    32  
    33 domain / server: either the Ad domain or directly the server 
    34  
    35 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     17Store common to many people office address (typically building location). 
    3618 
    3719=cut 
     
    8668=head1 SEE ALSO 
    8769 
     70L<LATMOS::Accounts::Bases::Sql> 
     71 
    8872=head1 AUTHOR 
    8973 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Sutype.pm

    r1014 r1023  
    1111=head1 NAME 
    1212 
    13 LATMOS::Ad - Perl extension for blah blah blah 
    14  
    15 =head1 SYNOPSIS 
    16  
    17   use LATMOS::Accounts::Bases; 
    18   my $base = LATMOS::Accounts::Bases->new('sql'); 
    19   ... 
     13LATMOS::Accounts::Bases::Sql::Sutype - Structural type 
    2014 
    2115=head1 DESCRIPTION 
    2216 
    23 Account base access over standard unix file format. 
    24  
    25 =head1 FUNCTIONS 
    26  
    27 =cut 
    28  
    29 =head2 new(%options) 
    30  
    31 Create a new LATMOS::Ad object for windows AD $domain. 
    32  
    33 domain / server: either the Ad domain or directly the server 
    34  
    35 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     17Type for groups. 
    3618 
    3719=cut 
     
    4931=head1 SEE ALSO 
    5032 
     33L<LATMOS::Accounts::Bases::Sql> 
     34 
    5135=head1 AUTHOR 
    5236 
     
    5539=head1 COPYRIGHT AND LICENSE 
    5640 
    57 Copyright (C) 2008, 2009 CNRS SA/CETP/LATMOS 
     41Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
    5842 
    5943This library is free software; you can redistribute it and/or modify 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1015 r1023  
    1414=head1 NAME 
    1515 
    16 LATMOS::Ad - Perl extension for blah blah blah 
    17  
    18 =head1 SYNOPSIS 
    19  
    20   use LATMOS::Accounts::Bases; 
    21   my $base = LATMOS::Accounts::Bases->new('unix'); 
    22   ... 
    23  
    24 =head1 DESCRIPTION 
    25  
    26 Account base access over standard unix file format. 
    27  
    28 =cut 
    29  
    30 =head1 FUNCTIONS 
    31  
    32 =cut 
    33  
    34 =head2 new(%options) 
    35  
    36 Create a new LATMOS::Ad object for windows AD $domain. 
    37  
    38 domain / server: either the Ad domain or directly the server 
    39  
    40 ldap_args is an optionnal list of arguments to pass to L<Net::LDAP>. 
     16LATMOS::Accounts::Bases::Sql::objects - Parent class for SQL object 
    4117 
    4218=cut 
     
    242218} 
    243219 
     220=head2 db 
     221 
     222Return reference to L<DBI> object. 
     223 
     224=cut 
     225 
    244226sub db { 
    245227    return $_[0]->base->db; 
    246228} 
    247229 
    248 sub quote__object_table { 
     230sub _quote_object_table { 
    249231    my ($self) = @_; 
    250232    my $table = $self->_object_table or return; 
    251233    $self->db->quote_identifier($table); 
    252234} 
    253 sub quote__key_field {  
     235sub _quote_key_field { 
    254236    my ($self) = @_; 
    255237    my $key_field = $self->_key_field or return; 
     
    268250            q{select %s from %s where %s = ?}, 
    269251            $self->db->quote_identifier(lc($field)), 
    270             $self->quote__object_table, 
    271             $self->quote__key_field, 
     252            $self->_quote_object_table, 
     253            $self->_quote_key_field, 
    272254        ) 
    273255    ); 
     
    332314            sprintf( 
    333315                q{update %s set %s where %s = ?}, 
    334                 $self->quote__object_table, 
     316                $self->_quote_object_table, 
    335317                join(', ', @fields), 
    336                 $self->quote__key_field, 
     318                $self->_quote_key_field, 
    337319            ) 
    338320        ); 
     
    616598} 
    617599 
     600=head2 register_attribute 
     601 
     602Register attribute into base 
     603 
     604=cut 
     605 
    618606sub register_attribute { 
    619607    my ($class, $base, $attribute, $comment) = @_; 
     
    632620} 
    633621 
     622=head2 is_registered_attribute ($base, $attribute) 
     623 
     624Return true is attribute is registered into base 
     625 
     626=cut 
     627 
    634628sub is_registered_attribute { 
    635629    my ($class, $base, $attribute) = @_; 
     
    645639    return $res ? 1 : 0; 
    646640} 
     641 
     642=head2 get_attribute_comment $base, $attribute) 
     643 
     644Return comment for C<$attribute> 
     645 
     646=cut 
     647 
     648# TODO: get_attribute_comment($attr, $base) { $base ||= $self->base ... 
    647649 
    648650sub get_attribute_comment { 
     
    667669} 
    668670 
     671=head2 set_attribute_comment ($base, $attribute, $comment) 
     672 
     673Set comment to attribute 
     674 
     675=cut 
     676 
    669677sub set_attribute_comment { 
    670678    my ($class, $base, $attribute, $comment) = @_; 
     
    697705=head1 SEE ALSO 
    698706 
     707L<LATMOS::Accounts::Bases::Sql> 
     708 
     709L<LATMOS::Accounts::Bases::Objects> 
     710 
    699711=head1 AUTHOR 
    700712 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Unix/User.pm

    r965 r1023  
    145145=head1 SEE ALSO 
    146146 
     147L<LATMOS::Accounts::Base::Unix> 
     148 
    147149=head1 AUTHOR 
    148150 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/BuildNet.pm

    r921 r1023  
    1515use Net::IPv4Addr; 
    1616use Net::IPv6Addr; 
     17 
     18=head1 NAME 
     19 
     20LATMOS::Accounts::BuildNet - Generate config file from C<Netzone> Object 
     21 
     22=head1 DESCRIPTION 
     23 
     24This contains functions to generate network config file from C<Netzone> and 
     25C<Nethost> object. 
     26 
     27These config file can be: 
     28 
     29=over 4 
     30 
     31=item DNS zone files 
     32 
     33A standard DNS zone generated from a header and entries found in bases 
     34 
     35=item DNS reverse zone files 
     36 
     37A reverse DNS zone genarated from a header and entries found in bases 
     38 
     39=item A DHCP host list 
     40 
     41A file well formated host list to be included in dhcpd config file. 
     42 
     43=back 
     44 
     45=cut 
    1746 
    1847sub _base { 
     
    4675} 
    4776 
    48 sub write_state_file { 
     77sub _write_state_file { 
    4978    la_log(LA_DEBUG, "Writting status file"); 
    5079    $_[0]->_bnet_state->RewriteConfig; 
    5180} 
     81 
     82=head2 gen_all 
     83 
     84Generate all zone file found in base 
     85 
     86=cut 
    5287 
    5388sub gen_all { 
     
    125160} 
    126161 
     162=head2 get_zone_rev ($zone) 
     163 
     164Return next zone revision (DNS). 
     165 
     166This revision is formated from date + incremental serial number. If day change, 
     167serial start to 1. If serial goes goes over 99, head build from date is 
     168increment. 
     169 
     170The code ensure returned number is always highter that current one. 
     171 
     172=cut 
     173 
    127174sub get_zone_rev { 
    128175    my ($self, $ozone) = @_; 
     
    197244    return $textzone; 
    198245} 
     246 
     247=head2 gen_zone($zone, $header) 
     248 
     249Generate zone file C<$zone> with header C<$header> 
     250 
     251=cut 
     252 
     253# TODO what is $header 
    199254 
    200255sub gen_zone { 
     
    241296            $ozone->id, 'dbrev', 
    242297            scalar(localtime)); 
    243         $self->write_state_file; 
     298        $self->_write_state_file; 
    244299 
    245300    } else { 
     
    682737 
    6837381; 
     739 
     740__END__ 
     741 
     742=head1 AUTHOR 
     743 
     744Olivier Thauvin, E<lt>olivier.thauvin@aerov.jussieu.frE<gt> 
     745 
     746=head1 COPYRIGHT AND LICENSE 
     747 
     748Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     749 
     750This library is free software; you can redistribute it and/or modify 
     751it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     752at your option, any later version of Perl 5 you may have available. 
     753 
     754=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Cli.pm

    r861 r1023  
    1111use Getopt::Long; 
    1212 
     13=head1 NAME 
     14 
     15LATMOS::Accounts::Cli - Command line interface functions 
     16 
     17=head1 DESCRIPTION 
     18 
     19This module handle envirronment and functons for L<la-cli> tools. 
     20 
     21=cut 
     22 
    1323{ 
    1424    open (my $fh, "/dev/tty" ) 
     
    2333 
    2434my $trans_mode = 0; 
     35 
     36=head1 FUNCTIONS 
     37 
     38=cut 
     39 
     40=head2 globalenv 
     41 
     42Return the main envirronement object 
     43 
     44=cut 
    2545 
    2646sub globalenv { 
     
    219239    return $env 
    220240} 
     241 
     242=head2 objenv ($labase, $otype, @objs) 
     243 
     244Return a C<cli> envirronment over object. 
     245 
     246=cut 
    221247 
    222248sub objenv { 
     
    661687} 
    662688 
     689=head1 OBJECT FUNCTIONS 
     690 
     691=head2 new ($env, $labase) 
     692 
     693Create an envirronment object. 
     694 
     695C<$env> is functions descriptions. 
     696 
     697=cut 
     698 
    663699sub new { 
    664700    my ($class, $env, $labase) = @_; 
     
    722758} 
    723759 
     760=head2 base 
     761 
     762Return the attached base object. 
     763 
     764=cut 
     765 
    724766sub base { $_[0]->{_labase} } 
     767 
     768=head2 cli 
     769 
     770Start the main loop 
     771 
     772=cut 
    725773 
    726774sub cli { 
     
    741789} 
    742790 
     791=head2 prompt 
     792 
     793Wait user to input command 
     794 
     795=cut 
     796 
    743797sub prompt { 
    744798    my ($self) = @_; 
     
    750804} 
    751805 
     806=head2 add_func ($name, $param) 
     807 
     808Add new function in the envirronment 
     809 
     810=cut 
     811 
     812# TODO: hide this 
     813 
    752814sub add_func { 
    753815    my ($self, $name, $param) = @_; 
    754816    $self->{funcs}{$name} = $param; 
    755817} 
     818 
     819=head2 getoption ($opt, @args) 
     820 
     821Parse commmand line 
     822 
     823=cut 
     824 
     825# TODO: hide this 
    756826 
    757827sub getoption { 
     
    764834} 
    765835 
    766 sub parse_arg { 
     836# TODO: useless ? 
     837 
     838sub _parse_arg { 
    767839    my ($self, $name, @args) = @_; 
    768840    return @args; 
    769841} 
     842 
     843=head2 complete 
     844 
     845Return possible words according current entered words 
     846 
     847=cut 
    770848 
    771849sub complete { 
     
    777855        $self->complete($lastw, @{$self->{funcs}{$name}{alias}}, @args); 
    778856    } elsif ($self->{funcs}{$name}{completion}) { 
    779         my @pargs = $self->parse_arg($name, @args); 
     857        my @pargs = $self->_parse_arg($name, @args); 
    780858        return map { my $t = $_; $t =~ s/\s/\\ /g; $t } grep { $_ && /^\Q$lastw\E/ } $self->{funcs}{$name}{completion}->($self, $lastw, @pargs); 
    781859    } else { 
     
    783861    } 
    784862} 
     863 
     864=head2 run ($name, @args) 
     865 
     866Run functions 
     867 
     868=cut 
    785869 
    786870sub run { 
     
    792876        $self->run(@{$self->{funcs}{$name}{alias}}, @args); 
    793877    } elsif ($self->{funcs}{$name}{code}) { 
    794         my @pargs = $self->parse_arg($name, @args); 
     878        my @pargs = $self->_parse_arg($name, @args); 
    795879        $self->{funcs}{$name}{code}->($self, @args); 
    796880    } else { 
     
    798882    } 
    799883} 
     884 
     885=head2 commit 
     886 
     887Call commit to base unelss in transaction mode 
     888 
     889=cut 
    800890 
    801891sub commit { 
     
    812902} 
    813903 
     904=head2 rollback 
     905 
     906Perform rollback unless in transaction mode 
     907 
     908=cut 
     909 
    814910sub rollback { 
    815911    my ($self) = @_; 
     
    826922 
    8279231; 
     924 
     925__END__ 
     926 
     927=head1 SEE ALSO 
     928 
     929L<LATMOS::Accounts> 
     930 
     931=head1 AUTHOR 
     932 
     933Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     934 
     935=head1 COPYRIGHT AND LICENSE 
     936 
     937Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     938 
     939This library is free software; you can redistribute it and/or modify 
     940it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     941at your option, any later version of Perl 5 you may have available. 
     942 
     943=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Maintenance.pm

    r1014 r1023  
    1010 
    1111    LATMOS::Accounts::Maintenance 
     12 
     13=head1 FUNCTIONS 
    1214 
    1315=cut 
     
    2022    return $self->{_maintenance_base} = $base 
    2123} 
     24 
     25=head2 find_next_expire_users ($expire) 
     26 
     27Return The list of users going to expire in C<$expire> delay. 
     28 
     29=cut 
    2230 
    2331sub find_next_expire_users { 
     
    155163} 
    156164 
     165=head2 find_expired_users ($expire) 
     166 
     167See L<LATMOS::Accounts::Base/find_expired_users> 
     168 
     169=cut 
     170 
    157171sub find_expired_users { 
    158172    my ($self, $expire) = @_; 
    159173    $self->_base->find_expired_users($expire); 
    160174} 
     175 
     176=head2 expired_account_reminder ( %options) 
     177 
     178Search account expired for more than C<$options{delay}> (default is 6 month) 
     179send mail to manager and summary to admin to aknoledge destruction. 
     180 
     181=cut 
    161182 
    162183sub expired_account_reminder { 
     
    240261 
    2412621; 
     263 
     264__END__ 
     265 
     266=head1 SEE ALSO 
     267 
     268L<LATMOS::Accounts::Bases> 
     269 
     270=head1 AUTHOR 
     271 
     272Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     273 
     274=head1 COPYRIGHT AND LICENSE 
     275 
     276Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 
     277 
     278This library is free software; you can redistribute it and/or modify 
     279it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     280at your option, any later version of Perl 5 you may have available. 
     281 
     282=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm

    r1017 r1023  
    55use LATMOS::Accounts::Log; 
    66use LATMOS::Accounts; 
     7 
     8=head1 NAME 
     9 
     10LATMOS::Accounts::SyncManager - Routine task manager 
     11 
     12=head1 DESCRIPTION 
     13 
     14Handle Task process run by L<la-sync-manager> 
     15 
     16=head1 FUNCTIONS 
     17 
     18=cut 
     19 
     20=head2 new($config) 
     21 
     22Instaciate object.  
     23 
     24C<$config> is a path to an alternative configuration file to default one. 
     25 
     26=cut 
    727 
    828sub new { 
     
    2444} 
    2545 
     46=head2 ini 
     47 
     48Return a reference to the L<Ini::Files> object handling configuration. 
     49 
     50=cut 
     51 
    2652sub ini { $_[0]->{ini} } 
    2753 
     54=head2 dbrev 
     55 
     56Return the current base revision 
     57 
     58=cut 
     59 
    2860sub dbrev { $_[0]->{lastrev} } 
     61 
     62=head2 updrev 
     63 
     64Update status file with with current base revision as restart point 
     65 
     66=cut 
    2967 
    3068sub updrev { 
     
    3775} 
    3876 
     77=head2 list_modules 
     78 
     79List configured task module 
     80 
     81=cut 
     82 
    3983sub list_modules { 
    4084    my ($self) = @_; 
    4185    $self->ini->Sections; 
    4286} 
     87 
     88=head2 process_module($module, $dbrev) 
     89 
     90Process C<$module>. 
     91 
     92=cut 
     93 
     94# TODO what is $dbrev, why is it need here ?? 
    4395 
    4496sub process_module { 
     
    90142 
    911431; 
     144 
     145__END__ 
     146 
     147=head1 SEE ALSO 
     148 
     149L<LATMOS::Accountsi::Task> 
     150 
     151=head1 AUTHOR 
     152 
     153Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     154 
     155=head1 COPYRIGHT AND LICENSE 
     156 
     157Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     158 
     159This library is free software; you can redistribute it and/or modify 
     160it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     161at your option, any later version of Perl 5 you may have available. 
     162 
     163=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SynchAccess.pm

    r619 r1023  
    88 
    99our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::SynchAccess 
     14 
     15=head1 FUNCTIONS 
     16 
     17=cut  
     18 
     19# TODO WTF is difference with LATMOS::Accounts::SynchAccess::base 
     20 
     21=head2 get_object ($otype, $uid) 
     22 
     23Compatibility function: return a set of object for which action must be done. 
     24 
     25=cut 
    1026 
    1127sub get_object { 
     
    3349 
    3450__END__ 
     51 
     52=head1 AUTHOR 
     53 
     54Olivier Thauvin, E<lt>olivier.thauvin@aerov.jussieu.frE<gt> 
     55 
     56=head1 COPYRIGHT AND LICENSE 
     57 
     58Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     59 
     60This library is free software; you can redistribute it and/or modify 
     61it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     62at your option, any later version of Perl 5 you may have available. 
     63 
     64=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SynchAccess/Objects.pm

    r56 r1023  
    77our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
    88 
     9=head1 NAME 
     10 
     11LATMOS::Accounts::SynchAccess::Object - Fake object for sync access 
     12 
     13=head1 DESCRIPTION 
     14 
     15This module fake an object to send same actions tu multiple base. This is 
     16used for actions basic synchronisation process cannot handle. 
     17 
     18=cut 
     19 
    9201; 
    1021 
    1122__END__ 
     23 
     24=head1 SEE ALSO 
     25 
     26L<LATMOS::Accounts>, L<LATMOS::Accounts::Bases> 
     27 
     28=head1 AUTHOR 
     29 
     30Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     31 
     32=head1 COPYRIGHT AND LICENSE 
     33 
     34Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     35 
     36This library is free software; you can redistribute it and/or modify 
     37it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     38at your option, any later version of Perl 5 you may have available. 
     39 
     40=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SynchAccess/base.pm

    r861 r1023  
    88 
    99our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::SynchAccess::base - Fake base object for sync access 
     14 
     15=head1 DESCRIPTION 
     16 
     17This module fake a base object to send same actions tu multiple base. This is 
     18used for actions basic synchronisation process cannot handle. 
     19 
     20=head1 FUNCTIONS 
     21 
     22=cut 
    1023 
    1124sub AUTOLOAD { 
     
    2134} 
    2235 
     36=head2 new( \@bases ) 
     37 
     38Create a new SynchAccess instance over given bases 
     39 
     40=cut 
     41 
    2342sub new { 
    2443    my ($class, $bases) = @_; 
     
    2746    }, $class; 
    2847} 
     48 
     49=head2 bases 
     50 
     51Return lists of bases in ths instance. 
     52 
     53=cut 
    2954 
    3055sub bases { 
     
    77102 
    78103__END__ 
     104 
     105=head1 SEE ALSO 
     106 
     107L<LATMOS::Accounts>, L<LATMOS::Accounts::Bases> 
     108 
     109=head1 AUTHOR 
     110 
     111Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     112 
     113=head1 COPYRIGHT AND LICENSE 
     114 
     115Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     116 
     117This library is free software; you can redistribute it and/or modify 
     118it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     119at your option, any later version of Perl 5 you may have available. 
     120 
     121=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm

    r861 r1023  
    8080} 
    8181 
     82=head2 name 
     83 
     84Return the name of this synchronisation 
     85 
     86=cut 
     87 
    8288sub name { 
    8389    $_[0]->{options}{name} 
    8490} 
    8591 
     92=head2 from 
     93 
     94Return the base object source for this synchronisation 
     95 
     96=cut 
     97 
    8698sub from { 
    8799    my ($self) = @_; 
    88100    return $self->{from} 
    89101} 
     102 
     103=head2 to 
     104 
     105Return the list of base destination for this synchronisation 
     106 
     107=cut 
    90108 
    91109sub to { 
     
    116134    return $unloaded; 
    117135} 
     136 
     137=head2 enter_synch_mode 
     138 
     139Configure base for synchronisation 
     140 
     141=cut 
    118142 
    119143sub enter_synch_mode { 
     
    135159} 
    136160 
     161=head2 leave_synch_mode (%state) 
     162 
     163Retore base to previous state 
     164 
     165=cut 
     166 
    137167sub leave_synch_mode { 
    138168    my ($self, %state) = @_; 
     
    144174    } 
    145175} 
     176 
     177=head2 lock 
     178 
     179Create a lock to denied another synchronisation to run 
     180 
     181=cut 
    146182 
    147183sub lock { 
     
    161197} 
    162198 
     199=head2 unlock 
     200 
     201Remove lock 
     202 
     203=cut 
     204 
    163205sub unlock { 
    164206    my ($self) = @_; 
     
    172214    return; 
    173215} 
     216 
     217=head2 sync_object ($otype, $uid, %options) 
     218 
     219Synchronise object type C<$otype> named C<$uid> 
     220 
     221=cut 
    174222 
    175223sub sync_object { 
     
    202250    } 
    203251} 
     252 
     253=head2 process 
     254 
     255Run the syncronisation 
     256 
     257=cut 
    204258 
    205259sub process { 
     
    314368} 
    315369 
     370=head2 write_status 
     371 
     372Write savepoint file 
     373 
     374=cut 
     375 
    316376sub write_status { 
    317377    my ($self) = @_; 
     
    331391    return 0; 
    332392} 
     393 
     394=head2 run_pre_synchro 
     395 
     396Run task done before synchronisation 
     397 
     398=cut 
    333399 
    334400sub run_pre_synchro { 
     
    360426} 
    361427 
     428=head2 run_post_synchro 
     429 
     430Run task done after synchronisation 
     431 
     432=cut 
     433 
    362434sub run_post_synchro { 
    363435    my ($self, $env) = @_; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Automatedrequest.pm

    r987 r1023  
    88use LATMOS::Accounts::Log; 
    99use LATMOS::Accounts::Utils; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::Task::Automatedrequest - Task responsible of automatic request 
     14validation 
     15 
     16=cut 
    1017 
    1118sub init { 
     
    3845 
    39461; 
     47 
     48__END__ 
     49 
     50=head1 SEE ALSO 
     51 
     52L<LATMOS::Accounts::Bases::Sql>, L<LATMOS::Accounts::Bases::Sql::DataRequest> 
     53 
     54=head1 AUTHOR 
     55 
     56Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     57 
     58=head1 COPYRIGHT AND LICENSE 
     59 
     60Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     61 
     62This library is free software; you can redistribute it and/or modify 
     63it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     64at your option, any later version of Perl 5 you may have available. 
     65 
     66=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Basessynchro.pm

    r861 r1023  
    66use LATMOS::Accounts; 
    77use LATMOS::Accounts::Log; 
     8 
     9=head1 NAME 
     10 
     11LATMOS::Accounts::Task::Basessynchro - Synchronize bases 
     12 
     13=head1 DESCRIPTION 
     14 
     15This module is responsible of the copy of object from main base to others 
     16 
     17=cut 
    818 
    919sub run { 
     
    3848 
    39491; 
     50 
     51=head1 SEE ALSO 
     52 
     53L<LATMOS::Accounts>, L<LATMOS::Accounts::Bases> 
     54 
     55=head1 AUTHOR 
     56 
     57Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     58 
     59=head1 COPYRIGHT AND LICENSE 
     60 
     61Copyright (C) 2008, 2009 CNRS SA/CETP/LATMOS 
     62 
     63This library is free software; you can redistribute it and/or modify 
     64it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     65at your option, any later version of Perl 5 you may have available. 
     66 
     67=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildlistes.pm

    r861 r1023  
    88use LATMOS::Accounts::Log; 
    99use LATMOS::Accounts::Utils; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::Task::Buildlistes - Task to generate list of mail address 
     14usable by mail robot such as mailman. 
     15 
     16=head1 DESCRITPTION 
     17 
     18This module is designed to automatically build mailing list members file. The 
     19configuration is handle by F<la-sync-list.ini> file. 
     20 
     21=cut 
    1022 
    1123sub init { 
     
    148160 
    1491611; 
     162 
     163=head1 SEE ALSO 
     164 
     165Configuraiton file: L<la-sync-list.ini> 
     166 
     167L<LATMOS::Accounts::Task> 
     168 
     169=head1 AUTHOR 
     170 
     171Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     172 
     173=head1 COPYRIGHT AND LICENSE 
     174 
     175Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     176 
     177This library is free software; you can redistribute it and/or modify 
     178it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     179at your option, any later version of Perl 5 you may have available. 
     180 
     181=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildnet.pm

    r861 r1023  
    55use base qw(LATMOS::Accounts::Task); 
    66use LATMOS::Accounts::BuildNet; 
     7 
     8=head1 NAME 
     9 
     10LATMOS::Accounts::Task::Buildnet - Task to generate network configuration files 
     11 
     12=cut 
    713 
    814# Always try because depend also on files: 
     
    2228 
    23291; 
     30 
     31__END__ 
     32 
     33=head1 SEE ALSO 
     34 
     35L<LATMOS::Accounts::Task>, L<LATMOS::Accounts::BuildNet> 
     36 
     37=head1 AUTHOR 
     38 
     39Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     40 
     41=head1 COPYRIGHT AND LICENSE 
     42 
     43Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     44 
     45This library is free software; you can redistribute it and/or modify 
     46it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     47at your option, any later version of Perl 5 you may have available. 
     48 
     49=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Dummy.pm

    r861 r1023  
    44use warnings; 
    55use base qw(LATMOS::Accounts::Task); 
     6 
     7=head1 NAME 
     8 
     9LATMOS::Accounts::Task::Dummy - A "do nothing" task for testing purpose 
     10 
     11=head1 DESCRIPTION 
     12 
     13When setup in L<la-sync-manager> this task simulate an activity by waiting 2 
     14seconds and just exit successfully.  
     15 
     16=cut 
    617 
    718sub run { 
     
    1122 
    12231; 
     24 
     25=head1 SEE ALSO 
     26 
     27L<LATMOS::Accounts::Task> 
     28 
     29=head1 AUTHOR 
     30 
     31Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     32 
     33=head1 COPYRIGHT AND LICENSE 
     34 
     35Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     36 
     37This library is free software; you can redistribute it and/or modify 
     38it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     39at your option, any later version of Perl 5 you may have available. 
     40 
     41=cut 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Refreshexpired.pm

    r861 r1023  
    88use LATMOS::Accounts::Log; 
    99use LATMOS::Accounts::Utils; 
     10 
     11=head1 NAME 
     12 
     13LATMOS::Accounts::Task::Refreshexpired - Task to disable expired users 
     14 
     15=head1 DESCRIPTION 
     16 
     17Some base doesn't handle accounts expiration. One way to do it is to synchronize 
     18user with value denying login (wrong UNIX shell, password entry set to false, 
     19...). 
     20 
     21For performance issue, objects are not written at each synchronisation, only 
     22when they changes. 
     23 
     24This module find expired user and refresh modification time to ensure 
     25propagation to other database. 
     26 
     27=cut 
    1028 
    1129sub init { 
     
    4967 
    50681; 
     69 
     70__END__ 
     71 
     72=head1 SEE ALSO 
     73 
     74L<LATMOS::Accounts>, L<LATMOS::Accounts::Task> 
     75 
     76=head1 AUTHOR 
     77 
     78Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     79 
     80=head1 COPYRIGHT AND LICENSE 
     81 
     82Copyright (C) 2012 CNRS SA/CETP/LATMOS 
     83 
     84This library is free software; you can redistribute it and/or modify 
     85it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     86at your option, any later version of Perl 5 you may have available. 
     87 
     88=cut 
     89 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Utils.pm

    r959 r1023  
    1111our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
    1212 
     13=head1 NAME 
     14 
     15LATMOS::Accounts::Utils - Utils functions 
     16 
     17=head1 FUNCTIONS 
     18 
     19=cut 
     20 
    1321@ISA = qw(Exporter); 
    1422@EXPORT = qw(to_ascii exec_command switch_user run_via_sudo); 
    1523@EXPORT_OK = qw(to_ascii exec_command switch_user run_via_sudo); 
     24 
     25=head2 to_ascii($text) 
     26 
     27Replace in C<$text> non ascii caracters from iso-8859-15 table to ascii 
     28equivalent caracter. 
     29 
     30=cut 
    1631 
    1732sub to_ascii { 
     
    2641    $text 
    2742}  
     43 
     44=head2 exec_command($command, $env) 
     45 
     46Execute C<$command> and redirect output to log system. 
     47 
     48C<$env> is a hashref containing environment variable to set, all variables are 
     49prefixed by 'LA_'. 
     50 
     51=cut 
    2852 
    2953sub exec_command { 
     
    80104} 
    81105 
     106=head2 parse_obj_file($handle) 
     107 
     108Read file content from C<$handle> and return hash containing parsed attributes 
     109 
     110=cut 
     111 
    82112sub parse_obj_file { 
    83113    my ($handle) = @_; 
     
    107137} 
    108138 
     139=head2 dump_read_temp_file($writecb, $readcb) 
     140 
     141Create a temporary file, call C<$writecb()> function, run editor and if file get 
     142modified call C<$readcb>. 
     143 
     144=cut 
     145 
    109146sub dump_read_temp_file { 
    110147    my ($writecb, $readcb) = @_; 
     
    137174} 
    138175 
     176=head2 check_oid_validity($name) 
     177 
     178Check C<$name> is suitable to be used as object identifier. Return the error 
     179text, undef if no error. 
     180 
     181=cut 
     182 
    139183sub check_oid_validity { 
    140184    my ($name) = @_; 
     
    145189    return; 
    146190} 
     191 
     192=head2 check_ug_validity($name) 
     193 
     194Check C<$name> is suitable to used as user or group identifier. 
     195 
     196=cut 
    147197 
    148198sub check_ug_validity { 
     
    157207    return check_oid_validity($name); 
    158208} 
     209 
     210=head2 switch_user($runas) 
     211 
     212Switch effective id of the process to user named C<$runas> 
     213 
     214=cut 
    159215 
    160216sub switch_user { 
     
    173229} 
    174230 
     231=head2 run_via_sudo($runas) 
     232 
     233Rerun current programme as C<$runas> user using sudo 
     234 
     235=cut 
     236 
    175237sub run_via_sudo { 
    176238    my ($runas) = @_; 
     
    186248 
    1872491; 
     250 
     251__END__ 
     252 
     253=head1 SEE ALSO 
     254 
     255L<sudo> 
     256 
     257=head1 AUTHOR 
     258 
     259Olivier Thauvin, E<lt>olivier.thauvin@aerov.jussieu.frE<gt> 
     260 
     261=head1 COPYRIGHT AND LICENSE 
     262 
     263Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS 
     264 
     265This library is free software; you can redistribute it and/or modify 
     266it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     267at your option, any later version of Perl 5 you may have available. 
     268 
     269=cut 
Note: See TracChangeset for help on using the changeset viewer.