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

Re: CPAN Upload: J/JV/JV/Getopt-Long-2.32_03.tar.gz

Thread Next
May 9, 2003 12:55
Re: CPAN Upload: J/JV/JV/Getopt-Long-2.32_03.tar.gz
Message ID:
[Quoting PAUSE, on May 9 2003, 21:17, in "CPAN Upload: J/JV/JV"]
> The uploaded file
>     Getopt-Long-2.32_03.tar.gz
> has entered CPAN as
>   file: $CPAN/authors/id/J/JV/JV/Getopt-Long-2.32_03.tar.gz
>   size: 33743 bytes
>    md5: f44ac4e88d21097a8c4cacc9a8363f0f

This version implements automatic support for --version and --help
options. You are invited to try it out and feedback.

**************** WARNING -- EXPERIMENTAL CODE AHEAD ****************

* Getopt::Long will automatically provide --version and --help options
  if the call to GetOptions did not specify them explicitly. Since
  this is a non-compatible API change, the new features will only be
  available to programs that explicitly require version 2.3203 or

  Getopt::Long uses module Pod::Usage to produce the help message from
  the SYNOPSIS section of the program's POD.

  Two subroutines can be exported on demand:

  - VersionMessage

    This subroutine prints the standard version message.

  - HelpMessage

    This subroutine prints the standard help message.

  Both subroutines take the same arguments as Pod::Usage::pod2usage,
  see its documentation for details.  


    use Getopt::Long 2.3203 qw(GetOptions HelpMessage);
    GetOptions(...) or HelpMessage(2);

  Using a --help (or -?) command line option will write the SYNOPSIS
  section of the program's POD to STDOUT, and exit with status 0.
  However, an illegal option will produce the help text to STDERR,
  and exit with status 2. This is in accordance with current

**************** END EXPERIMENTAL CODE ****************

Happu hacking,

-- Johan

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