-#$file = $tmpfile .'.xml';
-#ok( eval { $obj->write_ref($file, $hash) } );
-#$in = $obj->read_ref($file);
-#ok($in->{'three'}->{'foo'} eq 'Foo');
-#unlink $file;
-#
-#### ini likes hash O' hashes
-#$hash->{'one'} = {};
-#$hash->{'two'} = {};
-#$file = $tmpfile .'.ini';
-#ok( eval { $obj->write_ref($file, $hash) } );
-#$in = $obj->read_ref($file);
-#ok($in->{'three'}->{'foo'} eq 'Foo');
-#unlink $file;
-
-ok (eval { $obj->write('FooSpace', $hash) });
-ok (unlink $obj->{'paths'}->[1] . '/FooSpace.conf');
-
-ok (eval { $obj->write('FooSpace', $hash, {directive => 'FIRST'}) });
-ok (unlink $obj->{'paths'}->[0] . '/FooSpace.conf');
+SKIP: {
+ skip("YAML.pm not found", 2) if ! eval { require YAML };
+ my $file = $tmpfile .'.yaml';
+ ok( eval { $obj->write_ref($file, $hash) } );
+ my $in = $obj->read_ref($file);
+ ok($in->{'three'}->{'foo'} eq 'Foo');
+ unlink $file;
+};
+
+SKIP: {
+ skip("JSON.pm not found", 2) if ! eval { require JSON };
+ my $file = $tmpfile .'.json';
+ ok( eval { $obj->write_ref($file, $hash) } );
+ my $in = $obj->read_ref($file);
+ ok($in->{'three'}->{'foo'} eq 'Foo');
+ unlink $file;
+};
+
+SKIP: {
+ skip("Storable.pm not found", 2) if ! eval { require Storable };
+ $file = $tmpfile .'.sto';
+ ok( eval { $obj->write_ref($file, $hash) } );
+ $in = $obj->read_ref($file);
+ ok($in->{'three'}->{'foo'} eq 'Foo');
+ unlink $file;
+};
+
+SKIP: {
+ skip("XML::Simple not found", 2) if ! eval { require XML::Simple };
+ $file = $tmpfile .'.xml';
+ ok( eval { $obj->write_ref($file, $hash) } );
+ $in = $obj->read_ref($file);
+ ok($in->{'three'}->{'foo'} eq 'Foo');
+ unlink $file;
+};
+
+SKIP: {
+ skip("Config::IniHash not found", 2) if ! eval { require Config::IniHash };
+ ### ini likes hash O' hashes
+ $hash->{'one'} = {};
+ $hash->{'two'} = {};
+ $file = $tmpfile .'.ini';
+ ok( eval { $obj->write_ref($file, $hash) } );
+ $in = $obj->read_ref($file);
+ ok($in->{'three'}->{'foo'} eq 'Foo');
+ unlink $file;
+};
+
+SKIP: {
+ skip('YAML.pm still not found', 4) if ! eval { require YAML };
+ ok (eval { $obj->write('FooSpace', $hash) });
+ ok (unlink $obj->{'paths'}->[1] . '/FooSpace.conf');
+
+ ok (eval { $obj->write('FooSpace', $hash, {directive => 'FIRST'}) });
+ ok (unlink $obj->{'paths'}->[0] . '/FooSpace.conf');
+};