According to perlport's note on stat, the device and inode information returned by stat are not meaningful or reliable on some systems. Is there a way of knowing if they are meaningful on the current system? Perhaps a Config variable contains this information?
Update: Background info:
I'm trying to determine if a given file has already been read and processed. If it has, I'll just use the data in memory instead of processing the file a second time. False negatives are acceptable. False positives are not.
sub canonize_file_name { ??? } my $id = canonize_file_name($file_name); if (not exists $forest{$id}) { $forest{$id} = Tree->new($file_name); } return $forest{$id};
I plan to use File::Spec's rel2abs and case_tolerant, but I thought I might use the device+inode on systems where it is supported. Is it possible to determine if this is such a system? Is there an existing module that does any of this?
Update: Progress:
Cache::AgainstFile looks good. Still need to handle canonisation.
In reply to Is device+inode meaningful? by ikegami
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |