Abstract Moose Role for Setting Attributes from a Config File
http://search.cpan.org/dist/MooseX-ConfigFromFile/
This is an abstract role which provides an alternate constructor for creating
objects using parameters passed in from a configuration file. The actual
implementation of reading the configuration file is left to concrete subroles.
It declares an attribute configfile and a class method new_with_config, and
requires that concrete roles derived from it implement the class method
get_config_from_file.
Attributes specified directly as arguments to new_with_config supercede those
in the configfile.
MooseX::Getopt knows about this abstract role, and will use it if available to
load attributes from the file specified by the commandline flag --configfile
during its normal new_with_options.
- Developed at devel:languages:perl
- Sources inherited from project openSUSE:Factory
-
1
derived packages
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout openSUSE:Backports:SLE-15-SP4:FactoryCandidates/perl-MooseX-ConfigFromFile && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
MooseX-ConfigFromFile-0.11.tar.gz | 0000019997 19.5 KB | |
perl-MooseX-ConfigFromFile.changes | 0000002883 2.82 KB | |
perl-MooseX-ConfigFromFile.spec | 0000003268 3.19 KB |
Revision 4 (latest revision is 9)
Stephan Kulow (coolo)
accepted
request 185464
from
Stephan Kulow (coolo)
(revision 4)
- updated to 0.11 - bump prereq version for MooseX::Types::Path::Tiny to ensure a broken version is not installed 0.10 2013-02-12 13:17:44 PST-0800 (Karen Etheridge) - allow clean composition into a role, without requiring an -exclude 0.09 2013-02-11 09:35:50 PST-0800 (Karen Etheridge) - removed prereqs which are only used for optional tests 0.08 2013-02-09 16:24:27 PST-0800 (Karen Etheridge) - allow configfiles called "0" - configfile value now passed through to new() - new _get_default_configfile method added, which consumers can override to provide a default value without having to redefine the attribute itself (via RT#79746) -- PLEASE READ THE DOCUMENTATION if you override the configfile attribute! 0.07 2013-02-04 (Karen Etheridge) - fixed tests to not load optional dependencies 0.06 2013-02-03 (Karen Etheridge) - the configfile attribute is now a Path::Tiny, not a Path::Class (coercions from strings are still supported, and now also from any other type that has a string coercion). 0.05 2013-02-03 (Karen Etheridge) - documentation corrected to demostrate how to properly override the configfile method to provide a default from the consuming class, without having to redefine the attribute itself
Comments 0