PerlPoint-Converters
view release on metacpan or search on metacpan
doc/writing-converters.pp view on Meta::CPAN
634635636637638639640641642643644645646647648649650651652653654Option files allow to specify Perl script options \I<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 \I<reuse> options, whic...
\GREEN<
# configure style>
-style_dir /opt/perlpoint/pp2html/styles
-style surprise
, to store this file as \C<style.cfg> and to invoke \C<pp2html> as in
> pp2html \RED<
@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
\I<
default
> option files which
do
not need to be specified
when
calling the script but are resolved automatically. They make it very hand...
To provide option file usage, all you have to
do
is to integrate the following statement.
\GREEN<
# resolve option files>
argvFile(
default
=>1,
home
=>1);
\C<argvFile()> is a function of \C<Getopt::ArgvFile> which was already \XREF{name=
"Modules to load"
}<loaded> and performs three tasks in this call:
# It searches the users home directory for a file named \C<.<converter name\>>, e.g.
\C<\B<.>pp2sdf>. All options found therein are
"unshifted"
into \C<
@ARGV
>. A
default
( run in 0.340 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )