added is_supported() to see what plugins we can use
[p5sagit/Config-Any.git] / lib / Config / Any / XML.pm
index 9c49443..c9b979f 100644 (file)
@@ -73,6 +73,17 @@ sub _coerce {
     $out;
 }
 
+=head2 is_supported( )
+
+Returns true if L<XML::Simple> is available.
+
+=cut
+
+sub is_supported {
+    eval { require XML::Simple; };
+    return $@ ? 0 : 1;
+}
+
 =head1 AUTHORS
 
 Brian Cassidy E<lt>bricas@cpan.orgE<gt>