develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [PATCH 5.8.1 @19053] Getopt::Std

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
April 5, 2003 12:42
Subject:
Re: [PATCH 5.8.1 @19053] Getopt::Std
Message ID:
20030405204212.GA7443@math.berkeley.edu
On Sat, Apr 05, 2003 at 12:01:16PM +0200, Johan Vromans wrote:
> [Quoting Ilya Zakharevich, on April 4 2003, 13:32, in "Re: [PATCH 5.8.1 @19"]
> > AFAIU, there may be no adverse effect of printing a *different*
> > message than one emited before.  Hmm, to be extra sure, the
> > help/version message should be printed on STDERR
> 
> Conventions dictate that they are written to STDOUT.
> 
> But most important: the program must exit after the message is
> written, while in your proposal it only exits after source
> modification (the setting of $main::EXIT_ON_HELP_VERSION).

Tough luck.  IIUC, security considerations imply that the most we can
do with unprepared program is to put message on STDERR, and continue.

Let's check.  Do people know programs using Getopt::* which will not
function as intended if the user has a way to terminate them early?

> > Even if this is a part of some general framework configuration?  E.g.,
> > suppose GNOME configuration would set PERL_GETOPT_MODULE to an
> > appropriate value?
> 
> Exactly, and an environment variable would be a better way to select
> the handler. Using a command line option to select a command line
> option processor is confusing and error prone. 

... But is the most convenient once-only way.

Ilya

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About