-
-
30 Mar 2022 09:25:47 UTC
- Distribution: Test-Smoke
- Module version: 0.002
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (24)
- Testers (221 / 5 / 0)
- Kwalitee
Bus factor: 2- 65.73% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (358.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- CGI::Util
- Capture::Tiny
- File::Spec
- HTTP::Tiny
- JSON::XS
- POSIX
- System::Info
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Test::Smoke::App::AppOption - Object that represents an Application Option.
SYNOPSIS
use Test::Smoke::App::AppOption; my $o = Test::Smoke::App::AppOption->new( ); printf "%s\n", $o->gol_option; print $o->show_helptext;
DESCRIPTION
Test::Smoke::App::AppOption->new(%arguments)
Arguments
Named:
- name => $basic_option_name [required]
- option => $option_extention (see Getopt::Long)
- allow => $arrary_ref_with alternatives
- default => $default_value
- helptext => $text_to_show_with help
Returns
An instance.
Exceptions
croak()s when:
$option->allowed($value[, $allow])
Checks if a value is in a set of allowed values.
Arguments
Positional.
- $value (the value to check)
- $allow [optional]
-
$allow
can be:ArrayRef => a list of allowed() items
Regex => a regex to test
$value
against.CodeRef => a coderef that is executed with
$value
other_value => $value eq $other_value (checks for definedness)
Returns
(perl) True of False.
$opt->gol_option
Getopt::Long compatible option string.
$opt->show_helptext()
sprintf "%-30s - %s", $option_with_allowd, $self->helptext
COPYRIGHT
(c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.
With contributions from Jarkko Hietaniemi, Merijn Brand, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
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.
Module Install Instructions
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm Test::Smoke
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.