source: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Mail/Revaliases.pm

Last change on this file 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.

File size: 1.3 KB
RevLine 
[305]1package LATMOS::Accounts::Bases::Mail::Revaliases;
2
3use strict;
4use warnings;
5
6use base qw(LATMOS::Accounts::Bases::Mail::objects);
7use LATMOS::Accounts::Log;
8
[1023]9=head1 NAME
10
11LATMOS::Accounts::Bases::Mail::Revaliases - RevAliases support for Mail base.
12
13=cut
14
[305]15our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0];
16
17sub new {
18    my ($class, $base, $id, @args) = @_;
19    if (exists($base->{revaliases}{$id})) {
20        return bless({}, $class);
21    } else { return }
22}
23
[861]24sub _get_attr_schema {
25    my ($class, $base) = @_;
26    {
27        as => {},
[305]28    }
29}
30
31sub get_field {
32    my ($self, $field) = @_;
[351]33    $field eq 'as' and return $self->base->{revaliases}{$self->id};
[305]34    return
35}
36
37sub set_fields {
38    my ($self, %data) = @_;
39    if ($data{as}) {
40        $self->base->{revaliases}{$self->id} = $data{as};
41        return 1;
42    }
43    return
44}
45
461;
[1023]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
Note: See TracBrowser for help on using the repository browser.