App-ptimeout
view release on metacpan or search on metacpan
inc/Devel/CheckOS.pm view on Meta::CPAN
my $case_flag = File::Spec->case_tolerant ? '(?i)' : '';
my $re_Devel = qr/$case_flag ^Devel$/x;
my $re_AssertOS = qr/$case_flag ^AssertOS$/x;
my $re_Alias = qr/$case_flag ^Alias\b/x;
sub list_platforms {
# sort by mtime, so oldest last. This was necessary so that if a module
# appears twice in @INC we pick the newer one but that functionality is
# no longer needed. We do need to de-dupe the list though
my @modules = sort {
(stat($a->{file}))[9] <=> (stat($b->{file}))[9]
} grep {
$_->{module} !~ $re_Alias
} map {
my (undef, $dir_part, $file_part) = File::Spec->splitpath($_);
$file_part =~ s/\.pm$//;
my (@dirs) = grep {+length} File::Spec->splitdir($dir_part);
foreach my $i (reverse 1..$#dirs) {
next unless(
$dirs[$i] =~ $re_AssertOS &&
$dirs[$i - 1] =~ $re_Devel
( run in 0.568 second using v1.01-cache-2.11-cpan-49f99fa48dc )