Changeset 1018 for trunk/LATMOS-Accounts/lib/LATMOS
- Timestamp:
- 05/22/12 11:40:11 (12 years ago)
- Location:
- trunk/LATMOS-Accounts/lib/LATMOS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm
r1012 r1018 317 317 =head1 COPYRIGHT AND LICENSE 318 318 319 Copyright (C) 2009 by Thauvin Olivier319 Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 320 320 321 321 This library is free software; you can redistribute it and/or modify -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Log.pm
r1014 r1018 157 157 } 158 158 159 =head2 lastmessage($level) 160 161 Return the last message for C<$level> (LA_ERROR by default) 162 163 =cut 164 159 165 sub lastmessage { 160 166 my ($level) = @_; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task.pm
r983 r1018 4 4 use warnings; 5 5 use LATMOS::Accounts::Log; 6 7 =head1 NAME 8 9 LATMOS::Accounts::Task 10 11 =head1 DESCRIPTION 12 13 Parent class for regular task run by L<la-sync-manager> 14 15 =head1 FUNCTIONS 16 17 =head2 new($module, %options) 18 19 Instanciate a new task of type C<$module> 20 21 The module must provide a C<_new()> function. 22 23 =cut 6 24 7 25 sub new { … … 19 37 } 20 38 39 =head2 init 40 41 Call at task startup, can be overload 42 43 =cut 44 21 45 sub init { 22 46 return 1; 23 47 } 48 49 =head2 needupd($baserev, $syncm) 50 51 This function is to call to check if the module have to run or not. 52 53 C<$baserev> is the current base revision en C<$syncm> the revision when 54 la-sync-manager was run. 55 56 By default return true only if base has changed, overload for different 57 behavior. 58 59 =cut 24 60 25 61 sub needupd { … … 36 72 } 37 73 74 =head2 run 75 76 Must be provided by module, do the desired work. 77 78 =cut 79 38 80 sub run { 39 81 return 1; 40 82 } 83 84 =head2 post 85 86 Call after C<run()> 87 88 =cut 41 89 42 90 sub post { … … 44 92 45 93 1; 94 95 __END__ 96 97 =head1 SEE ALSO 98 99 L<LATMOS::Accounts::Sync> 100 101 =head1 AUTHOR 102 103 Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> 104 105 =head1 COPYRIGHT AND LICENSE 106 107 Copyright (C) 2009, 2010, 2011, 2012 by Thauvin Olivier 108 109 This library is free software; you can redistribute it and/or modify 110 it under the same terms as Perl itself, either Perl version 5.10.0 or, 111 at 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.