X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README;h=03072a27c85163e241c8b8f3320caac77c73b580;hb=7bafeae9cf8342b4a2b1c13be8086b47b79262f7;hp=9635b7d5d7cc0be018eac0c59b57c3fe659ff1ef;hpb=fc44be6f0832752b4dd69c09ba826d7964b64f3e;p=gitmo%2FMooseX-ConfigFromFile.git diff --git a/README b/README index 9635b7d..03072a2 100644 --- a/README +++ b/README @@ -9,10 +9,10 @@ SYNOPSIS package MooseX::SomeSpecificConfigRole; use Moose::Role; - - with 'MooseX::ConfigFromFile'; - - use Some::ConfigFile::Loader (); + + with 'MooseX::ConfigFromFile'; + + use Some::ConfigFile::Loader (); sub get_config_from_file { my ($class, $file) = @_; @@ -31,7 +31,7 @@ SYNOPSIS with 'MooseX::SomeSpecificConfigRole'; # optionally, default the configfile: - has +configfile ( default => '/tmp/foo.yaml' ); + sub configfile { '/tmp/foo.yaml' } # ... insert your stuff here ... @@ -67,6 +67,10 @@ Attributes has +configfile ( default => '/etc/myapp.yaml' ); + Note that you can alternately just provide a "configfile" method which + returns the config file when called - this will be used in preference to + the default of the attribute. + Class Methods new_with_config This is an alternate constructor, which knows to look for the @@ -83,14 +87,19 @@ Class Methods and it is expected to return a hashref of arguments to pass to "new()" which are sourced from the configfile. - meta - The Moose meta stuff, included here because otherwise pod tests fail - sometimes +COPYRIGHT + Copyright (c) 2007 - 2009 the MooseX::ConfigFromFile "AUTHOR" and + "CONTRIBUTORS" as listed below. -BUGS AUTHOR Brandon L. Black, +CONTRIBUTORS + Tomas Doran "" (current maintainer). + Karen Etheridge + Chris Prather + Zbigniew Lukasiak + LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.