1 | package LATMOS::Accounts::Bases; |
---|
2 | |
---|
3 | use 5.010000; |
---|
4 | use strict; |
---|
5 | use warnings; |
---|
6 | use LATMOS::Accounts::Bases::Objects; |
---|
7 | |
---|
8 | our $VERSION = (q$Rev$ =~ /$Rev: (\d+) /)[0]; |
---|
9 | |
---|
10 | sub new { |
---|
11 | my ($class, $type, %options) = @_; |
---|
12 | |
---|
13 | my $pclass = ucfirst(lc($type)); |
---|
14 | eval "require LATMOS::Accounts::Bases::$pclass;"; |
---|
15 | if ($@) { return } # error message ? |
---|
16 | return "LATMOS::Accounts::Bases::$pclass"->new(%options); |
---|
17 | } |
---|
18 | |
---|
19 | sub get_object { |
---|
20 | my ($self, $otype, $id) = @_; |
---|
21 | |
---|
22 | return LATMOS::Accounts::Bases::Objects->new($self, $otype, $id); |
---|
23 | } |
---|
24 | |
---|
25 | |
---|
26 | # Preloaded methods go here. |
---|
27 | |
---|
28 | 1; |
---|
29 | __END__ |
---|
30 | # Below is stub documentation for your module. You'd better edit it! |
---|
31 | |
---|
32 | =head1 NAME |
---|
33 | |
---|
34 | LATMOS::Accounts::Bases - Perl extension for blah blah blah |
---|
35 | |
---|
36 | =head1 SYNOPSIS |
---|
37 | |
---|
38 | use LATMOS::Accounts::Bases; |
---|
39 | blah blah blah |
---|
40 | |
---|
41 | =head1 DESCRIPTION |
---|
42 | |
---|
43 | Stub documentation for LATMOS::Accounts, created by h2xs. It looks like the |
---|
44 | author of the extension was negligent enough to leave the stub |
---|
45 | unedited. |
---|
46 | |
---|
47 | Blah blah blah. |
---|
48 | |
---|
49 | =head2 EXPORT |
---|
50 | |
---|
51 | None by default. |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | =head1 SEE ALSO |
---|
56 | |
---|
57 | Mention other useful documentation such as the documentation of |
---|
58 | related modules or operating system documentation (such as man pages |
---|
59 | in UNIX), or any relevant external documentation such as RFCs or |
---|
60 | standards. |
---|
61 | |
---|
62 | If you have a mailing list set up for your module, mention it here. |
---|
63 | |
---|
64 | If you have a web site set up for your module, mention it here. |
---|
65 | |
---|
66 | =head1 AUTHOR |
---|
67 | |
---|
68 | Thauvin Olivier, E<lt>olivier@localdomainE<gt> |
---|
69 | |
---|
70 | =head1 COPYRIGHT AND LICENSE |
---|
71 | |
---|
72 | Copyright (C) 2009 by Thauvin Olivier |
---|
73 | |
---|
74 | This library is free software; you can redistribute it and/or modify |
---|
75 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
---|
76 | at your option, any later version of Perl 5 you may have available. |
---|
77 | |
---|
78 | |
---|
79 | =cut |
---|