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

Re^2: Weird File::Basename::basename (yes, but)

by hdb (Monsignor)
on Mar 26, 2013 at 15:43 UTC ( [id://1025546]=note: print w/replies, xml ) Need Help??


in reply to Re: Weird File::Basename::basename (yes, but)
in thread Weird File::Basename::basename

On the importance of this bug: In a way "./" is the neutral element in pathes in the sense of adding it anywhere in the path does not change anything (except in the middle of a name obviously).

One exception springs to mind: When executing a command it does make a difference whether to say

system("somecommand"); # or system("./somecommand");

Whether or not this can happen due to the usage of basename('') in any practical example I am not sure.

Replies are listed 'Best First'.
Re^3: Weird File::Basename::basename (yes, but)
by Anonymous Monk on Mar 26, 2013 at 16:42 UTC

    When executing a command it does make a difference whether to say "foo" or "./foo"

    not on cmd.exe, cwd is first place searched

    :) spec/basename are useful, but they're kinda low-level, I prefer abstractions like Path::Class and Badger::Filesystem and absolute paths, so file( ... )->absolute

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found