Last change
on this file since 1315 was
1023,
checked in by nanardon, 12 years ago
|
This patch a basic documentation to all functions.
It also add two test to ensure all POD syntax are correct and coverage is full.
|
-
Property svn:keywords set to
Id Rev
|
File size:
1.4 KB
|
Line | |
---|
1 | package LATMOS::Accounts::SynchAccess; |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | use base qw(LATMOS::Accounts::SynchAccess::base); |
---|
6 | use LATMOS::Accounts::SynchAccess::Objects; |
---|
7 | use LATMOS::Accounts::Log; |
---|
8 | |
---|
9 | our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; |
---|
10 | |
---|
11 | =head1 NAME |
---|
12 | |
---|
13 | LATMOS::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 | |
---|
23 | Compatibility function: return a set of object for which action must be done. |
---|
24 | |
---|
25 | =cut |
---|
26 | |
---|
27 | sub get_object { |
---|
28 | my ($self, $otype, $uid) = @_; |
---|
29 | my @subobj; |
---|
30 | foreach ($self->bases) { |
---|
31 | if ($_->is_supported_object($otype)) { |
---|
32 | my $u = $_->get_object($otype, $uid) or do { |
---|
33 | la_log(LA_ERR, |
---|
34 | "Cannot get object $otype/$uid in %s/%s", |
---|
35 | $_->type, |
---|
36 | $_->label |
---|
37 | ); |
---|
38 | return; |
---|
39 | }; |
---|
40 | push(@subobj, $u); |
---|
41 | } |
---|
42 | } |
---|
43 | return LATMOS::Accounts::SynchAccess::Objects->new( |
---|
44 | [ @subobj ] |
---|
45 | ); |
---|
46 | } |
---|
47 | |
---|
48 | 1; |
---|
49 | |
---|
50 | __END__ |
---|
51 | |
---|
52 | =head1 AUTHOR |
---|
53 | |
---|
54 | Olivier Thauvin, E<lt>olivier.thauvin@aerov.jussieu.frE<gt> |
---|
55 | |
---|
56 | =head1 COPYRIGHT AND LICENSE |
---|
57 | |
---|
58 | Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS |
---|
59 | |
---|
60 | This library is free software; you can redistribute it and/or modify |
---|
61 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
---|
62 | at your option, any later version of Perl 5 you may have available. |
---|
63 | |
---|
64 | =cut |
---|
Note: See
TracBrowser
for help on using the repository browser.