BEGIN { use constant (); my $have_valid_inodes = 0; # We accept DEV:INO as valid if two files in the same directory have the # same DEV and different INO values. We use two modules from this # library for this test and retrieve their actual locations from %INC. my @stat_record = stat $INC{'WARC/Record.pm'}; my @stat_volume = stat $INC{'WARC/Volume.pm'}; $have_valid_inodes = 1 if (scalar @stat_record && scalar @stat_volume # both stat calls worked && $stat_record[0] == $stat_volume[0] # both have same DEV && $stat_record[1] != $stat_volume[1]); # different INO values constant->import(HAVE_VALID_INODES => $have_valid_inodes); }