From: Graham Knop Date: Sun, 9 Apr 2017 13:55:58 +0000 (+0200) Subject: white space cleanups X-Git-Tag: v0.31~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=19f6cb6387c498de75ffc388b5db53c9da678e05;p=p5sagit%2FConfig-Any.git white space cleanups --- diff --git a/Changes b/Changes index 1a0ce05..5930ab8 100644 --- a/Changes +++ b/Changes @@ -14,7 +14,7 @@ Revision history for Config-Any - load perl files directly, never possibly searching @INC 0.27 2016-03-31 - - depend on Module::Pluggable::Object directly instead of assuming it is + - depend on Module::Pluggable::Object directly instead of assuming it is bundled with Module::Pluggable (RT #113148) 0.26 2015-04-29 @@ -31,7 +31,7 @@ Revision history for Config-Any - fix test suite's method of checking availability of plugins 0.22 2011-07-04 - - add XML::NamespaceSupport to XML format deps, silence YAML warnings in + - add XML::NamespaceSupport to XML format deps, silence YAML warnings in tests (caelum) 0.21 2011-05-25 @@ -125,7 +125,7 @@ Revision history for Config-Any + 'force_plugins => [ qw(Config::Any::Foo Config::Any::Blah) ]' parameter to load_(files|stems) + $Config::Any::INI::MAP_SECTION_SPACE_TO_NESTED_KEY - boolean, defaulting - to on, controlling whether to map spaces in INI section headings + to on, controlling whether to map spaces in INI section headings to nested hashrefs 0.04 2006-08-07 diff --git a/lib/Config/Any.pm b/lib/Config/Any.pm index 26cc806..fecb247 100644 --- a/lib/Config/Any.pm +++ b/lib/Config/Any.pm @@ -33,14 +33,14 @@ to load configuration data from multiple different file formats. It supports XML JSON, Apache-style configuration, Windows INI files, and even Perl code. The rationale for this module is as follows: Perl programs are deployed on many different -platforms and integrated with many different systems. Systems administrators and end +platforms and integrated with many different systems. Systems administrators and end users may prefer different configuration formats than the developers. The flexibility -inherent in a multiple format configuration loader allows different users to make +inherent in a multiple format configuration loader allows different users to make different choices, without generating extra work for the developers. As a developer you only need to learn a single interface to be able to use the power of different configuration formats. -=head1 INTERFACE +=head1 INTERFACE =cut @@ -54,15 +54,15 @@ configuration formats. C attempts to load configuration from the list of files passed in the C parameter, if the file exists. -If the C parameter is set, it is used as a callback to modify the configuration -data before it is returned. It will be passed a single hash-reference parameter which +If the C parameter is set, it is used as a callback to modify the configuration +data before it is returned. It will be passed a single hash-reference parameter which it should modify in-place. If the C parameter is defined, the loader will attempt to parse the file extension from each filename and will skip the file unless it matches a standard extension for the loading plugins. Only plugins whose standard extensions match the file extension will be used. For efficiency reasons, its use is encouraged, but -be aware that you will lose flexibility -- for example, a file called C +be aware that you will lose flexibility -- for example, a file called C containing YAML data will not be offered to the YAML plugin, whereas C or C would be. @@ -70,9 +70,9 @@ When the C parameter is defined, the loader will return a hash keyed on the file names, as opposed to the usual list of single-key hashes. C also supports a 'force_plugins' parameter, whose value should be an -arrayref of plugin names like C. Its intended use is to allow the use +arrayref of plugin names like C. Its intended use is to allow the use of a non-standard file extension while forcing it to be offered to a particular parser. -It is not compatible with 'use_ext'. +It is not compatible with 'use_ext'. You can supply a C hashref to pass special options to a particular parser object. Example: @@ -102,7 +102,7 @@ sub load_files { Config::Any->load_stems( { stems => \@stems, flatten_to_hash => 1 } ); C attempts to load configuration from a list of files which it generates -by combining the filename stems list passed in the C parameter with the +by combining the filename stems list passed in the C parameter with the potential filename extensions from each loader, which you can check with the C classmethod described below. Once this list of possible filenames is built it is treated exactly as in C above, as which it takes the same @@ -245,7 +245,7 @@ sub _support_error { =head2 finder( ) -The C classmethod returns the +The C classmethod returns the L object which is used to load the plugins. See the documentation for that module for more information. @@ -264,7 +264,7 @@ sub finder { =head2 plugins( ) -The C classmethod returns the names of configuration loading plugins as +The C classmethod returns the names of configuration loading plugins as found by L. =cut @@ -343,7 +343,7 @@ Joel Bernstein Erataxis@cpan.orgE =head1 CONTRIBUTORS -This module was based on the original +This module was based on the original L module by Brian Cassidy C<< >>. @@ -384,7 +384,7 @@ SUCH DAMAGES. =head1 SEE ALSO -L +L -- now a wrapper around this module. =cut diff --git a/lib/Config/Any/Base.pm b/lib/Config/Any/Base.pm index 9d4ebe3..2826cb6 100644 --- a/lib/Config/Any/Base.pm +++ b/lib/Config/Any/Base.pm @@ -70,11 +70,11 @@ Brian Cassidy Ebricas@cpan.orgE Copyright 2008-2009 by Brian Cassidy This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/General.pm b/lib/Config/Any/General.pm index db32022..2cbd2e8 100644 --- a/lib/Config/Any/General.pm +++ b/lib/Config/Any/General.pm @@ -81,11 +81,11 @@ Copyright 2006-2016 by Brian Cassidy Portions Copyright 2006 Portugal Telecom This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/INI.pm b/lib/Config/Any/INI.pm index 2c7e1a2..4b71995 100644 --- a/lib/Config/Any/INI.pm +++ b/lib/Config/Any/INI.pm @@ -16,10 +16,10 @@ Config::Any::INI - Load INI config files Loads INI files. Example: name=TestApp - + [Controller::Foo] foo=bar - + [Model::Baz] qux=xyzzy @@ -85,7 +85,7 @@ sub requires_all_of { 'Config::Tiny' } This variable controls whether spaces in INI section headings will be expanded into nested hash keys. e.g. it controls whether [Full Power] maps to $config->{'Full Power'} or $config->{'Full'}->{'Power'} -By default it is set to 1 (i.e. true). +By default it is set to 1 (i.e. true). Set it to 0 to preserve literal spaces in section headings: @@ -106,11 +106,11 @@ Joel Bernstein Erataxis@cpan.orgE Copyright 2006-2016 by Brian Cassidy, portions copyright 2006, 2007 by Joel Bernstein This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/JSON.pm b/lib/Config/Any/JSON.pm index 81cbaf8..91d1531 100644 --- a/lib/Config/Any/JSON.pm +++ b/lib/Config/Any/JSON.pm @@ -103,11 +103,11 @@ Brian Cassidy Ebricas@cpan.orgE Copyright 2006-2016 by Brian Cassidy This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/Perl.pm b/lib/Config/Any/Perl.pm index 3e27a17..77899f5 100644 --- a/lib/Config/Any/Perl.pm +++ b/lib/Config/Any/Perl.pm @@ -72,11 +72,11 @@ Brian Cassidy Ebricas@cpan.orgE Copyright 2006-2016 by Brian Cassidy This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/XML.pm b/lib/Config/Any/XML.pm index 740c711..fd9838a 100644 --- a/lib/Config/Any/XML.pm +++ b/lib/Config/Any/XML.pm @@ -105,11 +105,11 @@ Joel Bernstein Erataxis@cpan.orgE Copyright 2006-2016 by Brian Cassidy This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/lib/Config/Any/YAML.pm b/lib/Config/Any/YAML.pm index 563eaf9..1f61221 100644 --- a/lib/Config/Any/YAML.pm +++ b/lib/Config/Any/YAML.pm @@ -21,7 +21,6 @@ Loads YAML files. Example: foo: bar Model::Baz: qux: xyzzy - =head1 METHODS @@ -79,11 +78,11 @@ Brian Cassidy Ebricas@cpan.orgE Copyright 2006-2016 by Brian Cassidy This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +it under the same terms as Perl itself. =head1 SEE ALSO -=over 4 +=over 4 =item * L diff --git a/t/conf/conf.foo b/t/conf/conf.foo index 5300f60..e96cac8 100644 --- a/t/conf/conf.foo +++ b/t/conf/conf.foo @@ -1,5 +1,5 @@ name=TestApp - + [Component Controller::Foo] foo=bar diff --git a/t/conf/conf.ini b/t/conf/conf.ini index 5300f60..e96cac8 100644 --- a/t/conf/conf.ini +++ b/t/conf/conf.ini @@ -1,5 +1,5 @@ name=TestApp - + [Component Controller::Foo] foo=bar diff --git a/t/conf/conf2.ini b/t/conf/conf2.ini index 2f892de..4e44521 100644 --- a/t/conf/conf2.ini +++ b/t/conf/conf2.ini @@ -1,5 +1,5 @@ name=TestApp - + [Controller::Foo] foo=bar diff --git a/t/invalid/conf.ini b/t/invalid/conf.ini index 7bec378..2d19bac 100644 --- a/t/invalid/conf.ini +++ b/t/invalid/conf.ini @@ -1,5 +1,5 @@ name=TestApp - + [Component Controller::Foo foo=bar diff --git a/t/invalid/conf.yml b/t/invalid/conf.yml index 93db559..41d8ff0 100644 --- a/t/invalid/conf.yml +++ b/t/invalid/conf.yml @@ -1,7 +1,7 @@ --- name: TestApp Component: - Controller::Foo: + Controller::Foo foo: bar Model: Model::Baz: