source: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SynchAccess.pm @ 1315

Last change on this file since 1315 was 1023, checked in by nanardon, 12 years ago
  • 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.

  • Property svn:keywords set to Id Rev
File size: 1.4 KB
Line 
1package LATMOS::Accounts::SynchAccess;
2
3use strict;
4use warnings;
5use base qw(LATMOS::Accounts::SynchAccess::base);
6use LATMOS::Accounts::SynchAccess::Objects;
7use LATMOS::Accounts::Log;
8
9our $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
26
27sub 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
481;
49
50__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
Note: See TracBrowser for help on using the repository browser.