You are using a browser which doesn't fully support Cascading Style Sheets. This site will look much better in a browser that supports web standards, but its content is accessible to any browser or Internet device.

Option files

Option files allow to specify Perl script options by files, so they simply contain what would normally be specified in the commandline. This relieves a user from typing in typical options again and again. It also allows to reuse options, which is helpful if a script provides a great option number. pp2html, for example, currently offers about 80 options. It is almost impossible to remember the combinations which produce a certain result, but it is easy to store them in a file like this:

    # configure style
  
    -style_dir /opt/perlpoint/pp2html/styles
    -style surprise

, to store this file as style.cfg and to invoke pp2html as in

    > pp2html @style.cfg ...

Option files can be nested and cascaded, and you can use as many of them as you want. It is also possible to use default option files which do not need to be specified when calling the script but are resolved automatically. They make it very handy to use a multi option script.

To provide option file usage, all you have to do is to integrate the following statement.

    # resolve option files
  
    argvFile(default=>1, home=>1);

argvFile() is a function of Getopt::ArgvFile which was already loaded and performs three tasks in this call:

  1. It searches the users home directory for a file named .<converter name>, e.g. .pp2sdf . All options found therein are "unshifted" into @ARGV. A default option file in ones home directory stores individual preferences of calling the converter.
  2. It searches the directory where the converter script is located for (probably another) .<converter name> and integrates its options likewise, "unshifting" them to @ARGV as well. Such a global option file can be used to set up options to be used by all script users.
  3. It processes @ARGV to resolve any explicit and nested option files.

The result is an @ARGV array which contains all options, both specified directly and by file, ready to be processed by usual option handling modules like Getopt::Long.