Last change
on this file 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.
|
File size:
1.3 KB
|
Line | |
---|
1 | package LATMOS::Accounts::Bases::Mail::Revaliases; |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | |
---|
6 | use base qw(LATMOS::Accounts::Bases::Mail::objects); |
---|
7 | use LATMOS::Accounts::Log; |
---|
8 | |
---|
9 | =head1 NAME |
---|
10 | |
---|
11 | LATMOS::Accounts::Bases::Mail::Revaliases - RevAliases support for Mail base. |
---|
12 | |
---|
13 | =cut |
---|
14 | |
---|
15 | our $VERSION = (q$Rev: 641 $ =~ /^Rev: (\d+) /)[0]; |
---|
16 | |
---|
17 | sub new { |
---|
18 | my ($class, $base, $id, @args) = @_; |
---|
19 | if (exists($base->{revaliases}{$id})) { |
---|
20 | return bless({}, $class); |
---|
21 | } else { return } |
---|
22 | } |
---|
23 | |
---|
24 | sub _get_attr_schema { |
---|
25 | my ($class, $base) = @_; |
---|
26 | { |
---|
27 | as => {}, |
---|
28 | } |
---|
29 | } |
---|
30 | |
---|
31 | sub get_field { |
---|
32 | my ($self, $field) = @_; |
---|
33 | $field eq 'as' and return $self->base->{revaliases}{$self->id}; |
---|
34 | return |
---|
35 | } |
---|
36 | |
---|
37 | sub 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 | |
---|
46 | 1; |
---|
47 | |
---|
48 | __END__ |
---|
49 | |
---|
50 | =head1 SEE ALSO |
---|
51 | |
---|
52 | L<LATMOS::Accounts::Bases::Mail> |
---|
53 | |
---|
54 | =head1 AUTHOR |
---|
55 | |
---|
56 | Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> |
---|
57 | |
---|
58 | =head1 COPYRIGHT AND LICENSE |
---|
59 | |
---|
60 | Copyright (C) 2008, 2009, 2010, 2011, 2012 CNRS SA/CETP/LATMOS |
---|
61 | |
---|
62 | This library is free software; you can redistribute it and/or modify |
---|
63 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
---|
64 | at 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.