6.20.4 Callback Options

If optparse's built-in actions and types just don't fit the bill for you, but it's not worth extending optparse to define your own actions or types, you'll probably need to define a callback option. Defining callback options is quite easy; the tricky part is writing a good callback (the function that is called when optparse encounters the option on the command line).



Subsections
See About this document... for information on suggesting changes.