While I would argue that the inheritance tree of File::Spec is not an internal detail because it is documented, you are right: File::Spec is intended for filename handling, and checking the style of filenames in use does not reliably identify *nix systems because several Perl ports translate Unix-style filenames to the native format.

For the release that I am calling "alpha-5" for short, I am using this code:

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 %I +NC. 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 w +orked && $stat_record[0] == $stat_volume[0] # both have same DEV && $stat_record[1] != $stat_volume[1]); # different INO valu +es constant->import(HAVE_VALID_INODES => $have_valid_inodes); }

What makes this particularly "interesting" is that all of the CPAN smoketest boxes seem to be running various *nix systems.


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.