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

Re^2: Darwin and File::HomeDir

by Anonymous Monk
on May 20, 2011 at 22:30 UTC ( [id://905988]=note: print w/replies, xml ) Need Help??


in reply to Re: Darwin and File::HomeDir
in thread 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.

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 :/

Replies are listed 'Best First'.
Re^3: Darwin and File::HomeDir
by ikegami (Patriarch) on May 20, 2011 at 23:26 UTC

    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?

        There's no should about it. They are causing problems (according to the OP).
      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?

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

        What are you talking about? The user shouldn't have to even know that File::HomeDir is being used by one of his scripts, much less possess some "common knowledge" about it.

        Preventing the module from working on systems with spaces is imposing limits on the user.

        Requiring the user to create an alternative home directory is imposing limits on the user.

        So what are you talking about?

        What can be done about the modules that don't handle the space being returned by my_data.

        Who suggested trying to convince OS vendors anything?

        Me. Or rather, I was suggesting that it would be silly do to so. It's the only way I see that File::HomeDir could return something without spaces.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://905988]
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: (4)
As of 2024-04-20 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found