| 1 | #package ETLp::Role::Config; | ||
| 2 | |||
| 3 | use MooseX::Declare; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | ETLp::Role::Config - the basic configuration setting for ETLp | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | This role provides a wrapper around ETLp::Config. It's purpose | ||
| 12 | is top provide simple access to the configuration setting | ||
| 13 | |||
| 14 | =head1 METHODS | ||
| 15 | |||
| 16 | =head2 config | ||
| 17 | |||
| 18 | Return the application configuration hash | ||
| 19 | |||
| 20 | =head2 dbh | ||
| 21 | |||
| 22 | Return the database handle | ||
| 23 | |||
| 24 | =head2 logger | ||
| 25 | |||
| 26 | Return the Log4perl logger | ||
| 27 | |||
| 28 | =head2 audit | ||
| 29 | |||
| 30 | Return the job auditer (ETLp::Audit::Job object) | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | role ETLp::Role::Config { | ||
| 35 | use ETLp::Config; | ||
| 36 | |||
| 37 | #method config { | ||
| 38 | # return ETLp::Config->config; | ||
| 39 | #} | ||
| 40 | |||
| 41 | method audit { | ||
| 42 | return ETLp::Config->audit; | ||
| 43 | } | ||
| 44 | |||
| 45 | method dbh { | ||
| 46 | return ETLp::Config->dbh; | ||
| 47 | } | ||
| 48 | |||
| 49 | method logger { | ||
| 50 | return ETLp::Config->logger; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | =head1 LICENSE AND COPYRIGHT | ||
| 55 | |||
| 56 | Copyright 2010 Redbone Systems Ltd | ||
| 57 | |||
| 58 | This program is free software; you can redistribute it and/or modify it | ||
| 59 | under the terms of either: the GNU General Public License as published | ||
| 60 | by the Free Software Foundation; or the Artistic License. | ||
| 61 | |||
| 62 | The terms are in the LICENSE file that accompanies this application | ||
| 63 | |||
| 64 | =cut | ||
| 65 | |||
| 66 | 1; | ||
| 67 |