Well, you never know when you've got incomplete information

There's no information missing. The source is on CPAN. Feel free to check it. You'll find the same thing.

I meant information missing from the OP's post. Why would you think I meant information missing from the module? That makes no sense!

I can't imagine why the code would change only the first part of the path to "\\". So I asked

Probably because you think something was changed. It's what you get when you place a path seperator between '' and '/foo/go/do'. That's fine on unix, but not on Windows.

No, I meant that given the text he fed it, "/foo/go/do", and assuming the module was doing what it was supposed to, I couldn't imagine why would it return "\\foo\go\do". The module actually does attempt to identify UNC pathnames (\\server\path\path), as well as drive letters (D:\Windows), and simple root folders (\users\me); so since the module is returning the text it is, it did not seem unreasonable to ask the OP if there is a server involved. It seems a bug like this surely would have been noticed before.

It was only later, when I started studying the code, that I realized exactly what you just described -- that it may be trying to concatenate '' and an existing path. Version 3.33 has some reasonably intelligent checks for that and seems to work correctly. But the code is a little hairy to follow and I just don't have time to break it all down.

Anyway, I've been playing with version 3.33, the current version, on Vista and I'm not seeing the OP's results.

What did you get, then?

I got the correct and expected results:
canonpath: \foo\go\do catfile: \foo\go\do

In reply to Re^5: Failure of catfile on Windows 7 by furry_marmot
in thread Failure of catfile on Windows 7 by Anonymous Monk

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.