Main > Programming > Libraries >

Getargs::Long 1.1001

Getargs::Long 1.1001

Sponsored Links

Getargs::Long 1.1001 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.040 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1123
Date added: 2006-09-26
Publisher: Raphael Manfredi

Getargs::Long 1.1001 description

Getargs::Long is a Perl module with named subroutine arguments, with optional type checking.

SYNOPSIS

use Getargs::Long; # case sensitive
use Getargs::Long qw(ignorecase); # case insensitive

# Simple, args mandatory
my ($val, $other) = getargs(@_, qw(val other));

# Simple, args optional (in [] means optional)
my ($val, $other) = getargs(@_, [qw(val other)]);

# Simple with typechecking, args mandatory
my ($val, $other) = getargs(@_, qw(val=Class::X other=ARRAY));

# Simple with typechecking, args optional
my ($val, $other) = getargs(@_, [qw(val=Class::X other=ARRAY)]);

# Faster version, building dedicated argument parsing routine
my ($val, $other) = cgetargs(@_, qw(val other));

# Other cases, use full specs:
my ($x, $y, $z, $a, $b, $c) = xgetargs(@_,

# Non-mandatory, defaults to undef unless specified otherwise
x => [i], # integer, no default
y => [ARRAY, [a, b]], # Has a default
z => [], # No typecheck, can be anything

# Mandatory arguments
a => i, # integer (scalar)
b => TYPE, # TYPE or any heir of TYPE
c => undef, # unspecified type but mandatory
);

# Extract remaining unparsed args in @extra
my ($val, $other, @extra) = getargs(@_, { -strict => 0 }, qw(val other));

# Alter behaviour of the getargs() routines via switches in hashref
my ($val, $other) = getargs(@_,
{
-strict => 1, # unknown switches are fatal
-ignorecase => 1, # override packages global
-inplace => 1, # edit @_ inplace: remove parsed args
-extra => 0, # suppress return of extra arguments
},
qw(val other)
);

The Getargs::Long module allows usage of named parameters in function calls, along with optional argument type-checking. It provides an easy way to get at the parameters within the routine, and yields concise descriptions for the common cases of all-mandatory and all-optional parameter lists.

The validation of arguments can be done by a structure-driven routine getargs() which is fine for infrequently called routines (but should be slower), or via a dedicated routine created and compiled on the fly the fist time it is needed, by using the cgetargs() family (expected to be faster).

The Log::Agent module is used to report errors, which leaves to the application the choice of the final logging method: to a file, to STDERR, or to syslog.

Getargs::Long 1.1001 Screenshot

Advertisements

Getargs::Long 1.1001 Keywords

Bookmark Getargs::Long 1.1001

Hyperlink code:
Link for forum:

Getargs::Long 1.1001 Copyright

WareSeeker periodically updates pricing and software information of Getargs::Long 1.1001 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Getargs::Long 1.1001 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
GetArgs is a Perl module to allow enhanced argument passing. Free Download
AppConfig::Std is a Perl subclass of AppConfig that provides standard options. Free Download
Wais is a Perl module with access to freeWAIS-sf libraries. Free Download
Test::Data is a Perl module to test functions for particular variable types. Free Download
Set::Array Perl module contains arrays as objects with lots of handy methods and support for method chaining. Free Download
Data::Inherited is a Perl module with hierarchy-wide accumulation of list and hash results. Free Download
Curses is a terminal screen handling and optimization. Free Download
CGI::Expand is a Perl module that can convert flat hash to nested data using TT2s dot convention. Free Download