NAME

Meta::Utils::Opts::Sopt - Object to store a definition for a command line option.

COPYRIGHT

Copyright (C) 2001, 2002 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
VERSION: 0.33

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.

FUNCTIONS

new($)
setup_value($$)
verify($$)
TEST($)

FUNCTION DOCUMENTATION

BEGIN()

Setup routine which creates constructor, print method and accessor methods for the following attributes: 1. name - name of the parameter. 2. description - short description of the parameter. 3. type - type of the parameter. 4. default - default value of the parameter. 5. pointer - pointer for the parameter storage area. 6. value - value of the parameter. 7. enum - enumerated set from which to select an enumerated parameter. 8. set - set from which to select a set parameter. 9. tt - should the value pass through TT before going to user.

setup_value($$)

This method sets the current value for the current parameter. The reason that you can just use the set_valu accessor is that some values (like sets) are not really strings and need some processing.

verify($$)

This will run sanity checks on the value inside.

TEST($)

Test suite for this module.

SUPER CLASSES

None.

BUGS

None.

AUTHOR

Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER

HISTORY

0.00 MV make Meta::Utils::Opts object oriented
0.01 MV fix todo items look in pod documentation
0.02 MV add enumerated types to options
0.03 MV more on tests/more checks to perl
0.04 MV change new methods to have prototypes
0.05 MV perl code quality
0.06 MV more perl quality
0.07 MV more perl quality
0.08 MV get basic Simul up and running
0.09 MV perl documentation
0.10 MV more perl quality
0.11 MV perl qulity code
0.12 MV more perl code quality
0.13 MV revision change
0.14 MV better general cook schemes
0.15 MV languages.pl test online
0.16 MV Pdmt stuff
0.17 MV perl packaging
0.18 MV PDMT
0.19 MV tree type organization in databases
0.20 MV md5 project
0.21 MV database
0.22 MV perl module versions in files
0.23 MV movies and small fixes
0.24 MV thumbnail user interface
0.25 MV more thumbnail issues
0.26 MV paper writing
0.27 MV website construction
0.28 MV web site automation
0.29 MV SEE ALSO section fix
0.30 MV move tests to modules
0.31 MV download scripts
0.32 MV web site development
0.33 MV finish papers

SEE ALSO

Data::Dumper(3), LWP::Simple(3), Meta::Baseline::Aegis(3), Meta::Class::MethodMaker(3), Meta::Development::Module(3), Meta::Template::Sub(3), Meta::Utils::File::Dir(3), Meta::Utils::File::File(3), Meta::Utils::File::Path(3), Meta::Utils::Output(3), strict(3)

TODO

-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...).

-add checks for integers, floating points etc...

-add dictorionary word type and check.

-add enumerated our() variable which stores all the types that we support and check it.