Argv 1.19
Sponsored Links
Argv 1.19 Ranking & Summary
File size:
0.043 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
901
Date added:
2007-05-10
Publisher:
David Boyce
Argv 1.19 description
Argv is a Perl module that provides an OO interface to an arg vector.
SYNOPSIS
use Argv;
# A roundabout way of getting perls version.
my $pl = Argv->new(qw(perl -v));
$pl->exec;
# Run /bin/cat, showing how to provide "predigested" options.
Argv->new(/bin/cat, [qw(-u -n)], @ARGV)->system;
# A roundabout way of globbing.
my $echo = Argv->new(qw(echo M*));
$echo->glob;
my $globbed = $echo->qx;
print "echo M* globs to: $globbed";
# A demonstration of head-like behavior (aborting early)
my $maxLinesToPrint = 5;
my $callback = sub {
print shift;
return !(--$maxLinesToPrint);
};
my $head = Argv->new(ls, [qw(-l -a)]);
$head->readonly("yes");
$head->pipe($callback);
# A demonstration of the builtin xargs-like behavior.
my @files = split(/s+/, $globbed);
my $ls = Argv->new(qw(ls -d -l), @files);
$ls->parse(qw(d l));
$ls->dbglevel(1);
$ls->qxargs(1);
my @long = $ls->qx;
$ls->dbglevel(0);
print @long;
# A demonstration of how to use option sets in a wrapper program.
@ARGV = qw(Who -a -y foo -r); # hack up an @ARGV
my $who = Argv->new(@ARGV); # instantiate
$who->dbglevel(1); # set verbosity
$who->optset(qw(UNAME FOO WHO)); # define 3 option sets
$who->parseUNAME(qw(a m n p)); # parse these to set UNAME
$who->parseFOO(qw(y=s z)); # parse -y and -z to FOO
$who->parseWHO(r); # for the who cmd
warn "got -y flag in option set FOOn" if $who->flagFOO(y);
print Argv->new(uname, $who->optsUNAME)->qx;
$who->prog(lc $who->prog); # force $0 to lower case
$who->exec(qw(WHO)); # exec the who cmd
SYNOPSIS
use Argv;
# A roundabout way of getting perls version.
my $pl = Argv->new(qw(perl -v));
$pl->exec;
# Run /bin/cat, showing how to provide "predigested" options.
Argv->new(/bin/cat, [qw(-u -n)], @ARGV)->system;
# A roundabout way of globbing.
my $echo = Argv->new(qw(echo M*));
$echo->glob;
my $globbed = $echo->qx;
print "echo M* globs to: $globbed";
# A demonstration of head-like behavior (aborting early)
my $maxLinesToPrint = 5;
my $callback = sub {
print shift;
return !(--$maxLinesToPrint);
};
my $head = Argv->new(ls, [qw(-l -a)]);
$head->readonly("yes");
$head->pipe($callback);
# A demonstration of the builtin xargs-like behavior.
my @files = split(/s+/, $globbed);
my $ls = Argv->new(qw(ls -d -l), @files);
$ls->parse(qw(d l));
$ls->dbglevel(1);
$ls->qxargs(1);
my @long = $ls->qx;
$ls->dbglevel(0);
print @long;
# A demonstration of how to use option sets in a wrapper program.
@ARGV = qw(Who -a -y foo -r); # hack up an @ARGV
my $who = Argv->new(@ARGV); # instantiate
$who->dbglevel(1); # set verbosity
$who->optset(qw(UNAME FOO WHO)); # define 3 option sets
$who->parseUNAME(qw(a m n p)); # parse these to set UNAME
$who->parseFOO(qw(y=s z)); # parse -y and -z to FOO
$who->parseWHO(r); # for the who cmd
warn "got -y flag in option set FOOn" if $who->flagFOO(y);
print Argv->new(uname, $who->optsUNAME)->qx;
$who->prog(lc $who->prog); # force $0 to lower case
$who->exec(qw(WHO)); # exec the who cmd
Argv 1.19 Screenshot
Argv 1.19 Keywords
ARGV
OO
Argv 1.19
Perl module
OO interface
interface to
QW
new
Perl
arg
vector
provides
Argv 1.19
Libraries
Programming
Bookmark Argv 1.19
Argv 1.19 Copyright
WareSeeker periodically updates pricing and software information of Argv 1.19 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 Argv 1.19 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
perl modules
oo interfaces
install perl module
installing perl module
xml parser perl module
atrpms perl module helper
perl module tutorial
net ssleay perl module
perl module install
perlane
newsday
la perla
perlina handbags
fox news
3d interface to the planet
perl tutorial
provides nationwide internet access
argos
Related Software
The argparse module improves on the standard library optparse module in a number of ways, Free Download
SVL library provides vector and matrix classes, as well as a number of functions for performing vector arithmetic with them. Free Download
DBD::Oracle is a Perl module with Oracle database driver for the DBI module. Free Download
SVG::Parser is a Perl module with XML Parser for SVG documents. Free Download
Make is a Perl module for processing makefiles. Free Download
Apache::Storage is Perl module containing simple functions to store and retrieve information from within the Apache process. Free Download
GnuPG is a Perl module interface to the GNU Privacy Guard. Free Download
Dir::Purge is a Perl module to purge directories to a given number of files. Free Download
Latest Software
Popular Software
Favourite Software