Ignore:
Timestamp:
05/22/12 11:40:11 (12 years ago)
Author:
nanardon
Message:
  • fullfill documentation for L::A::Task and L::A::Log modules
Location:
trunk/LATMOS-Accounts/lib/LATMOS
Files:
3 edited

Legend:

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

    r1012 r1018  
    317317=head1 COPYRIGHT AND LICENSE 
    318318 
    319 Copyright (C) 2009 by Thauvin Olivier 
     319Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 
    320320 
    321321This library is free software; you can redistribute it and/or modify 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Log.pm

    r1014 r1018  
    157157} 
    158158 
     159=head2 lastmessage($level) 
     160 
     161Return the last message for C<$level> (LA_ERROR by default) 
     162 
     163=cut 
     164 
    159165sub lastmessage { 
    160166    my ($level) = @_; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task.pm

    r983 r1018  
    44use warnings; 
    55use LATMOS::Accounts::Log; 
     6 
     7=head1 NAME 
     8 
     9    LATMOS::Accounts::Task 
     10 
     11=head1 DESCRIPTION 
     12 
     13Parent class for regular task run by L<la-sync-manager> 
     14 
     15=head1 FUNCTIONS 
     16 
     17=head2 new($module, %options) 
     18 
     19Instanciate a new task of type C<$module> 
     20 
     21The module must provide a C<_new()> function. 
     22 
     23=cut 
    624 
    725sub new { 
     
    1937} 
    2038 
     39=head2 init 
     40 
     41Call at task startup, can be overload 
     42 
     43=cut 
     44 
    2145sub init { 
    2246    return 1; 
    2347} 
     48 
     49=head2 needupd($baserev, $syncm) 
     50 
     51This function is to call to check if the module have to run or not. 
     52 
     53C<$baserev> is the current base revision en C<$syncm> the revision when 
     54la-sync-manager was run. 
     55 
     56By default return true only if base has changed, overload for different 
     57behavior. 
     58 
     59=cut 
    2460 
    2561sub needupd { 
     
    3672} 
    3773 
     74=head2 run 
     75 
     76Must be provided by module, do the desired work. 
     77 
     78=cut 
     79 
    3880sub run { 
    3981    return 1; 
    4082} 
     83 
     84=head2 post 
     85 
     86Call after C<run()> 
     87 
     88=cut 
    4189 
    4290sub post { 
     
    4492 
    45931; 
     94 
     95__END__ 
     96 
     97=head1 SEE ALSO 
     98 
     99L<LATMOS::Accounts::Sync> 
     100 
     101=head1 AUTHOR 
     102 
     103Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 
     104 
     105=head1 COPYRIGHT AND LICENSE 
     106 
     107Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 
     108 
     109This library is free software; you can redistribute it and/or modify 
     110it under the same terms as Perl itself, either Perl version 5.10.0 or, 
     111at your option, any later version of Perl 5 you may have available. 
     112 
     113=cut 
Note: See TracChangeset for help on using the changeset viewer.