# 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 }
+ my $m = $_;
+ sub { return unless $_[1] eq $m; die "Can't locate $m in \@INC (hidden).\n" };
} qw{Cpanel/JSON/XS.pm};
use Test::More 0.88;
# 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 }
+ my $m = $_;
+ sub { return unless $_[1] eq $m; die "Can't locate $m in \@INC (hidden).\n" };
} qw{Cpanel/JSON/XS.pm JSON/XS.pm JSON/PP.pm};
use Test::More 0.88;
# 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 }
+ my $m = $_;
+ sub { return unless $_[1] eq $m; die "Can't locate $m in \@INC (hidden).\n" };
} qw{Cpanel/JSON/XS.pm JSON/XS.pm};
use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP';
# 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 }
+ my $m = $_;
+ sub { return unless $_[1] eq $m; die "Can't locate $m in \@INC (hidden).\n" };
} qw{Cpanel/JSON/XS.pm};
use Test::More 0.88;