=head2 requires_all_of( )
-Specifies that this module requires L<XML::Simple> in order to work.
+Specifies that this module requires L<XML::Simple> and L<XML::NamespaceSupport>
+in order to work.
=cut
-sub requires_all_of { 'XML::Simple' }
+sub requires_all_of { 'XML::Simple', 'XML::NamespaceSupport' }
=head1 CAVEATS
=cut
+our $NO_YAML_XS_WARNING;
+
sub load {
my $class = shift;
my $file = shift;
Carp::carp
'Use of YAML::Syck or YAML to parse config files is DEPRECATED. '
- . 'Please install YAML::XS for proper YAML support';
+ . 'Please install YAML::XS for proper YAML support'
+ unless $NO_YAML_XS_WARNING;
eval { require YAML::Syck; YAML::Syck->VERSION( '0.70' ) };
unless ( $@ ) {
use strict;
use warnings;
+no warnings 'once';
# use Test::Without::Module qw(YAML YAML::Syck Config::General XML::Simple JSON JSON::Syck Config::Tiny );
-use Test::More tests => 10;
+use Test::More tests => 11;
use_ok( 'Config::Any' );
+use_ok( 'Config::Any::YAML' );
+
+$Config::Any::YAML::NO_YAML_XS_WARNING = 1;
{
my @warnings;
package MockApp;
use strict;
use warnings;
+no warnings 'once';
$|++;
use Test::More tests => 54;
use Config::Any::XML;
use Config::Any::YAML;
+$Config::Any::YAML::NO_YAML_XS_WARNING = 1;
+
our %ext_map = (
conf => 'Config::Any::General',
ini => 'Config::Any::INI',
use strict;
use warnings;
+no warnings 'once';
use Test::More;
use Config::Any::YAML;
+$Config::Any::YAML::NO_YAML_XS_WARNING = 1;
+
if ( !Config::Any::YAML->is_supported ) {
plan skip_all => 'YAML format not supported';
}
use strict;
use warnings;
+no warnings 'once';
use Test::More tests => 3;
use Config::Any;
use Config::Any::YAML;
+$Config::Any::YAML::NO_YAML_XS_WARNING = 1;
+
my $file = 't/multi/conf.yml';
my @expect = (
{ name => 'TestApp',