5 use System::Introspector::Probe::LibDirs::Perl;
7 my $dir = "$FindBin::Bin/data/libdir/perl";
9 no warnings 'redefine';
10 *System::Introspector::Probe::LibDirs::Perl::_open_locate_libdirs_pipe = sub {
11 my $output = "$dir/lib/perl5\n";
12 open my $fh, '<', \$output;
16 my $probe = System::Introspector::Probe::LibDirs::Perl->new(
19 my $data = $probe->gather;
21 my $sha = delete $data
22 ->{libdirs_perl}{"$dir/lib/perl5"}{modules}{Foo}[0]{sha256_hex};
23 ok $sha, 'contains SHA fingerprint';
25 my $size = delete $data
26 ->{libdirs_perl}{"$dir/lib/perl5"}{modules}{Foo}[0]{size};
27 ok $size, 'contains file size';
34 { file => "$dir/lib/perl5/Foo.pm", version => 0.001 },