Path: usenet.cise.ufl.edu!huron.eel.ufl.edu!usenet.eel.ufl.edu!logbridge.uoregon.edu!su-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.corridex.com!nntp2.savvis.net!inetarena.com!not-for-mail
From: Bob Camp <bob@hadron.demon.co.uk>
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: Alpha release: Yag.pm (Yet another getopts).
Followup-To: comp.lang.perl.modules
Date: 23 Feb 1999 17:02:53 GMT
Organization: Internet Arena
Lines: 114
Approved: merlyn@stonehenge.com (comp.lang.perl.announce)
Message-ID: <7aumvt$tbn$1@play.inetarena.com>
NNTP-Posting-Host: halfdome.holdit.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:236 comp.lang.perl.modules:8765


I have put an alpha release of Yag.pm (Yet another getopts) on my web site
for evaluation before a formal release.

The package can be obtained from: http://www.hadron.demon.co.uk


------------
		Yag.pm (Yet another getopts), Version 0.2.3

			 Copyright 1998/1999, Bob Camp
			    All rights reserved.


This is an alpha release of Yag (Yet Another Getopts).  The purpose of this
release is to identify any problems with the package before a user release
is made.

There must be ten thousand other getopts:

Why is Yag worthy of consideration?
-----------------------------------

Yag is possibly a misnomer, although it is snappy and short (a good thing
for non-exported function names).

Yag is designed to do as much front end processing as is possible for the
command line, including positional arguments.  In its default mode it will
process all of the command line according to descriptors in the options
hash, report all errors on these and exit if any problems occurred.  For
many applications: When Yag returns input and output streams will be
already opened.  If Yag fails to return then comprehensive error reports
are generated and the program exits.

These are some of the features available:

o Yag is fully configurable.
o Not hard wired to use @ARGV so may be used for multiple purposes.
o Help is integral with the option descriptors.
o Support for '-s', '-long', '--long' options.
o Support for grouping of short options.
o Support for logical flags with negator prefix.
o Support for old style '-x<string>' syntax.
o Support for '--long arg' and '--long=arg' syntax.
o Support for predefined types, ie, '--logical-option=yes'.
o Support for no argument, optional argument and required argument types.
o Comprehensive control of default values.
o Control over multiple use of options and what to do with the arguments.
o Control over where values are stored, anonymous or named, per option.
o Use of scalars and arrays to store values.
o Concatenation available for scalars and arrays.
o Flag variables for indication of option use.
o Immediate code for execution on option being used.
o Type checking of arguments, including:
  o Multiple types.
  o Consistency checks for concatenated values.
  o Path checking for (non)existence.
o Comprehensive checking of the options hash to avoid:
  o Bad flag groups.
  o Ambiguous option naming.
  o Collisions on variable spaces.
o Automatic opening of files.
o File support functions for:
  o Opening and closing files.
  o Generation of anonymous type globs for file handles.
  o Optional change of permissions.
  o Simple and transparent handling for stdin/stdout and file.
  o Full support for appending.
  o Everything can be done with lexically scoped variables.
  o No use of main:: name space.
  o Collision detection.
o Functions to interrogate the options hash.
o Can permute positional arguments.
o Full support for '--'.
o Simple and transparent use of aliases, ie '-o' => '--Output-file'.
o Three prebuilt options may optionally be appended.
  o --version, trivial version report for the main program.
  o --help, sophisticated help function with regular expression matching of
    argument names (includes all aliases).  Or simply '--help'.
  o --read-options, reads options from the given file and pushes them
    onto the argument stack.
o Help shows value of the options after command line processing.
o Several support functions available.
o Flexibility in the way it may be used.


Yag is distributed under the same conditions as perl itself.


    This program is free software; you can redistribute it and/or modify
    it under the terms of either:

	a) the GNU General Public License as published by the Free
	Software Foundation; either version 1, or (at your option) any
	later version, or

	b) the "Artistic License" which comes with this Kit.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either
    the GNU General Public License or the Artistic License for more details.

				   -oOo-


Bob Camp
-- 
   Cygnus Technical Consulting
   Analogue and digital ic design.
   bob@hadron.demon.co.uk
   www.hadron.demon.co.uk


