In my case, the concern is detecting whether inode numbers are valid (and hardlinks might exist) or not (and filenames are assumed to map 1:1 to files) rather than vagaries like case-sensitivity that can only really be verified by specific testing in the directory you want to know about.

I asked this at Portable way to determine if two names refer to the same file? and arrived at the "check which implementation of File::Spec is in use" solution there.

If inode numbers are not valid, will plainly different files appear to have the same inode number according to stat? In that case, how do I find the path a module was loaded from? I could stat two modules from the library and make sure they have different inodes...


In reply to Re^7: File::Spec::Win32 returning different result than File::Spec when doing catfile with empty string by jcb
in thread File::Spec::Win32 returning different result than File::Spec when doing catfile with empty string by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.