From: Brian Cassidy Date: Tue, 5 Aug 2008 15:34:19 +0000 (+0000) Subject: line endings, tabs, perltidy. X-Git-Tag: v0.13~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=commitdiff_plain;h=77f14cda81a1985461745614ec79a76d25f13ac4 line endings, tabs, perltidy. --- diff --git a/Changes b/Changes index 3b96ddf..449b4b8 100644 --- a/Changes +++ b/Changes @@ -50,7 +50,7 @@ Revision history for Config-Any 0.05 Wed Feb 21 22:00:00 2007 - added support for (requested by Evan Kaufman): + 'force_plugins => [ qw(Config::Any::Foo Config::Any::Blah) ]' parameter - to load_(files|stems) + 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 nested hashrefs diff --git a/t/50-general.t b/t/50-general.t index e173624..59b3f35 100644 --- a/t/50-general.t +++ b/t/50-general.t @@ -26,9 +26,9 @@ else { # test invalid config { - my $file = 't/invalid/conf.conf'; + my $file = 't/invalid/conf.conf'; my $config = eval { Config::Any::General->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/51-ini.t b/t/51-ini.t index 6848004..eb8e788 100644 --- a/t/51-ini.t +++ b/t/51-ini.t @@ -49,9 +49,9 @@ else { # test invalid config { - my $file = 't/invalid/conf.ini'; + my $file = 't/invalid/conf.ini'; my $config = eval { Config::Any::INI->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/52-json.t b/t/52-json.t index 23eb920..0dd65f4 100644 --- a/t/52-json.t +++ b/t/52-json.t @@ -19,9 +19,9 @@ else { # test invalid config { - my $file = 't/invalid/conf.json'; + my $file = 't/invalid/conf.json'; my $config = eval { Config::Any::JSON->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/53-perl.t b/t/53-perl.t index b11a60c..35a5cf6 100644 --- a/t/53-perl.t +++ b/t/53-perl.t @@ -18,9 +18,9 @@ use Config::Any::Perl; # test invalid config { - my $file = 't/invalid/conf.pl'; + my $file = 't/invalid/conf.pl'; my $config = eval { Config::Any::Perl->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/54-xml.t b/t/54-xml.t index 02fd793..0f7514a 100644 --- a/t/54-xml.t +++ b/t/54-xml.t @@ -19,9 +19,9 @@ else { # test invalid config { - my $file = 't/invalid/conf.xml'; + my $file = 't/invalid/conf.xml'; my $config = eval { Config::Any::XML->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/55-yaml.t b/t/55-yaml.t index d042cc4..2eb8d4e 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -19,9 +19,9 @@ else { # test invalid config { - my $file = 't/invalid/conf.yml'; + my $file = 't/invalid/conf.yml'; my $config = eval { Config::Any::YAML->load( $file ) }; ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + ok( $@, "error thrown ($@)" ); } diff --git a/t/61-features.t b/t/61-features.t index 62bd59e..e754a56 100644 --- a/t/61-features.t +++ b/t/61-features.t @@ -17,7 +17,7 @@ eval { Config::Any::INI->load( $cfg_file ); }; SKIP: { skip "File loading backend for INI not found", 14 if $@; - my $struct; # used to make sure parsing works for arrays and hashes + my $struct; # used to make sure parsing works for arrays and hashes # force_plugins { @@ -65,10 +65,11 @@ SKIP: { my $ref = blessed $result ? reftype $result : ref $result; is( substr( $ref, 0, 4 ), 'HASH', 'hashref' ); - is_deeply( $result, $struct, 'load_files return an hashref (flatten_to_hash)' ); + is_deeply( $result, $struct, + 'load_files return an hashref (flatten_to_hash)' ); } - - # use_ext + + # use_ext { ok( my $result = Config::Any->load_files( { files => [ $cfg_file ], diff --git a/t/conf/conf.conf b/t/conf/conf.conf index 055e7a8..30d1eff 100644 --- a/t/conf/conf.conf +++ b/t/conf/conf.conf @@ -1,7 +1,7 @@ -name = TestApp - - foo bar - - - qux xyzzy - +name = TestApp + + foo bar + + + qux xyzzy + diff --git a/t/conf/conf.foo b/t/conf/conf.foo index a47b2d0..5300f60 100644 --- a/t/conf/conf.foo +++ b/t/conf/conf.foo @@ -1,7 +1,7 @@ -name=TestApp - -[Component Controller::Foo] -foo=bar - -[Model Model::Baz] -qux=xyzzy +name=TestApp + +[Component Controller::Foo] +foo=bar + +[Model Model::Baz] +qux=xyzzy diff --git a/t/conf/conf.ini b/t/conf/conf.ini index a47b2d0..5300f60 100644 --- a/t/conf/conf.ini +++ b/t/conf/conf.ini @@ -1,7 +1,7 @@ -name=TestApp - -[Component Controller::Foo] -foo=bar - -[Model Model::Baz] -qux=xyzzy +name=TestApp + +[Component Controller::Foo] +foo=bar + +[Model Model::Baz] +qux=xyzzy diff --git a/t/conf/conf.json b/t/conf/conf.json index 7f17fd3..404e449 100644 --- a/t/conf/conf.json +++ b/t/conf/conf.json @@ -1,13 +1,13 @@ -{ - "name": "TestApp", - "Component": { - "Controller::Foo": { - "foo": "bar" - } - }, - "Model": { - "Model::Baz": { - "qux": "xyzzy" - } - } -} +{ + "name": "TestApp", + "Component": { + "Controller::Foo": { + "foo": "bar" + } + }, + "Model": { + "Model::Baz": { + "qux": "xyzzy" + } + } +} diff --git a/t/conf/conf2.ini b/t/conf/conf2.ini index 366619e..2f892de 100644 --- a/t/conf/conf2.ini +++ b/t/conf/conf2.ini @@ -1,7 +1,7 @@ -name=TestApp - -[Controller::Foo] -foo=bar - -[Model::Baz] -qux=xyzzy +name=TestApp + +[Controller::Foo] +foo=bar + +[Model::Baz] +qux=xyzzy diff --git a/t/invalid/conf.conf b/t/invalid/conf.conf index f0f55b4..cd12cad 100644 --- a/t/invalid/conf.conf +++ b/t/invalid/conf.conf @@ -1,7 +1,7 @@ -name = TestApp - - - qux xyzzy - +name = TestApp + + + qux xyzzy + diff --git a/t/invalid/conf.ini b/t/invalid/conf.ini index 3323d75..7bec378 100644 --- a/t/invalid/conf.ini +++ b/t/invalid/conf.ini @@ -1,7 +1,7 @@ -name=TestApp - -[Component Controller::Foo -foo=bar - -[Model Model::Baz] -qux=xyzzy +name=TestApp + +[Component Controller::Foo +foo=bar + +[Model Model::Baz] +qux=xyzzy diff --git a/t/invalid/conf.json b/t/invalid/conf.json index eb6497c..84416ae 100644 --- a/t/invalid/conf.json +++ b/t/invalid/conf.json @@ -1,13 +1,13 @@ -{ - "name": "TestApp", - "Component": { - "Controller::Foo": { - "foo": "bar" - } - }, - "Model": { - "Model::Baz": { - "qux": "xyzzy" - } - } +{ + "name": "TestApp", + "Component": { + "Controller::Foo": { + "foo": "bar" + } + }, + "Model": { + "Model::Baz": { + "qux": "xyzzy" + } + }