Skip to content

Commit

Permalink
Merge branch 'master' of git.moose.perl.org:MooseX-SimpleConfig
Browse files Browse the repository at this point in the history
* 'master' of git.moose.perl.org:MooseX-SimpleConfig:
  fixed configfile attribute examples
  added metadata to Makefile.PL
  • Loading branch information
bobtfish committed Apr 12, 2010
2 parents 9e03218 + c36a5f3 commit c820699
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Makefile.PL
Expand Up @@ -14,6 +14,11 @@ requires 'Config::Any' => '0.13';
system("pod2text lib/MooseX/SimpleConfig.pm >README") and die
if $Module::Install::AUTHOR;

resources 'IRC' => 'irc://irc.perl.org/#moose';
resources 'license' => 'http://dev.perl.org/licenses/';
resources 'repository' => 'git://git.moose.perl.org/MooseX-SimpleConfig.git';
resources 'MailingList' => 'http://news.gmane.org/gmane.comp.lang.perl.moose';

auto_provides;
auto_install;
WriteAll;
4 changes: 2 additions & 2 deletions lib/MooseX/SimpleConfig.pm
Expand Up @@ -121,12 +121,12 @@ well, which allows specifying C<-configfile> on the commandline.
Provided by the base role L<MooseX::ConfigFromFile>. You can
provide a default configfile pathname like so:
has +configfile ( default => '/etc/myapp.yaml' );
has '+configfile' => ( default => '/etc/myapp.yaml' );
You can pass an array of filenames if you want, but as usual the array
has to be wrapped in a sub ref.
has +configfile ( default => sub { [ '/etc/myapp.yaml', '/etc/myapp_local.yml' ] } );
has '+configfile' => ( default => sub { [ '/etc/myapp.yaml', '/etc/myapp_local.yml' ] } );
Config files are trivially merged at the top level, with the right-hand files taking precedence.
Expand Down

0 comments on commit c820699

Please sign in to comment.