Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Trouble working with Config::Simple

by linuxer (Curate)
on Jun 30, 2008 at 21:18 UTC ( [id://694835]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Trouble working with Config::Simple
in thread Trouble working with Config::Simple

The message is telling exactly what's wrong. There is no directory '~'. It doesn't say anything about a "permission denied". So, there's no need to wonder.

I think if it would do a ~ expansion, it should state the expanded path in the error message (just like the shell does).

$ touch ~/test.txt $ chmod a-w ~/test.txt $ echo "string" > ~/test.txt bash: /home/user/test.txt: Permission denied $

Replies are listed 'Best First'.
Re^4: Trouble working with Config::Simple
by almut (Canon) on Jun 30, 2008 at 22:00 UTC
    The message is telling exactly what's wrong.

    Sure it is. But the point is how you'd interpret the message if you think that '~' stands for your home directory. Of course, once you reckon what the problem is, it's all nice and dandy.

    Honestly, if some message reports a problem with ~/somefile, would your first thought be that the real problem is that ~ has nothing to do with your home directory? Even details such as "Permission denied" vs. "No such file or directory" etc., or whether the shell would normally expand tilde in an error message, might not immediately point in the right direction. — Believe me, I've seen rather skilled programmers tricked by this...

      Without a moments thought, yes, many skilled programmers would be fooled by that. But in the same vein from all the "unskilled" programmers out there there should be some who get a "stroke of insight" after looking at that error message. And often that is also the moment they learn that error messages are a source of information not to be clicked away

      At the least the message pinpoints the problem area. As soon as someone knows how to debug, he's got a lead now.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found