NAME
Meta::Utils::Opts::Sopt - Object to store a definition for a command line option.
COPYRIGHT
Copyright (C) 2001 Mark Veltzer; All rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
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 the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
DETAILS
MANIFEST: Sopt.pm PROJECT: meta
SYNOPSIS
package foo;
use Meta::Utils::Opts::Sopt qw();
my($sopt)=Meta::Utils::Opts::Sopt-
new();> $sopt-
set_name("name");>
DESCRIPTION
This object is used by the Opts object to store information about a single command line argument.
EXPORTS
new($)
get_name($)
set_name($$)
get_desc($)
set_desc($$)
get_type($)
set_type($$)
get_defs($)
set_defs($$)
get_poin($)
set_poin($$)
get_valu($)
set_valu($$)
get_enum($)
set_enum($$)
verify($$)
print($$)
FUNCTION DOCUMENTATION
- new($)
-
This gives you a new Sopt object.
- get_name($)
- set_name($$)
-
This will set the name for the current object.
- get_desc($)
-
This returns the description for the current object.
- set_desc($$)
-
This will set the description for the current object.
- get_type($)
-
This method returns the type of the current object.
- set_type($$)
-
This method will set the type of the current object.
- get_defa($)
-
This method will returns the default value of the current object.
- set_defa($$)
-
This method will set the default value of the current object.
- get_poin($)
-
This method will return the pointer of the current object.
- set_opti($$)
-
This method will set the pointer of the current object.
- get_valu($)
-
This method will retrieve the current value of the current object.
- set_valu($$)
-
This method will set the current value of the current object.
- get_enum($)
-
This method will retrieve the current enum of the current object.
- set_enum($$)
-
This method will set the current enum of the current object.
- verify($$)
-
This will run sanity checks on the value inside.
- print($$)
-
This prints out the current Sopt object.
BUGS
None.
AUTHOR
Mark Veltzer <mark2776@yahoo.com>
HISTORY
start of revision info 1 Sun Jan 7 18:17:29 2001 MV make Meta::Utils::Opts object oriented 2 Tue Jan 9 19:29:31 2001 MV fix todo items look in pod documentation 3 Tue Jan 9 22:40:39 2001 MV add enumerated types to options 4 Wed Jan 10 12:05:55 2001 MV more on tests/more checks to perl 5 Fri Jan 12 15:53:19 2001 MV change new methods to have prototypes 6 Sun Jan 28 02:34:56 2001 MV perl code quality 7 Sun Jan 28 13:51:26 2001 MV more perl quality 8 Tue Jan 30 03:03:17 2001 MV more perl quality 9 Wed Jan 31 15:28:22 2001 MV get basic Simul up and running 10 Sat Feb 3 23:41:08 2001 MV perl documentation 11 Mon Feb 5 03:21:02 2001 MV more perl quality 12 Tue Feb 6 01:04:52 2001 MV perl qulity code 13 Tue Feb 6 07:02:13 2001 MV more perl code quality 14 Tue Feb 6 22:19:51 2001 MV revision change 14 Thu Feb 8 00:23:21 2001 MV betern general cook schemes end of revision info
SEE ALSO
Nothing.
TODO
-add set type.
-add limited range intergers.
-add regular expression match limited strings.
-add a write_file type which is a file that could be written (as opposed to a file which doesnt exist in new_file).
-add clean character strings types (only nice characters...).