Filter::Arguments - Configure and read your command line arguments from @ARGV.

SYNOPSIS

use Filter::Arguments;

my $solo                : Argument(bool) = 1;
my ($a,$b,$c)           : Arguments(bool);
my ($d,$e,$f)           : Arguments(value);
my ($x,$y,$z)           : Arguments(xbool);
my ($three,$four,$five) : Arguments(value) = (3,4,5);
my ($six,$seven,$eight) : Arguments(bool)  = ('SIX','SEVEN','EIGHT');

my @result = (
    $solo,
    $a, $b, $c,
    $d, $e, $f,
    $x, $y, $z,
    $three, $four, $five,
    $six, $seven, $eight,
);
   
print join ',', @result;

if invoked as: $ script.pl --solo --a --b --c --d A --e B --f C --x --y --z --six

will print:

0,1,1,1,A,B,C,0,0,1,3,4,5,0,SEVEN,EIGHT

DESCRIPTION

Here is a simple way to configure and parse your command line arguments from @ARGV.

ARG TYPES

bool

This type of argument is either 1 or 0. If it is initialized to 1, then it will flip-flop to 0 if the arg is given.

xbool

The 'x' as in XOR boolean. Only one of these booleans can be true. The flip-flop behavior also applies to these also. So you may initialize them however, but if one is set then the others are set to the opposite value of the one that is set.

value

This type takes on the value of the next argument presented.

DEPENDENCIES

Template Filter::Simple

AUTHOR

Dylan Doxey <dylan.doxey@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Dylan Doxey

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 189:

=pod directives shouldn't be over one line long! Ignoring all 2 lines of content