remove test dependency on Test::Without::Module (RT#115394)
[p5sagit/JSON-MaybeXS.git] / t / legacy.t
index fc28334..fb5cc19 100644 (file)
@@ -1,8 +1,13 @@
 use strict;
-use warnings FATAL => 'all';
+use warnings;
 
-use Test::Without::Module 'Cpanel::JSON::XS';
-use Test::More;
+# hide Cpanel::JSON::XS
+use lib map {
+    my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} );
+    sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh }
+} qw{Cpanel/JSON/XS.pm};
+
+use Test::More 0.88;
 use JSON::MaybeXS qw/:legacy/;
 
 my $in = '[1, 2, 3, 4]';