Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Darwin and File::HomeDir

by ikegami (Patriarch)
on May 20, 2011 at 21:33 UTC ( [id://905977]=note: print w/replies, xml ) Need Help??


in reply to Darwin and File::HomeDir

You could suggest a documentation update to File::HomeDir that highlights the fact that it's common for path with spaces to be returned.

Replies are listed 'Best First'.
Re^2: Darwin and File::HomeDir
by Anonymous Monk on May 20, 2011 at 22:30 UTC
    You could suggest a documentation update to File::HomeDir that highlights the fact that it's common for path with spaces to be returned.

    Seems backwards to me. cpan has for a long time been broken with regards to spaces in paths, and it is a known issue. I doubt a patch to File::HomeDir documentation is going to have an impact.

    Hmm, after thinking about it, such a warning actually sounds quite stupid , along the lines of warning: an integer can be a negative number :/

      warning: an integer can be a negative number :/

      I actually suggested "warning: the return value can be negative", and I have indeed done that in situations where people tended to assume only positive numbers could be returned.

      I doubt a patch to File::HomeDir documentation is going to have an impact.

      I agree, but there's not much else that can be done. The only other alternative is to convince OS vendors not to use spaces in the paths to user home dirs.

      Seems backwards to me.

      Trying to impose limits on the user to kowtow to broken some modules sounds backwards to me.

      Trying to convince OS vendors to change their practices to address bugs in modules sounds backwards to me.

        I agree, but there's not much else that can be done. The only other alternative is to convince OS vendors not to use spaces in the paths to user home dirs.

        But why should spaces in the paths be a problem?

        Trying to impose limits on the user to kowtow to broken some modules sounds backwards to me.

        How is requiring users posses some common knowledge, trying to impose a limit on users?

        This is the synopsis for http://search.cpan.org/~adamk/File-HomeDir-0.97/lib/File/HomeDir/Darwin/Carbon.pm

        use File::HomeDir; # Find directories for the current user $home = File::HomeDir->my_home; # /Users/mylogin $desktop = File::HomeDir->my_desktop; # /Users/mylogin/Desktop $docs = File::HomeDir->my_documents; # /Users/mylogin/Documents $music = File::HomeDir->my_music; # /Users/mylogin/Music $pics = File::HomeDir->my_pictures; # /Users/mylogin/Pictures $videos = File::HomeDir->my_videos; # /Users/mylogin/Movies $data = File::HomeDir->my_data; # /Users/mylogin/Library/App +lication Support
        So what are you talking about?

        Trying to convince OS vendors to change their practices to address bugs in modules sounds backwards to me.

        What? Who suggested trying to convince OS vendors anything?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2026-04-15 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.