Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Failure of catfile on Windows 7

by furry_marmot (Pilgrim)
on Mar 02, 2011 at 23:01 UTC ( #891124=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Failure of catfile on Windows 7
in thread Failure of catfile on Windows 7

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


Comment on Re^5: Failure of catfile on Windows 7
Select or Download Code
Re^6: Failure of catfile on Windows 7
by ikegami (Pope) on Mar 03, 2011 at 00:10 UTC

    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 thought you were replying to the content of the parent post. I have no idea what information you think is missing, and for what purpose it's missing.

    assuming the module was doing what it was supposed to, I couldn't imagine why would it return "\\foo\go\do".

    So you can't even imagine them helping either, but you recommended trying them anyway? I suppose there's nothing lost by trying, thought I'm not sure how one goes about trying to get buggy results.

    I got I got the correct and expected [...] \foo\go\do

    That's what the OP is getting. It's not what he's expecting/desires.

      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 thought you were replying to the content of the parent post. I have no idea what information you think is missing, and for what purpose it's missing.

      Weeellll, I was replying to the parent post. You see, sometimes someone posts a question, and they leave out information which could make it easier to figure out what they need. So some of us ask questions to draw out what the problem was. I don't know why this confuses you. Are you just twisting my words for fun?

      assuming the module was doing what it was supposed to, I couldn't imagine why would it return "\\foo\go\do".

      So you can't even imagine them helping either, but you recommended trying them anyway? I suppose there's nothing lost by trying, thought I'm not sure how one goes about trying to get buggy results.

      Weeellll, since this paragraph doesn't seem to make sense either, except for being sarcastic and hostile, I'm not going to say much here. I wrote something off the cuff that I thought might be helpful. In hindsight, it was off the mark. Mea culpa.

      I got the correct and expected ... \foo\go\do

      That's what the OP is getting. It's not what he's expecting/desires.

      Weeellll, actually, we have already established that the correct answer is \foo\go\do. And we have established that unless there's a UNC pathname involved, we would expect the path to resolve to \foo\go\do. Soooo, I think we are already in agreement that this is the correct and expected result.

      The OP had expected something different, but I think we have also established that he is aware that they were relying on what turned out to be a side effect of a bug that shows itself when you try to concatenate an empty string with an existing path -- and he's said they will change their code and/or processes. But I think you knew this.

      Forgive me, El Ikkey. I know that I, marmot, do not have your superior intellect and education. But could it be that once again, you are angry at something else, and are looking to take it out on me?

      --marmot

        It was neither sarcastic nor hostile. Rather, I was spelling things out so you could correct where I went wrong if I did. I'm not twisting your words or in any way angry at you or anyon. Rather, I'm trying to figure out what you were trying to communicate. I still have no clue, but I doubt it's that important, so I'm quitting.

        Soooo, I think we are already in agreement that this is the correct and expected result.

        No. It's the expected result from catfile, but that doesn't mean it's the result the OP expects or desires. I was just saying that "expected" is not the right word to use there because it's ambiguous. Just a nit.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://891124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2014-12-22 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (119 votes), past polls