Re: popt in Gnome2::Program

On Wed, Sep 15, 2004 at 19:57:16 +0100, Peter Oliver wrote:
On Wed, 15 Sep 2004, Torsten Schoenfeld wrote:

On Mon, 2004-09-13 at 22:40, Peter Oliver wrote:

So, is there neat solution to this?  The best I've come up with is to put

    if ( grep { s/^-h$/--help/; m/^-(-help|\?)$/ } @ARGV ) {
        system $0, '--podhelp';

Couldn't you just print your help stuff here and call
Gnome2::Program->init nevertheless?  That would come quite close to what
the popt table stuff does: the application options are printed first,
followed by the library options.

That's what I'm trying to do.  I get my help with Pod::Usage, which
pulls the help text from the pod and then exits.  If there's a way to
prevent it from exiting, it isn't documented.

Sure it is documeted! Read the man page again ;-) There is a special
value for the -exit argument.

                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]