in reply to Multiple GetOptions?

It is possible to configure Getopt::Long to achieve the requested behaviour.

I was simply blind when reading the docs plus was sent the wrong way with the advice to try the "permute" configuration switch.

It is the pass_through (default: disabled) switch that does the trick!

Bye
 PetaMem
    All Perl:   MT, NLP, NLU

Replies are listed 'Best First'.
Re: Re: Multiple GetOptions?
by sheep (Chaplain) on Feb 15, 2004 at 17:27 UTC
    Hi,

    It does the trick, apart from the fact that it stops reporting "unknown option" for nonexistent options.
    If you want to have the warning back for unrecognised options you can add the Getopt::Long::Configure qw(nopass_through); where you catch options for the last time.

    -sheep

    Update: Corrected a typo. Thanks to BazB.