@@ -1,5 +1,10 @@
Revision history for Config-MVP
+2.200008 2014-07-02 19:24:59-04:00 America/New_York
+ - fix a busted link
+ - be more consistent in exception-throwing on missing packages
+ - fix a dumb test that failed in a git checkout
+
2.200007 2014-01-29 21:04:25-05:00 America/New_York
- throw an exception when a bundle reports an impossible situation,
like { value => [] }; https://github.com/rjbs/Config-MVP/issues/5
@@ -22,7 +22,7 @@ This is free software, licensed under:
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.012.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.019.
Changes
LICENSE
MANIFEST
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380",
+ "generated_by" : "Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141520",
"license" : [
"perl_5"
],
@@ -30,7 +30,6 @@
"Class::Load" : "0.17",
"File::Spec" : "0",
"Module::Pluggable::Object" : "0",
- "Module::Runtime" : "0",
"Moose" : "0.91",
"Moose::Role" : "0",
"Moose::Util::TypeConstraints" : "0",
@@ -68,10 +67,10 @@
"web" : "https://github.com/rjbs/Config-MVP"
}
},
- "version" : "2.200007",
+ "version" : "2.200008",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.018002"
+ "version" : "5.021001"
},
"plugins" : [
{
@@ -83,22 +82,30 @@
}
},
"name" : "Prereqs",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::GatherDir" : {
+ "include_untracked" : "0"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/Git::GatherDir",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
- "version" : "0.010"
+ "version" : "0.012"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
- "version" : "0.016"
+ "version" : "0.021"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -114,7 +121,7 @@
}
},
"name" : "@RJBS/RJBS-Outdated",
- "version" : "0.015"
+ "version" : "0.023"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -128,97 +135,112 @@
}
},
"name" : "@RJBS/CPAN-Outdated",
- "version" : "0.015"
+ "version" : "0.023"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Filter/PruneCruft",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Filter/ManifestSkip",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Filter/MetaYAML",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Filter/License",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Filter/Readme",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Filter/ExecDir",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Filter/ShareDir",
- "version" : "5.012"
- },
- {
- "class" : "Dist::Zilla::Plugin::MakeMaker",
- "name" : "@RJBS/@Filter/MakeMaker",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Filter/TestRelease",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Filter/ConfirmRelease",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Filter/UploadToCPAN",
- "version" : "5.012"
+ "version" : "5.019"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MakeMaker",
+ "config" : {
+ "Dist::Zilla::Role::TestRunner" : {
+ "default_jobs" : 9
+ }
+ },
+ "name" : "@RJBS/MakeMaker",
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::NextVersion" : {
+ "first_version" : "0.001",
+ "version_by_branch" : "0",
+ "version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/Git::NextVersion",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
@@ -228,7 +250,7 @@
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::ReportVersions::Tiny",
@@ -244,7 +266,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -357,67 +379,126 @@
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@RJBS/GithubMeta",
- "version" : "0.42"
+ "version" : "0.46"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Check" : {
+ "untracked_files" : "die"
+ },
+ "Dist::Zilla::Role::Git::DirtyFiles" : {
+ "allow_dirty" : [
+ "dist.ini",
+ "Changes"
+ ],
+ "allow_dirty_match" : [],
+ "changelog" : "Changes"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Check",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Commit" : {
+ "add_files_in" : [],
+ "commit_msg" : "v%v%n%n%c",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::DirtyFiles" : {
+ "allow_dirty" : [
+ "dist.ini",
+ "Changes"
+ ],
+ "allow_dirty_match" : [],
+ "changelog" : "Changes"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Commit",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Tag" : {
+ "branch" : null,
+ "signed" : 0,
+ "tag" : "2.200008",
+ "tag_format" : "%v",
+ "tag_message" : "v%v",
+ "time_zone" : "local"
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Tag",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Push" : {
+ "push_to" : [
+ "origin :",
+ "github :"
+ ],
+ "remotes_must_exist" : 0
+ },
+ "Dist::Zilla::Role::Git::Repo" : {
+ "repo_root" : "."
+ }
+ },
"name" : "@RJBS/@Git/Push",
- "version" : "2.019"
+ "version" : "2.023"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "5.012"
+ "version" : "5.019"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "5.012"
+ "version" : "5.019"
}
],
"zilla" : {
@@ -425,7 +506,7 @@
"config" : {
"is_trial" : "0"
},
- "version" : "5.012"
+ "version" : "5.019"
}
}
}
@@ -3,46 +3,45 @@ abstract: 'multivalue-property package-oriented configuration'
author:
- 'Ricardo Signes <rjbs@cpan.org>'
build_requires:
- Test::Fatal: 0
- Test::More: 0.96
- lib: 0
+ Test::Fatal: '0'
+ Test::More: '0.96'
+ lib: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: '6.30'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141520'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Config-MVP
requires:
- Class::Load: 0.17
- File::Spec: 0
- Module::Pluggable::Object: 0
- Module::Runtime: 0
- Moose: 0.91
- Moose::Role: 0
- Moose::Util::TypeConstraints: 0
- MooseX::OneArgNew: 0
- Params::Util: 0
- Role::HasMessage: 0
- Role::Identifiable::HasIdent: 0
- StackTrace::Auto: 0
- Test::More: 0.96
- Throwable: 0
- Tie::IxHash: 0
- Try::Tiny: 0
- overload: 0
- strict: 0
- warnings: 0
+ Class::Load: '0.17'
+ File::Spec: '0'
+ Module::Pluggable::Object: '0'
+ Moose: '0.91'
+ Moose::Role: '0'
+ Moose::Util::TypeConstraints: '0'
+ MooseX::OneArgNew: '0'
+ Params::Util: '0'
+ Role::HasMessage: '0'
+ Role::Identifiable::HasIdent: '0'
+ StackTrace::Auto: '0'
+ Test::More: '0.96'
+ Throwable: '0'
+ Tie::IxHash: '0'
+ Try::Tiny: '0'
+ overload: '0'
+ strict: '0'
+ warnings: '0'
resources:
bugtracker: https://github.com/rjbs/Config-MVP/issues
homepage: https://github.com/rjbs/Config-MVP
repository: https://github.com/rjbs/Config-MVP.git
-version: 2.200007
+version: '2.200008'
x_Dist_Zilla:
perl:
- version: 5.018002
+ version: '5.021001'
plugins:
-
class: Dist::Zilla::Plugin::Prereqs
@@ -51,19 +50,24 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::Git::GatherDir
+ config:
+ Dist::Zilla::Plugin::Git::GatherDir:
+ include_untracked: '0'
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/Git::GatherDir'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
- version: 0.010
+ version: '0.012'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
- version: 0.016
+ version: '0.021'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
@@ -75,102 +79,112 @@ x_Dist_Zilla:
phase: build
skip: []
name: '@RJBS/RJBS-Outdated'
- version: 0.015
+ version: '0.023'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
- check_all_plugins: 1
+ check_all_plugins: '1'
check_all_prereqs: 0
modules: []
phase: release
skip: []
name: '@RJBS/CPAN-Outdated'
- version: 0.015
+ version: '0.023'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Filter/ManifestSkip'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Filter/MetaYAML'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Filter/License'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Filter/Readme'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Filter/ExecDir'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
- version: 5.012
- -
- class: Dist::Zilla::Plugin::MakeMaker
- name: '@RJBS/@Filter/MakeMaker'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Filter/TestRelease'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Filter/ConfirmRelease'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
- version: 5.012
+ version: '5.019'
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ config:
+ Dist::Zilla::Role::TestRunner:
+ default_jobs: 9
+ name: '@RJBS/MakeMaker'
+ version: '5.019'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::Git::NextVersion
+ config:
+ Dist::Zilla::Plugin::Git::NextVersion:
+ first_version: '0.001'
+ version_by_branch: '0'
+ version_regexp: (?^:^([0-9]+\.[0-9]+)$)
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/Git::NextVersion'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@RJBS/Test::ChangesHasContent'
- version: 0.006
+ version: '0.006'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::ReportVersions::Tiny
name: '@RJBS/ReportVersions::Tiny'
- version: 1.10
+ version: '1.10'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -178,7 +192,7 @@ x_Dist_Zilla:
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
@@ -192,131 +206,173 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@RJBS/SingleEncoding'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Name
name: '@RJBS/Name'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Version
name: '@RJBS/Version'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/Prelude'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Synopsis'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Description'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Overview'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Generic
name: '@RJBS/Stability'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Collect
name: Attributes
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Collect
name: Methods
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Collect
name: Functions
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Leftovers
name: '@RJBS/Leftovers'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Region
name: '@RJBS/postlude'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Authors
name: '@RJBS/Authors'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Section::Legal
name: '@RJBS/Legal'
- version: 4.006
+ version: '4.006'
-
class: Pod::Weaver::Plugin::Transformer
name: '@RJBS/List'
- version: 4.006
+ version: '4.006'
name: '@RJBS/PodWeaver'
- version: 4.005
+ version: '4.005'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@RJBS/GithubMeta'
- version: 0.42
+ version: '0.46'
-
class: Dist::Zilla::Plugin::Git::Check
+ config:
+ Dist::Zilla::Plugin::Git::Check:
+ untracked_files: die
+ Dist::Zilla::Role::Git::DirtyFiles:
+ allow_dirty:
+ - dist.ini
+ - Changes
+ allow_dirty_match: []
+ changelog: Changes
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Check'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::Git::Commit
+ config:
+ Dist::Zilla::Plugin::Git::Commit:
+ add_files_in: []
+ commit_msg: v%v%n%n%c
+ time_zone: local
+ Dist::Zilla::Role::Git::DirtyFiles:
+ allow_dirty:
+ - dist.ini
+ - Changes
+ allow_dirty_match: []
+ changelog: Changes
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Commit'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::Git::Tag
+ config:
+ Dist::Zilla::Plugin::Git::Tag:
+ branch: ~
+ signed: 0
+ tag: '2.200008'
+ tag_format: '%v'
+ tag_message: v%v
+ time_zone: local
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Tag'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::Git::Push
+ config:
+ Dist::Zilla::Plugin::Git::Push:
+ push_to:
+ - 'origin :'
+ - 'github :'
+ remotes_must_exist: 0
+ Dist::Zilla::Role::Git::Repo:
+ repo_root: .
name: '@RJBS/@Git/Push'
- version: 2.019
+ version: '2.023'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: 5.012
+ version: '5.019'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: 5.012
+ version: '5.019'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: 0
- version: 5.012
+ is_trial: '0'
+ version: '5.019'
@@ -1,5 +1,5 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.012.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.019.
use strict;
use warnings;
@@ -12,7 +12,6 @@ use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
"ABSTRACT" => "multivalue-property package-oriented configuration",
"AUTHOR" => "Ricardo Signes <rjbs\@cpan.org>",
- "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
@@ -24,7 +23,6 @@ my %WriteMakefileArgs = (
"Class::Load" => "0.17",
"File::Spec" => 0,
"Module::Pluggable::Object" => 0,
- "Module::Runtime" => 0,
"Moose" => "0.91",
"Moose::Role" => 0,
"Moose::Util::TypeConstraints" => 0,
@@ -46,7 +44,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.96",
"lib" => 0
},
- "VERSION" => "2.200007",
+ "VERSION" => "2.200008",
"test" => {
"TESTS" => "t/*.t"
}
@@ -57,7 +55,6 @@ my %FallbackPrereqs = (
"Class::Load" => "0.17",
"File::Spec" => 0,
"Module::Pluggable::Object" => 0,
- "Module::Runtime" => 0,
"Moose" => "0.91",
"Moose::Role" => 0,
"Moose::Util::TypeConstraints" => 0,
@@ -1,7 +1,7 @@
This archive contains the distribution Config-MVP,
-version 2.200007:
+version 2.200008:
multivalue-property package-oriented configuration
@@ -11,5 +11,5 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
-This README file was generated by Dist::Zilla::Plugin::Readme v5.012.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.019.
@@ -1,58 +1,58 @@
package Config::MVP::Assembler::WithBundles;
# ABSTRACT: a role to make assemblers expand bundles
-$Config::MVP::Assembler::WithBundles::VERSION = '2.200007';
+$Config::MVP::Assembler::WithBundles::VERSION = '2.200008';
use Moose::Role;
use Params::Util qw(_HASHLIKE _ARRAYLIKE);
-use Module::Runtime qw(use_module);
-
-# =head1 DESCRIPTION
-#
-# Config::MVP::Assembler::WithBundles is a role to be composed into a
-# Config::MVP::Assembler subclass. It allows some sections of configuration to
-# be treated as bundles. When any section is ended, if that section represented
-# a bundle, its bundle contents will be unrolled and will replace it in the
-# sequence.
-#
-# A package is considered a bundle if C<package_bundle_method> returns a
-# defined value (which is the name of a method that will be called on
-# that package to retrieve its bundle config).
-#
-# my $method = $assembler->package_bundle_method($package);
-#
-# The default implementation looks for a method called C<mvp_bundle_config>, but
-# C<package_bundle_method> can be replaced with one that returns the name of a
-# different bundle-identifying method-name.
-#
-# Bundles are expanded by a call to the assembler's
-# C<replace_bundle_with_contents> method, like this:
-#
-# $assembler->replace_bundle_with_contents($section, $method);
-#
-# =head2 replace_bundle_with_contents
-#
-# The default C<replace_bundle_with_contents> method deletes the section from the
-# sequence. It then gets a description of the new sections to introduce, like
-# this:
-#
-# my @new_config = $bundle_section->package->$method({
-# name => $bundle_section->name,
-# package => $bundle_section->package,
-# payload => $bundle_section->payload,
-# });
-#
-# (We pass a hashref rather than a section so that bundles can be expanded
-# synthetically without having to laboriously create a new Section.)
-#
-# The returned C<@new_config> is a list of arrayrefs, each of which has three
-# entries:
-#
-# [ $name, $package, $payload ]
-#
-# Each arrayref is converted into a section in the sequence. The C<$payload>
-# should be an arrayref of name/value pairs to be added to the created section.
-#
-# =cut
+use Class::Load 0.17 ();
+
+#pod =head1 DESCRIPTION
+#pod
+#pod Config::MVP::Assembler::WithBundles is a role to be composed into a
+#pod Config::MVP::Assembler subclass. It allows some sections of configuration to
+#pod be treated as bundles. When any section is ended, if that section represented
+#pod a bundle, its bundle contents will be unrolled and will replace it in the
+#pod sequence.
+#pod
+#pod A package is considered a bundle if C<package_bundle_method> returns a
+#pod defined value (which is the name of a method that will be called on
+#pod that package to retrieve its bundle config).
+#pod
+#pod my $method = $assembler->package_bundle_method($package);
+#pod
+#pod The default implementation looks for a method called C<mvp_bundle_config>, but
+#pod C<package_bundle_method> can be replaced with one that returns the name of a
+#pod different bundle-identifying method-name.
+#pod
+#pod Bundles are expanded by a call to the assembler's
+#pod C<replace_bundle_with_contents> method, like this:
+#pod
+#pod $assembler->replace_bundle_with_contents($section, $method);
+#pod
+#pod =head2 replace_bundle_with_contents
+#pod
+#pod The default C<replace_bundle_with_contents> method deletes the section from the
+#pod sequence. It then gets a description of the new sections to introduce, like
+#pod this:
+#pod
+#pod my @new_config = $bundle_section->package->$method({
+#pod name => $bundle_section->name,
+#pod package => $bundle_section->package,
+#pod payload => $bundle_section->payload,
+#pod });
+#pod
+#pod (We pass a hashref rather than a section so that bundles can be expanded
+#pod synthetically without having to laboriously create a new Section.)
+#pod
+#pod The returned C<@new_config> is a list of arrayrefs, each of which has three
+#pod entries:
+#pod
+#pod [ $name, $package, $payload ]
+#pod
+#pod Each arrayref is converted into a section in the sequence. The C<$payload>
+#pod should be an arrayref of name/value pairs to be added to the created section.
+#pod
+#pod =cut
sub package_bundle_method {
my ($self, $pkg) = @_;
@@ -86,6 +86,34 @@ sub replace_bundle_with_contents {
});
};
+sub load_package {
+ my ($self, $package, $plugin) = @_;
+
+ Class::Load::load_optional_class($package)
+ or $self->missing_package($package, $plugin);
+}
+
+sub missing_package {
+ my ($self, $package, $plugin) = @_ ;
+
+ my $class = Moose::Meta::Class->create_anon_class(
+ superclasses => [ 'Config::MVP::Error' ],
+ cached => 1,
+ attributes => [
+ Moose::Meta::Attribute->new(package => (
+ is => 'ro',
+ required => 1,
+ )),
+ ],
+ );
+
+ $class->name->throw({
+ ident => 'package not installed',
+ message => "$package (for plugin $plugin) does not appear to be installed",
+ package => $package,
+ });
+}
+
sub _add_bundle_contents {
my ($self, $method, $arg) = @_;
@@ -94,7 +122,7 @@ sub _add_bundle_contents {
PLUGIN: for my $plugin (@bundle_config) {
my ($name, $package, $payload) = @$plugin;
- use_module($package);
+ $self->load_package($package, $name);
if (my $method = $self->package_bundle_method( $package )) {
$self->_add_bundle_contents($method, {
@@ -147,7 +175,7 @@ Config::MVP::Assembler::WithBundles - a role to make assemblers expand bundles
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,63 +1,63 @@
package Config::MVP::Assembler;
# ABSTRACT: multivalue-property config-loading state machine
-$Config::MVP::Assembler::VERSION = '2.200007';
+$Config::MVP::Assembler::VERSION = '2.200008';
use Moose;
use Config::MVP::Error;
use Config::MVP::Sequence;
use Config::MVP::Section;
-# =head1 DESCRIPTION
-#
-# First, you should probably read the L<example of using
-# Config::MVP|Config::MVP/EXAMPLE>. If you already know how it works, keep
-# going.
-#
-# Config::MVP::Assembler is a helper for constructing a Config::MVP::Sequence
-# object. It's a very simple state machine that lets you signal what kind of
-# events you've encountered while reading configuration.
-#
-# =head1 TYPICAL USE
-#
-# my $assembler = Config::MVP::Assembler->new;
-#
-# # Maybe you want a starting section:
-# my $starting_section = $assembler->section_class->new({ name => '_' });
-# $assembler->sequence->add_section($section_starting);
-#
-# # We'll add some values, which will go to the starting section:
-# $assembler->add_value(x => 10);
-# $assembler->add_value(y => 20);
-#
-# # Change to a new section...
-# $assembler->change_section($moniker);
-#
-# # ...and add values to that section.
-# $assembler->add_value(x => 100);
-# $assembler->add_value(y => 200);
-#
-# The code above creates an assembler and populates it step by step. In the end,
-# to get values, you could do something like this:
-#
-# my @output;
-#
-# for my $section ($assembler->sequence->sections) {
-# push @output, [ $section->name, $section->package, $section->payload ];
-# }
-#
-# When changing sections, the given section "moniker" is used for the new section
-# name. The result of passing that moniker to the assembler's
-# C<L</expand_package>> method is used as the section's package name. (By
-# default, this method does nothing.) The new section's C<multivalue_args> and
-# C<aliases> are determined by calling the C<mvp_multivalue_args> and
-# C<mvp_aliases> methods on the package.
-#
-# =attr sequence_class
-#
-# This attribute stores the name of the class to be used for the assembler's
-# sequence. It defaults to Config::MVP::Sequence.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod First, you should probably read the L<example of using
+#pod Config::MVP|Config::MVP/EXAMPLE>. If you already know how it works, keep
+#pod going.
+#pod
+#pod Config::MVP::Assembler is a helper for constructing a Config::MVP::Sequence
+#pod object. It's a very simple state machine that lets you signal what kind of
+#pod events you've encountered while reading configuration.
+#pod
+#pod =head1 TYPICAL USE
+#pod
+#pod my $assembler = Config::MVP::Assembler->new;
+#pod
+#pod # Maybe you want a starting section:
+#pod my $starting_section = $assembler->section_class->new({ name => '_' });
+#pod $assembler->sequence->add_section($section_starting);
+#pod
+#pod # We'll add some values, which will go to the starting section:
+#pod $assembler->add_value(x => 10);
+#pod $assembler->add_value(y => 20);
+#pod
+#pod # Change to a new section...
+#pod $assembler->change_section($moniker);
+#pod
+#pod # ...and add values to that section.
+#pod $assembler->add_value(x => 100);
+#pod $assembler->add_value(y => 200);
+#pod
+#pod The code above creates an assembler and populates it step by step. In the end,
+#pod to get values, you could do something like this:
+#pod
+#pod my @output;
+#pod
+#pod for my $section ($assembler->sequence->sections) {
+#pod push @output, [ $section->name, $section->package, $section->payload ];
+#pod }
+#pod
+#pod When changing sections, the given section "moniker" is used for the new section
+#pod name. The result of passing that moniker to the assembler's
+#pod C<L</expand_package>> method is used as the section's package name. (By
+#pod default, this method does nothing.) The new section's C<multivalue_args> and
+#pod C<aliases> are determined by calling the C<mvp_multivalue_args> and
+#pod C<mvp_aliases> methods on the package.
+#pod
+#pod =attr sequence_class
+#pod
+#pod This attribute stores the name of the class to be used for the assembler's
+#pod sequence. It defaults to Config::MVP::Sequence.
+#pod
+#pod =cut
has sequence_class => (
is => 'ro',
@@ -66,12 +66,12 @@ has sequence_class => (
default => 'Config::MVP::Sequence',
);
-# =attr section_class
-#
-# This attribute stores the name of the class to be used for sections created by
-# the assembler. It defaults to Config::MVP::Section.
-#
-# =cut
+#pod =attr section_class
+#pod
+#pod This attribute stores the name of the class to be used for sections created by
+#pod the assembler. It defaults to Config::MVP::Section.
+#pod
+#pod =cut
has section_class => (
is => 'ro',
@@ -80,12 +80,12 @@ has section_class => (
default => 'Config::MVP::Section',
);
-# =attr sequence
-#
-# This is the sequence that the assembler is assembling. It defaults to a new
-# instance of the assembler's C<sequence_class>.
-#
-# =cut
+#pod =attr sequence
+#pod
+#pod This is the sequence that the assembler is assembling. It defaults to a new
+#pod instance of the assembler's C<sequence_class>.
+#pod
+#pod =cut
has sequence => (
is => 'ro',
@@ -101,27 +101,27 @@ before finalize => sub {
$self->end_section if $self->current_section;
};
-# =method begin_section
-#
-# $assembler->begin_section($package_moniker, $name);
-#
-# $assembler->begin_section($package_moniker);
-#
-# $assembler->begin_section( \$package );
-#
-# This method tells the assembler that it should begin work on a new section with
-# the given identifier. If it is already working on a section, an error will be
-# raised. See C<L</change_section>> for a method to begin a new section, ending
-# the current one if needed.
-#
-# The package moniker is expanded by the C<L</expand_package>> method. The name,
-# if not given, defaults to the package moniker. These data are used to create a
-# new section and the section is added to the end of the sequence. If the
-# package argument is a reference, it is used as the literal value for the
-# package, and no expansion is performed. If it is a reference to undef, a
-# section with no package is created.
-#
-# =cut
+#pod =method begin_section
+#pod
+#pod $assembler->begin_section($package_moniker, $name);
+#pod
+#pod $assembler->begin_section($package_moniker);
+#pod
+#pod $assembler->begin_section( \$package );
+#pod
+#pod This method tells the assembler that it should begin work on a new section with
+#pod the given identifier. If it is already working on a section, an error will be
+#pod raised. See C<L</change_section>> for a method to begin a new section, ending
+#pod the current one if needed.
+#pod
+#pod The package moniker is expanded by the C<L</expand_package>> method. The name,
+#pod if not given, defaults to the package moniker. These data are used to create a
+#pod new section and the section is added to the end of the sequence. If the
+#pod package argument is a reference, it is used as the literal value for the
+#pod package, and no expansion is performed. If it is a reference to undef, a
+#pod section with no package is created.
+#pod
+#pod =cut
has _between_sections => (
is => 'rw',
@@ -150,14 +150,14 @@ sub begin_section {
$self->sequence->add_section($section);
}
-# =method end_section
-#
-# $assembler->end_section;
-#
-# This ends the current section. If there is no current section, an exception is
-# raised.
-#
-# =cut
+#pod =method end_section
+#pod
+#pod $assembler->end_section;
+#pod
+#pod This ends the current section. If there is no current section, an exception is
+#pod raised.
+#pod
+#pod =cut
sub end_section {
my ($self) = @_;
@@ -170,15 +170,15 @@ sub end_section {
$self->_between_sections(1);
}
-# =method change_section
-#
-# $assembler->change_section($package_moniker, $name);
-#
-# $assembler->change_section($package_moniker);
-#
-# This method calls C<begin_section>, first calling C<end_section> if needed.
-#
-# =cut
+#pod =method change_section
+#pod
+#pod $assembler->change_section($package_moniker, $name);
+#pod
+#pod $assembler->change_section($package_moniker);
+#pod
+#pod This method calls C<begin_section>, first calling C<end_section> if needed.
+#pod
+#pod =cut
sub change_section {
my $self = shift;
@@ -187,17 +187,17 @@ sub change_section {
$self->begin_section(@_);
}
-# =method add_value
-#
-# $assembler->add_value( $name => $value );
-#
-# This method tells the assembler that it has encountered a named value and
-# should add it to the current section. If there is no current section, an
-# exception is raised. (If this is not the first time we've seen the name in the
-# section and it's not a multivalue property, the section class will raise an
-# exception on its own.)
-#
-# =cut
+#pod =method add_value
+#pod
+#pod $assembler->add_value( $name => $value );
+#pod
+#pod This method tells the assembler that it has encountered a named value and
+#pod should add it to the current section. If there is no current section, an
+#pod exception is raised. (If this is not the first time we've seen the name in the
+#pod section and it's not a multivalue property, the section class will raise an
+#pod exception on its own.)
+#pod
+#pod =cut
sub add_value {
my ($self, $name, $value) = @_;
@@ -208,23 +208,23 @@ sub add_value {
$section->add_value($name => $value);
}
-# =method expand_package
-#
-# This method is passed a short identifier for a package and is expected to
-# return the full name of the module to load and package to interrogate. By
-# default it simply returns the name it was passed, meaning that package names
-# must be given whole to the C<change_section> method.
-#
-# =cut
+#pod =method expand_package
+#pod
+#pod This method is passed a short identifier for a package and is expected to
+#pod return the full name of the module to load and package to interrogate. By
+#pod default it simply returns the name it was passed, meaning that package names
+#pod must be given whole to the C<change_section> method.
+#pod
+#pod =cut
sub expand_package { $_[1] }
-# =method current_section
-#
-# This returns the section object onto which the assembler is currently adding
-# values. If no section has yet been created, this method will return false.
-#
-# =cut
+#pod =method current_section
+#pod
+#pod This returns the section object onto which the assembler is currently adding
+#pod values. If no section has yet been created, this method will return false.
+#pod
+#pod =cut
sub current_section {
my ($self) = @_;
@@ -251,7 +251,7 @@ Config::MVP::Assembler - multivalue-property config-loading state machine
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,6 +1,6 @@
package Config::MVP::Error;
# ABSTRACT: common exceptions class
-$Config::MVP::Error::VERSION = '2.200007';
+$Config::MVP::Error::VERSION = '2.200008';
use Moose;
has message => (
@@ -45,7 +45,7 @@ Config::MVP::Error - common exceptions class
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 AUTHOR
@@ -1,35 +1,35 @@
package Config::MVP::Reader::Findable::ByExtension;
# ABSTRACT: a Findable Reader that looks for files by extension
-$Config::MVP::Reader::Findable::ByExtension::VERSION = '2.200007';
+$Config::MVP::Reader::Findable::ByExtension::VERSION = '2.200008';
use Moose::Role;
with qw(Config::MVP::Reader::Findable);
use File::Spec;
-# =method default_extension
-#
-# This method, B<which must be composed by classes including this role>, returns
-# the default extension used by files in the format this reader can read.
-#
-# When the Finder tries to find configuration, it have a directory root and a
-# basename. Each (Findable) reader that it tries in turn will look for a file
-# F<basename.extension> in the root directory. If exactly one file is found,
-# that file is read.
-#
-# =cut
+#pod =method default_extension
+#pod
+#pod This method, B<which must be composed by classes including this role>, returns
+#pod the default extension used by files in the format this reader can read.
+#pod
+#pod When the Finder tries to find configuration, it have a directory root and a
+#pod basename. Each (Findable) reader that it tries in turn will look for a file
+#pod F<basename.extension> in the root directory. If exactly one file is found,
+#pod that file is read.
+#pod
+#pod =cut
requires 'default_extension';
-# =method refined_location
-#
-# This role provides a default implementation of the
-# L<C<refined_location>|Config::MVP::Reader::Findable/refined_location> method
-# required by Config::MVP::Reader. It will return a filename based on the
-# original location, if a file exists matching that location plus the reader's
-# C<default_extension>.
-#
-# =cut
+#pod =method refined_location
+#pod
+#pod This role provides a default implementation of the
+#pod L<C<refined_location>|Config::MVP::Reader::Findable/refined_location> method
+#pod required by Config::MVP::Reader. It will return a filename based on the
+#pod original location, if a file exists matching that location plus the reader's
+#pod C<default_extension>.
+#pod
+#pod =cut
sub refined_location {
my ($self, $location) = @_;
@@ -54,7 +54,7 @@ Config::MVP::Reader::Findable::ByExtension - a Findable Reader that looks for fi
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 METHODS
@@ -1,23 +1,23 @@
package Config::MVP::Reader::Findable;
# ABSTRACT: a config class that Config::MVP::Reader::Finder can find
-$Config::MVP::Reader::Findable::VERSION = '2.200007';
+$Config::MVP::Reader::Findable::VERSION = '2.200008';
use Moose::Role;
-# =head1 DESCRIPTION
-#
-# Config::MVP::Reader::Findable is a role meant to be composed alongside
-# Config::MVP::Reader.
-#
-# =method refined_location
-#
-# This method is used to decide whether a Findable reader can read a specific
-# thing under the C<$location> argument passed to C<read_config>. The location
-# could be a directory or base file name or dbh or almost anything else. This
-# method will return false if it can't find anything to read. If it can find
-# something to read, it will return a new (or unchanged) value for C<$location>
-# to be used in reading the config.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod Config::MVP::Reader::Findable is a role meant to be composed alongside
+#pod Config::MVP::Reader.
+#pod
+#pod =method refined_location
+#pod
+#pod This method is used to decide whether a Findable reader can read a specific
+#pod thing under the C<$location> argument passed to C<read_config>. The location
+#pod could be a directory or base file name or dbh or almost anything else. This
+#pod method will return false if it can't find anything to read. If it can find
+#pod something to read, it will return a new (or unchanged) value for C<$location>
+#pod to be used in reading the config.
+#pod
+#pod =cut
requires 'refined_location';
@@ -36,7 +36,7 @@ Config::MVP::Reader::Findable - a config class that Config::MVP::Reader::Finder
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,44 +1,46 @@
package Config::MVP::Reader::Finder;
# ABSTRACT: a reader that finds an appropriate file
-$Config::MVP::Reader::Finder::VERSION = '2.200007';
+$Config::MVP::Reader::Finder::VERSION = '2.200008';
use Moose;
extends 'Config::MVP::Reader';
-# =head1 DESCRIPTION
-#
-# The Finder reader multiplexes many other readers that implement the
-# L<Config::MVP::Reader::Findable> role. It uses L<Module::Pluggable> to search
-# for modules, limits them to objects implementing the Findable role, and then
-# selects the those which report that they are able to read a configuration file
-# found in the config root directory. If exactly one findable configuration
-# reader finds a file, it is used to read the file and the configuration sequence
-# is returned. Otherwise, an exception is raised.
-#
-# Config::MVP::Reader::Finder's C<build_assembler> method will decline a new
-# assembler, so if none was passed to C<read_config>, the Findable reader to
-# which reading is delegated will be responsible for building the assembler,
-# unless a Finder subclass overrides C<build_assembler> to set a default across
-# all possible delegates.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod The Finder reader multiplexes many other readers that implement the
+#pod L<Config::MVP::Reader::Findable> role. It uses L<Module::Pluggable> to search
+#pod for modules, limits them to objects implementing the Findable role, and then
+#pod selects the those which report that they are able to read a configuration file
+#pod found in the config root directory. If exactly one findable configuration
+#pod reader finds a file, it is used to read the file and the configuration sequence
+#pod is returned. Otherwise, an exception is raised.
+#pod
+#pod Config::MVP::Reader::Finder's C<build_assembler> method will decline a new
+#pod assembler, so if none was passed to C<read_config>, the Findable reader to
+#pod which reading is delegated will be responsible for building the assembler,
+#pod unless a Finder subclass overrides C<build_assembler> to set a default across
+#pod all possible delegates.
+#pod
+#pod =cut
use Config::MVP::Error;
use Module::Pluggable::Object;
use Try::Tiny;
-# =method default_search_path
-#
-# This is the default search path used to find configuration readers. This
-# method should return a list, and by default returns:
-#
-# qw( Config::MVP::Reader )
-#
-# =cut
+#pod =method default_search_path
+#pod
+#pod This is the default search path used to find configuration readers. This
+#pod method should return a list, and by default returns:
+#pod
+#pod qw( Config::MVP::Reader )
+#pod
+#pod =cut
sub default_search_path {
return qw(Config::MVP::Reader)
}
+our @DONT_FIND;
+
has _module_pluggable_object => (
is => 'ro',
init_arg => undef,
@@ -48,6 +50,9 @@ has _module_pluggable_object => (
search_path => [ $self->default_search_path ],
inner => 0,
require => 1,
+
+ # This facility here entirely for testing. -- rjbs, 2014-07-02
+ except => \@DONT_FIND,
);
},
);
@@ -132,7 +137,7 @@ Config::MVP::Reader::Finder - a reader that finds an appropriate file
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,23 +1,23 @@
package Config::MVP::Reader::Hash;
# ABSTRACT: a reader that tries to cope with a plain old hashref
-$Config::MVP::Reader::Hash::VERSION = '2.200007';
+$Config::MVP::Reader::Hash::VERSION = '2.200008';
use Moose;
extends 'Config::MVP::Reader';
-# =head1 SYNOPSIS
-#
-# my $sequence = Config::MVP::Reader::Hash->new->read_config( \%config );
-#
-# =head1 DESCRIPTION
-#
-# In some ways, this is the L<Config::MVP::Reader> of last resort. Given a
-# hashref, it attempts to interpret it as a Config::MVP::Sequence. Because
-# hashes are generally unordered, order can't be relied upon unless the hash tied
-# to have order (presumably with L<Tie::IxHash>). The hash keys are assumed to
-# be section names and will be used as the section package moniker unless a
-# L<__package> entry is found.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod my $sequence = Config::MVP::Reader::Hash->new->read_config( \%config );
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod In some ways, this is the L<Config::MVP::Reader> of last resort. Given a
+#pod hashref, it attempts to interpret it as a Config::MVP::Sequence. Because
+#pod hashes are generally unordered, order can't be relied upon unless the hash tied
+#pod to have order (presumably with L<Tie::IxHash>). The hash keys are assumed to
+#pod be section names and will be used as the section package moniker unless a
+#pod L<__package> entry is found.
+#pod
+#pod =cut
sub read_into_assembler {
my ($self, $location, $assembler) = @_;
@@ -58,7 +58,7 @@ Config::MVP::Reader::Hash - a reader that tries to cope with a plain old hashref
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 SYNOPSIS
@@ -1,46 +1,46 @@
package Config::MVP::Reader;
# ABSTRACT: object to read config from storage into an assembler
-$Config::MVP::Reader::VERSION = '2.200007';
+$Config::MVP::Reader::VERSION = '2.200008';
use Moose;
use Config::MVP::Assembler;
-# =head1 SYNOPSIS
-#
-# use Config::MVP::Reader::YAML; # this doesn't really exist
-#
-# my $reader = Config::MVP::Reader::YAML->new;
-#
-# my $sequence = $reader->read_config('/etc/foobar.yml');
-#
-# =head1 DESCRIPTION
-#
-# A Config::MVP::Reader exists to read configuration data from storage (like a
-# file) and convert that data into instructions to a L<Config::MVP::Assembler>,
-# which will in turn convert them into a L<Config::MVP::Sequence>, the final
-# product.
-#
-# =method read_config
-#
-# my $sequence = $reader->read_config($location, \%arg);
-#
-# This method is passed a location, which has no set meaning, but should be the
-# mechanism by which the Reader is told how to locate configuration. It might be
-# a file name, a hashref of parameters, a DBH, or anything else, depending on the
-# needs of the specific Reader subclass.
-#
-# It is also passed a hashref of arguments, of which there is only one valid
-# argument:
-#
-# assembler - the Assembler object into which to read the config
-#
-# If no assembler argument is passed, one will be constructed by calling the
-# Reader's C<build_assembler> method.
-#
-# Subclasses should generally not override C<read_config>, but should instead
-# implement a C<read_into_assembler> method, described below.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod use Config::MVP::Reader::YAML; # this doesn't really exist
+#pod
+#pod my $reader = Config::MVP::Reader::YAML->new;
+#pod
+#pod my $sequence = $reader->read_config('/etc/foobar.yml');
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod A Config::MVP::Reader exists to read configuration data from storage (like a
+#pod file) and convert that data into instructions to a L<Config::MVP::Assembler>,
+#pod which will in turn convert them into a L<Config::MVP::Sequence>, the final
+#pod product.
+#pod
+#pod =method read_config
+#pod
+#pod my $sequence = $reader->read_config($location, \%arg);
+#pod
+#pod This method is passed a location, which has no set meaning, but should be the
+#pod mechanism by which the Reader is told how to locate configuration. It might be
+#pod a file name, a hashref of parameters, a DBH, or anything else, depending on the
+#pod needs of the specific Reader subclass.
+#pod
+#pod It is also passed a hashref of arguments, of which there is only one valid
+#pod argument:
+#pod
+#pod assembler - the Assembler object into which to read the config
+#pod
+#pod If no assembler argument is passed, one will be constructed by calling the
+#pod Reader's C<build_assembler> method.
+#pod
+#pod Subclasses should generally not override C<read_config>, but should instead
+#pod implement a C<read_into_assembler> method, described below.
+#pod
+#pod =cut
sub read_config {
my ($self, $location, $arg) = @_;
@@ -55,35 +55,35 @@ sub read_config {
return $assembler->sequence;
}
-# =method read_into_assembler
-#
-# This method should not be called directly. It is called by C<read_config> with
-# the following parameters:
-#
-# my $sequence = $reader->read_into_assembler( $location, $assembler );
-#
-# The method should read the configuration found at C<$location> and use it to
-# instruct the C<$assembler> (a L<Config::MVP::Assembler>) what configuration to
-# perform.
-#
-# The default implementation of this method will throw an exception complaining
-# that it should have been implemented by a subclass.
-#
-# =cut
+#pod =method read_into_assembler
+#pod
+#pod This method should not be called directly. It is called by C<read_config> with
+#pod the following parameters:
+#pod
+#pod my $sequence = $reader->read_into_assembler( $location, $assembler );
+#pod
+#pod The method should read the configuration found at C<$location> and use it to
+#pod instruct the C<$assembler> (a L<Config::MVP::Assembler>) what configuration to
+#pod perform.
+#pod
+#pod The default implementation of this method will throw an exception complaining
+#pod that it should have been implemented by a subclass.
+#pod
+#pod =cut
sub read_into_assembler {
confess 'required method read_into_assembler unimplemented'
}
-# =method build_assembler
-#
-# If no Assembler is provided to C<read_config>'s C<assembler> parameter, this
-# method will be called on the Reader to construct one.
-#
-# It must return a Config::MVP::Assembler object, and by default will return an
-# entirely generic one.
-#
-# =cut
+#pod =method build_assembler
+#pod
+#pod If no Assembler is provided to C<read_config>'s C<assembler> parameter, this
+#pod method will be called on the Reader to construct one.
+#pod
+#pod It must return a Config::MVP::Assembler object, and by default will return an
+#pod entirely generic one.
+#pod
+#pod =cut
sub build_assembler { Config::MVP::Assembler->new; }
@@ -102,7 +102,7 @@ Config::MVP::Reader - object to read config from storage into an assembler
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 SYNOPSIS
@@ -1,21 +1,21 @@
package Config::MVP::Section;
# ABSTRACT: one section of an MVP configuration sequence
-$Config::MVP::Section::VERSION = '2.200007';
+$Config::MVP::Section::VERSION = '2.200008';
use Moose 0.91;
use Class::Load 0.17 ();
use Config::MVP::Error;
-# =head1 DESCRIPTION
-#
-# For the most part, you can just consult L<Config::MVP> to understand what this
-# class is and how it's used.
-#
-# =attr name
-#
-# This is the section's name. It's a string, and it must be provided.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod For the most part, you can just consult L<Config::MVP> to understand what this
+#pod class is and how it's used.
+#pod
+#pod =attr name
+#pod
+#pod This is the section's name. It's a string, and it must be provided.
+#pod
+#pod =cut
has name => (
is => 'ro',
@@ -23,13 +23,13 @@ has name => (
required => 1
);
-# =attr package
-#
-# This is the (Perl) package with which the section is associated. It is
-# optional. When the section is instantiated, it will ensure that this package
-# is loaded.
-#
-# =cut
+#pod =attr package
+#pod
+#pod This is the (Perl) package with which the section is associated. It is
+#pod optional. When the section is instantiated, it will ensure that this package
+#pod is loaded.
+#pod
+#pod =cut
has package => (
is => 'ro',
@@ -38,19 +38,19 @@ has package => (
predicate => 'has_package',
);
-# =attr multivalue_args
-#
-# This attribute is an arrayref of value names that should be considered
-# multivalue properties in the section. When added to the section, they will
-# always be wrapped in an arrayref, and they may be added to the section more
-# than once.
-#
-# If this attribute is not given during construction, it will default to the
-# result of calling section's package's C<mvp_multivalue_args> method. If the
-# section has no associated package or if the package doesn't provide that
-# method, it default to an empty arrayref.
-#
-# =cut
+#pod =attr multivalue_args
+#pod
+#pod This attribute is an arrayref of value names that should be considered
+#pod multivalue properties in the section. When added to the section, they will
+#pod always be wrapped in an arrayref, and they may be added to the section more
+#pod than once.
+#pod
+#pod If this attribute is not given during construction, it will default to the
+#pod result of calling section's package's C<mvp_multivalue_args> method. If the
+#pod section has no associated package or if the package doesn't provide that
+#pod method, it default to an empty arrayref.
+#pod
+#pod =cut
has multivalue_args => (
is => 'ro',
@@ -66,25 +66,25 @@ has multivalue_args => (
},
);
-# =attr aliases
-#
-# This attribute is a hashref of name remappings. For example, if it contains
-# this hashref:
-#
-# {
-# file => 'files',
-# path => 'files',
-# }
-#
-# Then attempting to set either the "file" or "path" setting for the section
-# would actually set the "files" setting.
-#
-# If this attribute is not given during construction, it will default to the
-# result of calling section's package's C<mvp_aliases> method. If the
-# section has no associated package or if the package doesn't provide that
-# method, it default to an empty hashref.
-#
-# =cut
+#pod =attr aliases
+#pod
+#pod This attribute is a hashref of name remappings. For example, if it contains
+#pod this hashref:
+#pod
+#pod {
+#pod file => 'files',
+#pod path => 'files',
+#pod }
+#pod
+#pod Then attempting to set either the "file" or "path" setting for the section
+#pod would actually set the "files" setting.
+#pod
+#pod If this attribute is not given during construction, it will default to the
+#pod result of calling section's package's C<mvp_aliases> method. If the
+#pod section has no associated package or if the package doesn't provide that
+#pod method, it default to an empty hashref.
+#pod
+#pod =cut
has aliases => (
is => 'ro',
@@ -99,13 +99,13 @@ has aliases => (
},
);
-# =attr payload
-#
-# This is the storage into which properties are set. It is a hashref of names
-# and values. You should probably not alter the contents of the payload, and
-# should read its contents only.
-#
-# =cut
+#pod =attr payload
+#pod
+#pod This is the storage into which properties are set. It is a hashref of names
+#pod and values. You should probably not alter the contents of the payload, and
+#pod should read its contents only.
+#pod
+#pod =cut
has payload => (
is => 'ro',
@@ -114,13 +114,13 @@ has payload => (
default => sub { {} },
);
-# =attr is_finalized
-#
-# This attribute is true if the section has been marked finalized, which will
-# prevent any new values from being added to it. It can be set with the
-# C<finalize> method.
-#
-# =cut
+#pod =attr is_finalized
+#pod
+#pod This attribute is true if the section has been marked finalized, which will
+#pod prevent any new values from being added to it. It can be set with the
+#pod C<finalize> method.
+#pod
+#pod =cut
has is_finalized => (
is => 'ro',
@@ -138,13 +138,13 @@ before finalize => sub {
unless $self->sequence;
};
-# =attr sequence
-#
-# This attributes points to the sequence into which the section has been
-# assembled. It may be unset if the section has been created but not yet placed
-# in a sequence.
-#
-# =cut
+#pod =attr sequence
+#pod
+#pod This attributes points to the sequence into which the section has been
+#pod assembled. It may be unset if the section has been created but not yet placed
+#pod in a sequence.
+#pod
+#pod =cut
has sequence => (
is => 'ro',
@@ -176,18 +176,18 @@ sub sequence {
return $seq;
}
-# =method add_value
-#
-# $section->add_value( $name => $value );
-#
-# This method sets the value for the named property to the given value. If the
-# property is a multivalue property, the new value will be pushed onto the end of
-# an arrayref that will store all values for that property.
-#
-# Attempting to add a value for a non-multivalue property whose value was already
-# added will result in an exception.
-#
-# =cut
+#pod =method add_value
+#pod
+#pod $section->add_value( $name => $value );
+#pod
+#pod This method sets the value for the named property to the given value. If the
+#pod property is a multivalue property, the new value will be pushed onto the end of
+#pod an arrayref that will store all values for that property.
+#pod
+#pod Attempting to add a value for a non-multivalue property whose value was already
+#pod added will result in an exception.
+#pod
+#pod =cut
sub add_value {
my ($self, $name, $value) = @_;
@@ -214,16 +214,16 @@ sub add_value {
$self->payload->{$name} = $value;
}
-# =method load_package
-#
-# $section->load_package($package, $plugin);
-#
-# This method is used to ensure that the given C<$package> is loaded, and is
-# called whenever a section with a package is created. By default, it delegates
-# to L<Class::Load>. If the package can't be found, it calls the
-# L<missing_package> method. Errors in compilation are not suppressed.
-#
-# =cut
+#pod =method load_package
+#pod
+#pod $section->load_package($package, $plugin);
+#pod
+#pod This method is used to ensure that the given C<$package> is loaded, and is
+#pod called whenever a section with a package is created. By default, it delegates
+#pod to L<Class::Load>. If the package can't be found, it calls the
+#pod L<missing_package> method. Errors in compilation are not suppressed.
+#pod
+#pod =cut
sub load_package {
my ($self, $package, $plugin) = @_;
@@ -232,14 +232,14 @@ sub load_package {
or $self->missing_package($package, $plugin);
}
-# =method missing_package
-#
-# $section->missing_package($package, $plugin);
-#
-# This method is called when C<load_package> encounters a package that is not
-# installed. By default, it throws an exception.
-#
-# =cut
+#pod =method missing_package
+#pod
+#pod $section->missing_package($package, $plugin);
+#pod
+#pod This method is called when C<load_package> encounters a package that is not
+#pod installed. By default, it throws an exception.
+#pod
+#pod =cut
sub missing_package {
my ($self, $package, $plugin) = @_ ;
@@ -297,7 +297,7 @@ Config::MVP::Section - one section of an MVP configuration sequence
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,17 +1,17 @@
package Config::MVP::Sequence;
# ABSTRACT: an ordered set of named configuration sections
-$Config::MVP::Sequence::VERSION = '2.200007';
+$Config::MVP::Sequence::VERSION = '2.200008';
use Moose 0.91;
-# =head1 DESCRIPTION
-#
-# A Config::MVP::Sequence is an ordered set of configuration sections, each of
-# which has a name unique within the sequence.
-#
-# For the most part, you can just consult L<Config::MVP> to understand what this
-# class is and how it's used.
-#
-# =cut
+#pod =head1 DESCRIPTION
+#pod
+#pod A Config::MVP::Sequence is an ordered set of configuration sections, each of
+#pod which has a name unique within the sequence.
+#pod
+#pod For the most part, you can just consult L<Config::MVP> to understand what this
+#pod class is and how it's used.
+#pod
+#pod =cut
use Tie::IxHash;
use Config::MVP::Error;
@@ -60,13 +60,13 @@ sub assembler {
return $assembler;
}
-# =attr is_finalized
-#
-# This attribute is true if the sequence has been marked finalized, which will
-# prevent any changes (via methods like C<add_section> or C<delete_section>). It
-# can be set with the C<finalize> method.
-#
-# =cut
+#pod =attr is_finalized
+#pod
+#pod This attribute is true if the sequence has been marked finalized, which will
+#pod prevent any changes (via methods like C<add_section> or C<delete_section>). It
+#pod can be set with the C<finalize> method.
+#pod
+#pod =cut
has is_finalized => (
is => 'ro',
@@ -77,15 +77,15 @@ has is_finalized => (
handles => { finalize => 'set' },
);
-# =method add_section
-#
-# $sequence->add_section($section);
-#
-# This method adds the given section to the end of the sequence. If the sequence
-# already contains a section with the same name as the new section, an exception
-# will be raised.
-#
-# =cut
+#pod =method add_section
+#pod
+#pod $sequence->add_section($section);
+#pod
+#pod This method adds the given section to the end of the sequence. If the sequence
+#pod already contains a section with the same name as the new section, an exception
+#pod will be raised.
+#pod
+#pod =cut
sub add_section {
my ($self, $section) = @_;
@@ -106,14 +106,14 @@ sub add_section {
$self->_sections->{ $name } = $section;
}
-# =method delete_section
-#
-# my $deleted_section = $sequence->delete_section( $name );
-#
-# This method removes a section from the sequence and returns the removed
-# section. If no section existed, the method returns false.
-#
-# =cut
+#pod =method delete_section
+#pod
+#pod my $deleted_section = $sequence->delete_section( $name );
+#pod
+#pod This method removes a section from the sequence and returns the removed
+#pod section. If no section existed, the method returns false.
+#pod
+#pod =cut
sub delete_section {
my ($self, $name) = @_;
@@ -130,14 +130,14 @@ sub delete_section {
return delete $sections->{ $name };
}
-# =method section_named
-#
-# my $section = $sequence->section_named( $name );
-#
-# This method returns the section with the given name, if one exists in the
-# sequence. If no such section exists, the method returns false.
-#
-# =cut
+#pod =method section_named
+#pod
+#pod my $section = $sequence->section_named( $name );
+#pod
+#pod This method returns the section with the given name, if one exists in the
+#pod sequence. If no such section exists, the method returns false.
+#pod
+#pod =cut
sub section_named {
my ($self, $name) = @_;
@@ -147,26 +147,26 @@ sub section_named {
return $sections->{ $name };
}
-# =method section_names
-#
-# my @names = $sequence->section_names;
-#
-# This method returns a list of the names of the sections, in order.
-#
-# =cut
+#pod =method section_names
+#pod
+#pod my @names = $sequence->section_names;
+#pod
+#pod This method returns a list of the names of the sections, in order.
+#pod
+#pod =cut
sub section_names {
my ($self) = @_;
return keys %{ $self->_sections };
}
-# =method sections
-#
-# my @sections = $sequence->sections;
-#
-# This method returns the section objects, in order.
-#
-# =cut
+#pod =method sections
+#pod
+#pod my @sections = $sequence->sections;
+#pod
+#pod This method returns the section objects, in order.
+#pod
+#pod =cut
sub sections {
my ($self) = @_;
@@ -188,7 +188,7 @@ Config::MVP::Sequence - an ordered set of named configuration sections
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 DESCRIPTION
@@ -1,209 +1,209 @@
package Config::MVP;
# ABSTRACT: multivalue-property package-oriented configuration
-$Config::MVP::VERSION = '2.200007';
+$Config::MVP::VERSION = '2.200008';
use strict;
use warnings;
-# =head1 SYNOPSIS
-#
-# If you want a useful synopsis, consider this code which actually comes from
-# L<Config::MVP::Assembler|Config::MVP::Assembler>:
-#
-# my $assembler = Config::MVP::Assembler->new;
-#
-# # Maybe you want a starting section:
-# my $section = $assembler->section_class->new({ name => '_' });
-# $assembler->sequence->add_section($section);
-#
-# # We'll add some values, which will go to the starting section:
-# $assembler->add_value(x => 10);
-# $assembler->add_value(y => 20);
-#
-# # Change to a new section...
-# $assembler->change_section($moniker);
-#
-# # ...and add values to that section.
-# $assembler->add_value(x => 100);
-# $assembler->add_value(y => 200);
-#
-# This doesn't make sense? Well, read on.
-#
-# =head1 DESCRIPTION
-#
-# MVP is a mechanism for loading configuration (or other information) for
-# libraries. It doesn't read a file or a database. It's a helper for things
-# that do.
-#
-# The idea is that you end up with a
-# L<Config::MVP::Sequence|Config::MVP::Sequence> object, and that you can use
-# that object to fully configure your library or application. The sequence will
-# contain a bunch of L<Config::MVP::Section|Config::MVP::Section> objects, each
-# of which is meant to provide configuration for a part of your program. Most of
-# these sections will be directly related to a Perl library that you'll use as a
-# plugin or helper. Each section will have a name, and every name in the
-# sequence will be unique.
-#
-# This is a pretty abstract set of behaviors, so we'll provide some more concrete
-# examples that should help explain how things work.
-#
-# =head1 EXAMPLE
-#
-# Imagine that we've got a program called DeliveryBoy that accepts mail and does
-# stuff with it. The "stuff" is entirely up to the user's configuration. He can
-# set up plugins that will be used on the message. He writes a config file that's
-# read by L<Config::INI::MVP::Reader|Config::INI::MVP::Reader>, which is a thin
-# wrapper around Config::MVP used to load MVP-style config from F<INI> files.
-#
-# Here's the user's configuration:
-#
-# [Whitelist]
-# require_pgp = 1
-#
-# file = whitelist-family
-# file = whitelist-friends
-# file = whitelist-work
-#
-# [SpamFilter]
-# filterset = standard
-# max_score = 5
-# action = bounce
-#
-# [SpamFilter / SpamFilter_2]
-# filterset = aggressive
-# max_score = 5
-# action = tag
-#
-# [VerifyPGP]
-#
-# [Deliver]
-# dest = Maildir
-#
-# The user will end up with a sequence with five sections, which we can represent
-# something like this:
-#
-# { name => 'Whitelist',
-# package => 'DeliveryBoy::Plugin::Whitelist',
-# payload => {
-# require_pgp => 1,
-# files => [ qw(whitelist-family whitelist-friends whitelist-work) ]
-# },
-# },
-# { name => 'SpamFilter',
-# package => 'DeliveryBoy::Plugin::SpamFilter',
-# payload => {
-# filterset => 'standard',
-# max_score => 5,
-# action => 'bounce',
-# }
-# },
-# { name => 'SpamFilter_2',
-# package => 'DeliveryBoy::Plugin::SpamFilter',
-# payload => {
-# filterset => 'aggressive',
-# max_score => 5,
-# action => 'tag',
-# },
-# },
-# { name => 'VerifyPGP',
-# package => 'DeliveryBoy::Plugin::VerifyPGP',
-# payload => { },
-# },
-# { name => 'Deliver',
-# package => 'DeliveryBoy::Plugin::Deliver',
-# payload => { dest => 'Maildir' },
-# },
-#
-# The INI reader uses L<Config::MVP::Assembler|Config::MVP::Assembler> to build
-# up configuration section by section as it goes, so that's how we'll talk about
-# what's going on.
-#
-# Every section of the config file was converted into a section in the MVP
-# sequence. Each section has a unique name, which defaults to the name of the
-# INI section. Each section is also associated with a package, which was
-# expanded from the INI section name. The way that names are expanded can be
-# customized by subclassing the assembler.
-#
-# Every section also has a payload -- a hashref of settings. Note that every
-# entry in every payload is a simple scalar except for one. The C<files> entry
-# for the Whitelist section is an arrayref. Also, note that while it appears as
-# C<files> in the final output, it was given as C<file> in the input.
-#
-# Config::MVP provides a mechanism by which packages can define aliases for
-# configuration names and an indication of what names correspond to "multi-value
-# parameters." (That's part of the meaning of the name "MVP.") When the MVP
-# assembler is told to start a section for C<Whitelist> it expands the section
-# name, loads the package, and inspects it for aliases and multivalue parameters.
-# Then if multiple entries for a non-multivalue parameter are given, an exception
-# can be raised. Multivalue parameters are always pushed onto arrayrefs and
-# non-multivalue parameters are left as found.
-#
-# =head2 ...so what now?
-#
-# So, once our DeliveryBoy program has loaded its configuration, it needs to
-# initialize its plugins. It can do something like the following:
-#
-# my $sequence = $deliveryboy->load_config;
-#
-# for my $section ($sequence->sections) {
-# my $plugin = $section->package->new( $section->payload );
-# $deliveryboy->add_plugin( $section->name, $plugin );
-# }
-#
-# That's it! In fact, allowing this very, very block of code to load
-# configuration and initialize plugins is the goal of Config::MVP.
-#
-# The one thing not depicted is the notion of a "root section" that you might
-# expect to see in an INI file. This can be easily handled by starting your
-# assembler off with a pre-built section where root settings will end up. For
-# more information on this, look at the docs for the specific components.
-#
-# =head1 WHAT NEXT?
-#
-# =head2 Making Packages work with MVP
-#
-# Any package can be used as part of an MVP section. Packages can provide some
-# methods to help MVP work with them. It isn't a problem if they are not defined
-#
-# =head3 mvp_aliases
-#
-# This method should return a hashref of name remappings. For example, if it
-# returned this hashref:
-#
-# {
-# file => 'files',
-# path => 'files',
-# }
-#
-# Then attempting to set either the "file" or "path" setting for the section
-# would actually set the "files" setting.
-#
-# =head3 mvp_multivalue_args
-#
-# This method should return a list of setting names that may have multiple values
-# and that will always be stored in an arrayref.
-#
-# =head2 The Assembler
-#
-# L<Config::MVP::Assembler|Config::MVP::Assembler> is a state machine that makes
-# it easy to build up your MVP-style configuration by firing off a series of
-# events: new section, new setting, etc. You might want to subclass it to change
-# the class of sequence or section that's used or to change how section names are
-# expanded into packages.
-#
-# =head2 Sequences and Sections
-#
-# L<Config::MVP::Sequence|Config::MVP::Sequence> and
-# L<Config::MVP::Section|Config::MVP::Section> are the two most important classes
-# in MVP. They represent the overall configuration and each section of the
-# configuration, respectively. They're both fairly simple classes, and you
-# probably won't need to subclass them, but it's easy.
-#
-# =head2 Examples in the World
-#
-# For examples of Config::MVP in use, you can look at L<Dist::Zilla|Dist::Zilla>
-# or L<App::Addex|App::Addex>.
-#
-# =cut
+#pod =head1 SYNOPSIS
+#pod
+#pod If you want a useful synopsis, consider this code which actually comes from
+#pod L<Config::MVP::Assembler|Config::MVP::Assembler>:
+#pod
+#pod my $assembler = Config::MVP::Assembler->new;
+#pod
+#pod # Maybe you want a starting section:
+#pod my $section = $assembler->section_class->new({ name => '_' });
+#pod $assembler->sequence->add_section($section);
+#pod
+#pod # We'll add some values, which will go to the starting section:
+#pod $assembler->add_value(x => 10);
+#pod $assembler->add_value(y => 20);
+#pod
+#pod # Change to a new section...
+#pod $assembler->change_section($moniker);
+#pod
+#pod # ...and add values to that section.
+#pod $assembler->add_value(x => 100);
+#pod $assembler->add_value(y => 200);
+#pod
+#pod This doesn't make sense? Well, read on.
+#pod
+#pod =head1 DESCRIPTION
+#pod
+#pod MVP is a mechanism for loading configuration (or other information) for
+#pod libraries. It doesn't read a file or a database. It's a helper for things
+#pod that do.
+#pod
+#pod The idea is that you end up with a
+#pod L<Config::MVP::Sequence|Config::MVP::Sequence> object, and that you can use
+#pod that object to fully configure your library or application. The sequence will
+#pod contain a bunch of L<Config::MVP::Section|Config::MVP::Section> objects, each
+#pod of which is meant to provide configuration for a part of your program. Most of
+#pod these sections will be directly related to a Perl library that you'll use as a
+#pod plugin or helper. Each section will have a name, and every name in the
+#pod sequence will be unique.
+#pod
+#pod This is a pretty abstract set of behaviors, so we'll provide some more concrete
+#pod examples that should help explain how things work.
+#pod
+#pod =head1 EXAMPLE
+#pod
+#pod Imagine that we've got a program called DeliveryBoy that accepts mail and does
+#pod stuff with it. The "stuff" is entirely up to the user's configuration. He can
+#pod set up plugins that will be used on the message. He writes a config file that's
+#pod read by L<Config::MVP::Reader::INI|Config::MVP::Reader::INI>, which is a thin
+#pod wrapper around Config::MVP used to load MVP-style config from F<INI> files.
+#pod
+#pod Here's the user's configuration:
+#pod
+#pod [Whitelist]
+#pod require_pgp = 1
+#pod
+#pod file = whitelist-family
+#pod file = whitelist-friends
+#pod file = whitelist-work
+#pod
+#pod [SpamFilter]
+#pod filterset = standard
+#pod max_score = 5
+#pod action = bounce
+#pod
+#pod [SpamFilter / SpamFilter_2]
+#pod filterset = aggressive
+#pod max_score = 5
+#pod action = tag
+#pod
+#pod [VerifyPGP]
+#pod
+#pod [Deliver]
+#pod dest = Maildir
+#pod
+#pod The user will end up with a sequence with five sections, which we can represent
+#pod something like this:
+#pod
+#pod { name => 'Whitelist',
+#pod package => 'DeliveryBoy::Plugin::Whitelist',
+#pod payload => {
+#pod require_pgp => 1,
+#pod files => [ qw(whitelist-family whitelist-friends whitelist-work) ]
+#pod },
+#pod },
+#pod { name => 'SpamFilter',
+#pod package => 'DeliveryBoy::Plugin::SpamFilter',
+#pod payload => {
+#pod filterset => 'standard',
+#pod max_score => 5,
+#pod action => 'bounce',
+#pod }
+#pod },
+#pod { name => 'SpamFilter_2',
+#pod package => 'DeliveryBoy::Plugin::SpamFilter',
+#pod payload => {
+#pod filterset => 'aggressive',
+#pod max_score => 5,
+#pod action => 'tag',
+#pod },
+#pod },
+#pod { name => 'VerifyPGP',
+#pod package => 'DeliveryBoy::Plugin::VerifyPGP',
+#pod payload => { },
+#pod },
+#pod { name => 'Deliver',
+#pod package => 'DeliveryBoy::Plugin::Deliver',
+#pod payload => { dest => 'Maildir' },
+#pod },
+#pod
+#pod The INI reader uses L<Config::MVP::Assembler|Config::MVP::Assembler> to build
+#pod up configuration section by section as it goes, so that's how we'll talk about
+#pod what's going on.
+#pod
+#pod Every section of the config file was converted into a section in the MVP
+#pod sequence. Each section has a unique name, which defaults to the name of the
+#pod INI section. Each section is also associated with a package, which was
+#pod expanded from the INI section name. The way that names are expanded can be
+#pod customized by subclassing the assembler.
+#pod
+#pod Every section also has a payload -- a hashref of settings. Note that every
+#pod entry in every payload is a simple scalar except for one. The C<files> entry
+#pod for the Whitelist section is an arrayref. Also, note that while it appears as
+#pod C<files> in the final output, it was given as C<file> in the input.
+#pod
+#pod Config::MVP provides a mechanism by which packages can define aliases for
+#pod configuration names and an indication of what names correspond to "multi-value
+#pod parameters." (That's part of the meaning of the name "MVP.") When the MVP
+#pod assembler is told to start a section for C<Whitelist> it expands the section
+#pod name, loads the package, and inspects it for aliases and multivalue parameters.
+#pod Then if multiple entries for a non-multivalue parameter are given, an exception
+#pod can be raised. Multivalue parameters are always pushed onto arrayrefs and
+#pod non-multivalue parameters are left as found.
+#pod
+#pod =head2 ...so what now?
+#pod
+#pod So, once our DeliveryBoy program has loaded its configuration, it needs to
+#pod initialize its plugins. It can do something like the following:
+#pod
+#pod my $sequence = $deliveryboy->load_config;
+#pod
+#pod for my $section ($sequence->sections) {
+#pod my $plugin = $section->package->new( $section->payload );
+#pod $deliveryboy->add_plugin( $section->name, $plugin );
+#pod }
+#pod
+#pod That's it! In fact, allowing this very, very block of code to load
+#pod configuration and initialize plugins is the goal of Config::MVP.
+#pod
+#pod The one thing not depicted is the notion of a "root section" that you might
+#pod expect to see in an INI file. This can be easily handled by starting your
+#pod assembler off with a pre-built section where root settings will end up. For
+#pod more information on this, look at the docs for the specific components.
+#pod
+#pod =head1 WHAT NEXT?
+#pod
+#pod =head2 Making Packages work with MVP
+#pod
+#pod Any package can be used as part of an MVP section. Packages can provide some
+#pod methods to help MVP work with them. It isn't a problem if they are not defined
+#pod
+#pod =head3 mvp_aliases
+#pod
+#pod This method should return a hashref of name remappings. For example, if it
+#pod returned this hashref:
+#pod
+#pod {
+#pod file => 'files',
+#pod path => 'files',
+#pod }
+#pod
+#pod Then attempting to set either the "file" or "path" setting for the section
+#pod would actually set the "files" setting.
+#pod
+#pod =head3 mvp_multivalue_args
+#pod
+#pod This method should return a list of setting names that may have multiple values
+#pod and that will always be stored in an arrayref.
+#pod
+#pod =head2 The Assembler
+#pod
+#pod L<Config::MVP::Assembler|Config::MVP::Assembler> is a state machine that makes
+#pod it easy to build up your MVP-style configuration by firing off a series of
+#pod events: new section, new setting, etc. You might want to subclass it to change
+#pod the class of sequence or section that's used or to change how section names are
+#pod expanded into packages.
+#pod
+#pod =head2 Sequences and Sections
+#pod
+#pod L<Config::MVP::Sequence|Config::MVP::Sequence> and
+#pod L<Config::MVP::Section|Config::MVP::Section> are the two most important classes
+#pod in MVP. They represent the overall configuration and each section of the
+#pod configuration, respectively. They're both fairly simple classes, and you
+#pod probably won't need to subclass them, but it's easy.
+#pod
+#pod =head2 Examples in the World
+#pod
+#pod For examples of Config::MVP in use, you can look at L<Dist::Zilla|Dist::Zilla>
+#pod or L<App::Addex|App::Addex>.
+#pod
+#pod =cut
1;
@@ -219,7 +219,7 @@ Config::MVP - multivalue-property package-oriented configuration
=head1 VERSION
-version 2.200007
+version 2.200008
=head1 SYNOPSIS
@@ -268,7 +268,7 @@ examples that should help explain how things work.
Imagine that we've got a program called DeliveryBoy that accepts mail and does
stuff with it. The "stuff" is entirely up to the user's configuration. He can
set up plugins that will be used on the message. He writes a config file that's
-read by L<Config::INI::MVP::Reader|Config::INI::MVP::Reader>, which is a thin
+read by L<Config::MVP::Reader::INI|Config::MVP::Reader::INI>, which is a thin
wrapper around Config::MVP used to load MVP-style config from F<INI> files.
Here's the user's configuration:
@@ -52,7 +52,6 @@ eval { $v .= pmver('Class::Load','0.17') };
eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
eval { $v .= pmver('File::Spec','any version') };
eval { $v .= pmver('Module::Pluggable::Object','any version') };
-eval { $v .= pmver('Module::Runtime','any version') };
eval { $v .= pmver('Moose','0.91') };
eval { $v .= pmver('Moose::Role','any version') };
eval { $v .= pmver('Moose::Util::TypeConstraints','any version') };
@@ -1,6 +1,10 @@
use strict;
use warnings;
+{ no warnings 'once';
+ @Config::MVP::Reader::Finder::DONT_FIND = qw( Config::MVP::Reader::INI );
+}
+
use Test::More;
use lib 't/lib';
@@ -4,7 +4,7 @@ use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '2.200007';
+my $newver = '2.200008';
my $trial_token = '-TRIAL';
SKIP: {
@@ -1,8 +1,6 @@
#!perl
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
all_pod_files_ok();