
P4::Getopt - Get P4 command line options

use P4::Getopt; my $opt = new P4::Getopt; $opt->parameter (qw( -u username )); @ARGV = $opt->parameter (@ARGV); ... =head1 DESCRIPTION
The P4::Getopt package provides standardized handling of global options for the front of P4 commands.
Create a new Getopt.
Returns a list of parameters that when passed through $self->parameter() should result in the same state. Often this is used to form command lines for wrappers that want to call p4 underneath themselves.
Parses any recognized parameters in the referenced array, removing the standard parameters and returning a array with all unparsed parameters.
The below list shows the parameters that are supported, and the functions that are called:
-c <client> client
-d <pwd> pwd
-H <host> host
-p <port> port
-P <password> password
-s script (set true)
-u <user> user
-C <charset> charset
-n noop (set true) CVS compatible option
-x <file> Read given file and parse args automatically

There is a accessor for each parameter listed above. In addition:
Return sorted list of all commands.
Return textual description of the specified command.
The filename and line number last parsed.
Return a hash with one key for each option. The value of the key is 1 if a no-argument option was set, else it is an array with each value the option was set to.
Return a array with one element for each option. The element is either 'switch', the name of the switch the option is specifying, or the name of the parameter.
Set the client, port, and password based on the options.
Return the option list, with the specified matching argument removed.

The latest version is available from CPAN and from http://www.veripool.com/.
Copyright 2002-2005 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License or the Perl Artistic License.

Wilson Snyder <wsnyder@wsnyder.org>
