| 1 |
package Dancer2::ConfigReader::TestDummy; |
| 2 |
use Moo; |
| 3 |
use Dancer2::Core::Factory; |
| 4 |
use Dancer2::Core; |
| 5 |
use Dancer2::Core::Types; |
| 6 |
use Dancer2::FileUtils 'path'; |
| 7 |
|
| 8 |
with 'Dancer2::Core::Role::ConfigReader'; |
| 9 |
|
| 10 |
has name => ( |
| 11 |
is => 'ro', |
| 12 |
isa => Str, |
| 13 |
lazy => 0, |
| 14 |
default => sub {'TestDummy'}, |
| 15 |
); |
| 16 |
|
| 17 |
has config_files => ( |
| 18 |
is => 'ro', |
| 19 |
lazy => 1, |
| 20 |
isa => ArrayRef, |
| 21 |
default => sub { |
| 22 |
my ($self) = @_; |
| 23 |
return []; |
| 24 |
}, |
| 25 |
); |
| 26 |
|
| 27 |
sub read_config { |
| 28 |
my %config = ( |
| 29 |
dummy => { |
| 30 |
dummy_subitem => 2, |
| 31 |
} |
| 32 |
); |
| 33 |
return \%config; |
| 34 |
} |
| 35 |
|
| 36 |
1; |