values
- we now always upgrade JSON::XS if it is installed and below version 3.0,
due to changes in handling booleans
+ - remove test dependency on Test::Without::Module (RT#115394)
1.003005 - 2015-03-22
- fix x_contributors metadata that was killing metacpan (see
},
test => {
requires => {
- 'Test::Without::Module' => '0.17',
'Test::More' => '0.88',
},
},
use strict;
use warnings;
-use Test::Without::Module 'Cpanel::JSON::XS';
+# 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/;
use strict;
use warnings;
-use Test::Without::Module 'Cpanel::JSON::XS';
-use Test::Without::Module 'JSON::XS';
-use Test::Without::Module 'JSON::PP';
+
+# hide Cpanel::JSON::XS, JSON::XS, JSON::PP
+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 JSON/XS.pm JSON/PP.pm};
+
use Test::More 0.88;
ok(!eval { require JSON::MaybeXS; 1 }, 'Class failed to load');
-# Test::Without::Module always causes 'did not return a true value' errors
-
like(
- $@, qr{Cpanel/JSON/XS.pm did not.*JSON/XS.pm did not.*JSON/PP.pm did not}s,
+ $@, qr{Can't locate Cpanel/JSON/XS\.pm.*Can't locate JSON/XS\.pm.*Can't locate JSON/PP\.pm}s,
'All errors reported'
);
use strict;
use warnings;
-use Test::Without::Module 'Cpanel::JSON::XS', 'JSON::XS';
+# hide Cpanel::JSON::XS, 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 JSON/XS.pm};
+
use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP';
use Test::More 0.88;
use JSON::MaybeXS;
use strict;
use warnings;
-use Test::Without::Module 'Cpanel::JSON::XS';
+# 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;