Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Why is it good practice for a cli script to take switch args before file list?

by leocharre (Priest)
on Jul 19, 2006 at 21:06 UTC ( [id://562425]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Why is it good practice for a cli script to take switch args before file list?
in thread Why is it good practice for a cli script to take switch args before file list?

Thank you so much for your help- for finding where that was. After reading the discussion here I have no doubts that the best thing to do is expect options before operands.

The slight preference of listing paths before options would not be worth the confusion and added bugs at all.

POSIX ( SUS?, i guess we'll be calling it at some point.. ) has some *must* haves, and *should* haves to qualify for a true POSIX os/app/lib/whatever. I think this case is clearly not a *must* have.. But then, wiping yourself after you #2 is also not a *must* do.
So.. options before operands it is.

And I like what merlyn said, makes a ton of sense. I once saw somewhere that a good utility is liberal in what it accepts as input and conservative in what it outputs.. And how people should be more like that. Sigh.

  • Comment on Re^4: Why is it good practice for a cli script to take switch args before file list?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-20 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found