r58516 - in /trunk/libconfig-mvp-perl: ./ debian/ lib/Config/ lib/Config/MVP/ lib/Config/MVP/Assembler/ lib/Config/MVP/Reader/ lib/Config/MVP/Reader/Findable/ t/lib/Config/MVP/Reader/
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Thu May 27 16:02:28 UTC 2010
Author: ansgar-guest
Date: Thu May 27 16:01:38 2010
New Revision: 58516
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58516
Log:
TODO: Upload together with libdist-zilla-perl, libpod-weaver-perl,
libconfig-mvp-reader-ini-perl
* Breaks:
- libconfig-ini-mvp-perl (<< 1.101451-2)
- libconfig-mvp-reader-ini-perl (<< 2.101460)
- libdist-zilla-perl (<< 3.101450~)
- libpod-weaver-perl (<< 3.101450~)
Modified:
trunk/libconfig-mvp-perl/Changes
trunk/libconfig-mvp-perl/META.json
trunk/libconfig-mvp-perl/META.yml
trunk/libconfig-mvp-perl/Makefile.PL
trunk/libconfig-mvp-perl/README
trunk/libconfig-mvp-perl/debian/changelog
trunk/libconfig-mvp-perl/debian/control
trunk/libconfig-mvp-perl/dist.ini
trunk/libconfig-mvp-perl/lib/Config/MVP.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler/WithBundles.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Reader.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable/ByExtension.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Finder.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Hash.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Section.pm
trunk/libconfig-mvp-perl/lib/Config/MVP/Sequence.pm
trunk/libconfig-mvp-perl/t/lib/Config/MVP/Reader/Test.pm
Modified: trunk/libconfig-mvp-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/Changes?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/Changes (original)
+++ trunk/libconfig-mvp-perl/Changes Thu May 27 16:01:38 2010
@@ -1,4 +1,14 @@
Revision history for Config-MVP
+
+2.101460 2010-05-26 22:29:43 America/New_York
+ [BREAKS BACKWARD COMPATIBILITY]
+
+ I apologize for breaking backcompat twice in a week. I do not
+ expect this to happen again. -- rjbs
+
+ Config::MVP::Reader is now a base class rather than a role.
+ This significantly simplifies the use of Config::MVP readers
+ and makes things easier to document.
1.101451 2010-05-25 22:38:06 America/New_York
always finalize sections added by bundles
Modified: trunk/libconfig-mvp-perl/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/META.json?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/META.json (original)
+++ trunk/libconfig-mvp-perl/META.json Thu May 27 16:01:38 2010
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs at cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 3.101450",
+ "generated_by" : "Dist::Zilla version 3.101460",
"license" : "perl_5",
"meta-spec" : {
"url" : "http://github.com/dagolden/cpan-meta/",
@@ -40,7 +40,7 @@
"url" : "git://git.codesimply.com/Config-MVP.git"
}
},
- "version" : "1.101451",
+ "version" : "2.101460",
"x_Dist_Zilla" : {
"plugins" : [
{
@@ -52,112 +52,112 @@
}
},
"name" : "Prereq",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereq",
"name" : "@RJBS/AutoPrereq",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::AutoVersion",
"name" : "@RJBS/AutoVersion",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
@@ -192,22 +192,22 @@
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "3.101450"
+ "version" : "3.101460"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "3.101450"
+ "version" : "3.101460"
}
],
"zilla" : {
@@ -215,7 +215,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "3.101450"
+ "version" : "3.101460"
}
}
}
Modified: trunk/libconfig-mvp-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/META.yml?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/META.yml (original)
+++ trunk/libconfig-mvp-perl/META.yml Thu May 27 16:01:38 2010
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 3.101450, CPAN::Meta::Converter version 2.101450'
+generated_by: 'Dist::Zilla version 3.101460, CPAN::Meta::Converter version 2.101460'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,7 +24,7 @@
Tie::IxHash: 0
resources:
repository: git://git.codesimply.com/Config-MVP.git
-version: 1.101451
+version: 2.101460
x_Dist_Zilla:
plugins:
-
@@ -34,91 +34,91 @@
phase: runtime
type: requires
name: Prereq
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::AutoPrereq
name: '@RJBS/AutoPrereq'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::AutoVersion
name: '@RJBS/AutoVersion'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
@@ -146,21 +146,21 @@
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 3.101450
+ version: 3.101460
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 3.101450
+ version: 3.101460
zilla:
class: Dist::Zilla
config:
is_trial: 0
- version: 3.101450
+ version: 3.101460
Modified: trunk/libconfig-mvp-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/Makefile.PL?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/Makefile.PL (original)
+++ trunk/libconfig-mvp-perl/Makefile.PL Thu May 27 16:01:38 2010
@@ -31,7 +31,7 @@
'Test::More' => '0.88',
'Tie::IxHash' => '0'
},
- 'VERSION' => '1.101451',
+ 'VERSION' => '2.101460',
'test' => {
'TESTS' => 't/*.t'
}
Modified: trunk/libconfig-mvp-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/README?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/README (original)
+++ trunk/libconfig-mvp-perl/README Thu May 27 16:01:38 2010
@@ -1,7 +1,7 @@
This archive contains the distribution Config-MVP,
-version 1.101451:
+version 2.101460:
multivalue-property package-oriented configuration
Modified: trunk/libconfig-mvp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/debian/changelog?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/debian/changelog (original)
+++ trunk/libconfig-mvp-perl/debian/changelog Thu May 27 16:01:38 2010
@@ -1,13 +1,16 @@
-libconfig-mvp-perl (1.101451-1) UNRELEASED; urgency=low
+libconfig-mvp-perl (2.101460-1) UNRELEASED; urgency=low
- WAITS-FOR: libconfig-mvp-reader-ini-perl 1.101460-1
- TODO: Upload together with libdist-zilla-perl, libpod-weaver-perl.
- TODO: Breaks: libconfig-mvp-perl (<< 1.101451-2) required?
+ TODO: Upload together with libdist-zilla-perl, libpod-weaver-perl,
+ libconfig-mvp-reader-ini-perl
* New upstream release.
- * Breaks: libdist-zilla-perl (< 3.101450~), libpod-weaver-perl (< 3.101450~)
+ * Breaks:
+ - libconfig-ini-mvp-perl (<< 1.101451-2)
+ - libconfig-mvp-reader-ini-perl (<< 2.101460)
+ - libdist-zilla-perl (<< 3.101450~)
+ - libpod-weaver-perl (<< 3.101450~)
- -- Ansgar Burchardt <ansgar at 43-1.org> Wed, 26 May 2010 20:42:16 +0900
+ -- Ansgar Burchardt <ansgar at 43-1.org> Fri, 28 May 2010 00:33:52 +0900
libconfig-mvp-perl (0.101410-1) unstable; urgency=low
Modified: trunk/libconfig-mvp-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/debian/control?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/debian/control (original)
+++ trunk/libconfig-mvp-perl/debian/control Thu May 27 16:01:38 2010
@@ -18,7 +18,11 @@
Architecture: all
Depends: ${perl:Depends}, ${misc:Depends}, libtie-ixhash-perl, libmoose-perl,
perl (>= 5.8.9) | libmodule-pluggable-perl, libparams-util-perl
-Breaks: libdist-zilla-perl (<< 3.101450~), libpod-weaver-perl (<< 3.101450~)
+Breaks:
+ libconfig-ini-mvp-perl (<< 1.101451-2),
+ libconfig-mvp-reader-ini-perl (<< 2.101460),
+ libdist-zilla-perl (<< 3.101450~),
+ libpod-weaver-perl (<< 3.101450~)
Description: multivalue-property package-oriented configuration module
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
Modified: trunk/libconfig-mvp-perl/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/dist.ini?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/dist.ini (original)
+++ trunk/libconfig-mvp-perl/dist.ini Thu May 27 16:01:38 2010
@@ -10,4 +10,4 @@
Test::More = 0.88
[@RJBS]
-version = 1
+version = 2
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP;
BEGIN {
- $Config::MVP::VERSION = '1.101451';
+ $Config::MVP::VERSION = '2.101460';
}
# ABSTRACT: multivalue-property package-oriented configuration
use strict;
@@ -18,7 +18,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 SYNOPSIS
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP::Assembler;
BEGIN {
- $Config::MVP::Assembler::VERSION = '1.101451';
+ $Config::MVP::Assembler::VERSION = '2.101460';
}
use Moose;
# ABSTRACT: multivalue-property config-loading state machine
@@ -123,7 +123,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler/WithBundles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler/WithBundles.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler/WithBundles.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Assembler/WithBundles.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP::Assembler::WithBundles;
BEGIN {
- $Config::MVP::Assembler::WithBundles::VERSION = '1.101451';
+ $Config::MVP::Assembler::WithBundles::VERSION = '2.101460';
}
use Moose::Role;
# ABSTRACT: a role to make assemblers expand bundles
@@ -96,7 +96,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Reader.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Reader.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Reader.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Reader.pm Thu May 27 16:01:38 2010
@@ -1,28 +1,35 @@
package Config::MVP::Reader;
BEGIN {
- $Config::MVP::Reader::VERSION = '1.101451';
+ $Config::MVP::Reader::VERSION = '2.101460';
}
-use Moose::Role;
-# ABSTRACT: role to load MVP-style config from a file
+use Moose;
+# ABSTRACT: object to read config from storage into an assembler
use Config::MVP::Assembler;
-
-
-sub build_assembler { Config::MVP::Assembler->new; }
sub read_config {
my ($self, $location, $arg) = @_;
$arg ||= {};
+ $self = $self->new unless blessed $self;
+
my $assembler = $arg->{assembler} || $self->build_assembler;
$self->read_into_assembler($location, $assembler);
+
+ return $assembler->sequence;
}
-requires 'read_into_assembler';
-no Moose::Role;
+sub read_into_assembler {
+ confess 'required method read_into_assembler unimplemented'
+}
+
+
+sub build_assembler { Config::MVP::Assembler->new; }
+
+no Moose;
1;
__END__
@@ -30,20 +37,62 @@
=head1 NAME
-Config::MVP::Reader - role to load MVP-style config from a file
+Config::MVP::Reader - object to read config from storage into an assembler
=head1 VERSION
-version 1.101451
+version 2.101460
+
+=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
-The config role provides some helpers for writing a configuration loader using
-the L<Config::MVP|Config::MVP> system to load and validate its configuration.
-It delegates assembly of the configuration sequence to an Assembler. The
-Reader is responsible for opening, reading, and interpreting a file.
+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.
=head1 METHODS
+
+=head2 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.
+
+=head2 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.
=head2 build_assembler
@@ -52,10 +101,6 @@
It must return a Config::MVP::Assembler object, and by default will return an
entirely generic one.
-
-=head2 read_config
-
- my $sequence = $reader->read_config($location, \%arg);
=head1 AUTHOR
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP::Reader::Findable;
BEGIN {
- $Config::MVP::Reader::Findable::VERSION = '1.101451';
+ $Config::MVP::Reader::Findable::VERSION = '2.101460';
}
use Moose::Role;
# ABSTRACT: a config class that Config::MVP::Reader::Finder can find
@@ -21,7 +21,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable/ByExtension.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable/ByExtension.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable/ByExtension.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Findable/ByExtension.pm Thu May 27 16:01:38 2010
@@ -1,11 +1,11 @@
package Config::MVP::Reader::Findable::ByExtension;
BEGIN {
- $Config::MVP::Reader::Findable::ByExtension::VERSION = '1.101451';
+ $Config::MVP::Reader::Findable::ByExtension::VERSION = '2.101460';
}
use Moose::Role;
# ABSTRACT: a Findable Reader that looks for files by extension
-with qw(Config::MVP::Reader Config::MVP::Reader::Findable);
+with qw(Config::MVP::Reader::Findable);
use File::Spec;
@@ -33,7 +33,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 METHODS
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Finder.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Finder.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Finder.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Finder.pm Thu May 27 16:01:38 2010
@@ -1,9 +1,9 @@
package Config::MVP::Reader::Finder;
BEGIN {
- $Config::MVP::Reader::Finder::VERSION = '1.101451';
+ $Config::MVP::Reader::Finder::VERSION = '2.101460';
}
use Moose;
-with qw(Config::MVP::Reader);
+extends 'Config::MVP::Reader';
# ABSTRACT: a reader that finds an appropriate file
@@ -70,7 +70,7 @@
sub build_assembler { }
sub read_into_assembler {
- die "This method should never be called or reachable";
+ confess "This method should never be called or reachable";
}
no Moose;
@@ -86,7 +86,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
@@ -98,9 +98,11 @@
reader finds a file, it is used to read the file and the configuration sequence
is returned. Otherwise, an exception is raised.
-The Finder's assembler is passed to the Findable reader when it's instantiated.
-That means that a single subclass of Finder with its own assembler can use
-generic configuration readers to avoid needless, tiny subclasses.
+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.
=head1 METHODS
@@ -109,7 +111,7 @@
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)
+ qw( Config::MVP::Reader )
=head1 AUTHOR
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Hash.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Hash.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Hash.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Reader/Hash.pm Thu May 27 16:01:38 2010
@@ -1,9 +1,9 @@
package Config::MVP::Reader::Hash;
BEGIN {
- $Config::MVP::Reader::Hash::VERSION = '1.101451';
+ $Config::MVP::Reader::Hash::VERSION = '2.101460';
}
use Moose;
-with qw(Config::MVP::Reader);
+extends 'Config::MVP::Reader';
# ABSTRACT: a reader that tries to cope with a plain old hashref
@@ -43,7 +43,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 SYNOPSIS
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Section.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Section.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Section.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Section.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP::Section;
BEGIN {
- $Config::MVP::Section::VERSION = '1.101451';
+ $Config::MVP::Section::VERSION = '2.101460';
}
use Moose;
# ABSTRACT: one section of an MVP configuration sequence
@@ -165,7 +165,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
Modified: trunk/libconfig-mvp-perl/lib/Config/MVP/Sequence.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/lib/Config/MVP/Sequence.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/lib/Config/MVP/Sequence.pm (original)
+++ trunk/libconfig-mvp-perl/lib/Config/MVP/Sequence.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,6 @@
package Config::MVP::Sequence;
BEGIN {
- $Config::MVP::Sequence::VERSION = '1.101451';
+ $Config::MVP::Sequence::VERSION = '2.101460';
}
use Moose;
# ABSTRACT: an ordered set of named configuration sections
@@ -129,7 +129,7 @@
=head1 VERSION
-version 1.101451
+version 2.101460
=head1 DESCRIPTION
Modified: trunk/libconfig-mvp-perl/t/lib/Config/MVP/Reader/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-mvp-perl/t/lib/Config/MVP/Reader/Test.pm?rev=58516&op=diff
==============================================================================
--- trunk/libconfig-mvp-perl/t/lib/Config/MVP/Reader/Test.pm (original)
+++ trunk/libconfig-mvp-perl/t/lib/Config/MVP/Reader/Test.pm Thu May 27 16:01:38 2010
@@ -1,6 +1,7 @@
package Config::MVP::Reader::Test;
use Moose;
-with qw(Config::MVP::Reader Config::MVP::Reader::Findable::ByExtension);
+extends 'Config::MVP::Reader';
+with qw(Config::MVP::Reader::Findable::ByExtension);
sub default_extension { 'mvp-test' }
More information about the Pkg-perl-cvs-commits
mailing list