Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: automounted directory status

by DrHyde (Prior)
on Feb 04, 2014 at 12:20 UTC ( #1073381=note: print w/replies, xml ) Need Help??


in reply to Re^4: automounted directory status
in thread automounted directory status

I'm sorry, but you are *not* asking "If I write will it succeed". -w doesn't mean that. -w will also return true on filesystems that are full, or are out of inodes. All -w means is "does this resource have a write bit set for the current user".

Yes, perl is portable. That doesn't mean that you don't have to care about portability. For example, to make your code work on both Windows and Unix you have to care about whether lines of text end in \n or \r\n and to be rather careful about how you open files. Well, dealing with automounters is apparently another of those things where you need to be careful about portability.

Replies are listed 'Best First'.
Re^6: automounted directory status
by AlPaton (Novice) on Feb 05, 2014 at 11:22 UTC
    Perhaps I should have said "If I write, is it possible I will succeed". My point is that the documentation (perldoc) clearly states " -w File is writable by effective uid/gid". It does not say "The write flag is set". I appreciate I am going to get nowhere with this argument. It is just irksome to have to revisit a mountain of code to take this into consideration now that our automounted filesystems are more frequently unmounted.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2019-07-23 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (27 votes). Check out past polls.

    Notices?