| 1 |
|
| package WWW::AdventCalendar::Config; |
| 2 |
|
| |
| 3 |
|
| $WWW::AdventCalendar::Config::VERSION = '1.112'; |
| 4 |
|
| use Moose; |
| 5 |
|
| extends 'Config::MVP::Reader::INI'; |
| 6 |
|
| |
| 7 |
|
| use namespace::autoclean; |
| 8 |
|
| |
| 9 |
|
| |
| 10 |
|
| |
| 11 |
|
| |
| 12 |
|
| |
| 13 |
|
| |
| 14 |
|
| |
| 15 |
|
| |
| 16 |
|
| |
| 17 |
|
| |
| 18 |
|
| |
| 19 |
|
| |
| 20 |
|
| |
| 21 |
|
| use Config::MVP::Assembler; |
| 22 |
|
| |
| 23 |
|
| { |
| 24 |
|
| package |
| 25 |
|
| WWW::AdventCalendar::Config::Assembler; |
| 26 |
|
| use Moose; |
| 27 |
|
| extends 'Config::MVP::Assembler'; |
| 28 |
|
| use namespace::autoclean; |
| 29 |
|
| sub expand_package { return undef } |
| 30 |
|
| } |
| 31 |
|
| |
| 32 |
|
| { |
| 33 |
|
| package |
| 34 |
|
| WWW::AdventCalendar::Config::Palette; |
| 35 |
|
| $INC{'WWW/AdventCalendar/Config/Palette.pm'} = 1; |
| 36 |
|
| } |
| 37 |
|
| |
| 38 |
|
| sub build_assembler { |
| 39 |
|
| my $assembler = WWW::AdventCalendar::Config::Assembler->new; |
| 40 |
|
| |
| 41 |
|
| my $section = $assembler->section_class->new({ |
| 42 |
|
| name => '_', |
| 43 |
|
| aliases => { |
| 44 |
|
| category => 'categories', |
| 45 |
|
| css_href => 'css_hrefs', |
| 46 |
|
| }, |
| 47 |
|
| multivalue_args => [ qw( categories css_hrefs ) ], |
| 48 |
|
| }); |
| 49 |
|
| $assembler->sequence->add_section($section); |
| 50 |
|
| |
| 51 |
|
| return $assembler; |
| 52 |
|
| } |
| 53 |
|
| |
| 54 |
|
| 1; |
| 55 |
|
| |
| 56 |
|
| __END__ |
| 57 |
|
| |
| 58 |
|
| =pod |
| 59 |
|
| |
| 60 |
|
| =encoding UTF-8 |
| 61 |
|
| |
| 62 |
|
| =head1 NAME |
| 63 |
|
| |
| 64 |
|
| WWW::AdventCalendar::Config - Config::MVP-based configuration reader for WWW::AdventCalendar |
| 65 |
|
| |
| 66 |
|
| =head1 VERSION |
| 67 |
|
| |
| 68 |
|
| version 1.112 |
| 69 |
|
| |
| 70 |
|
| =head1 DESCRIPTION |
| 71 |
|
| |
| 72 |
|
| You probably want to read about L<WWW::AdventCalendar> or L<Config::MVP>. |
| 73 |
|
| |
| 74 |
|
| This is just a L<Config::MVP::Reader::INI> subclass that will begin its |
| 75 |
|
| assembler in a section named "C<_>" with a few multivalue args and aliases |
| 76 |
|
| pre-configured. |
| 77 |
|
| |
| 78 |
|
| Apart from that, there is nothing to say. |
| 79 |
|
| |
| 80 |
|
| =head1 AUTHOR |
| 81 |
|
| |
| 82 |
|
| Ricardo SIGNES <rjbs@cpan.org> |
| 83 |
|
| |
| 84 |
|
| =head1 COPYRIGHT AND LICENSE |
| 85 |
|
| |
| 86 |
|
| This software is copyright (c) 2015 by Ricardo SIGNES. |
| 87 |
|
| |
| 88 |
|
| This is free software; you can redistribute it and/or modify it under |
| 89 |
|
| the same terms as the Perl 5 programming language system itself. |
| 90 |
|
| |
| 91 |
|
| =cut |