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

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

Thread Previous | Thread Next
April 6, 2003 14:33
Re: [PATCH 5.8.1 @19053] Getopt::Std
Message ID:
[Quoting Ilya Zakharevich, on April 6 2003, 12:37, in "Re: [PATCH 5.8.1 @19"]
> Currently they do not work with unprepared Getopt:: scripts.  So it is
> not a security consideration that they won't work until the script is
> minimally modified.  It should be enough to do one-place modification
>   $Getopt::Std::HELP_VERSION_AWARE = 1;
> to change the behaviour to be standard-conforming.

For Getopt::Long I use a much simpler approach: when the program uses
the appropriate version in the 'use' statement, it gets the new
features. Otherwise not. So if a program uses

  use Getopt::Long 2.33;

it knows what it is asking for, and gets it. 

The same could be done for Getopt::Std:

  use Getopt::Std 1.04;

would do the trick.

-- Johan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About