Argv
view release on metacpan or search on metacpan
modules, this one exists to hide the spaghetti.
EXTRA FEATURES
The I<execution methods> C<system, exec, and qx> extend their Perl
builtin analogues in a few ways. These are described fully in the POD
but generally are in the area of UNIX/Win32 portability. For instance,
they can automatically convert / pathnames to \ on Windows platforms
before exec-ing them, correctly quote command lines that will be
exposed to Windows shell-like parsing in cases where such exposure
wouldn't occur on a Unix platform, cause exec() to behave synchronously
on Windows as it does on Unix, etc.
Since many users may be interested only in these Unix/Windows portability
aids and may not care about having an OO approach to factoring argv's
into option sets, the 'system' and 'exec' methods are also made
available as regular functions which (if imported) override the
builtins. Thus users may find that adding
use Argv qw(system exec qv);
return !$_[0];
}
END {
print "\n1..", scalar @msgs, "\n", @msgs;
}
}
use Argv;
$final += printok(1);
# Make sure output arrives synchronously.
select(STDERR); $| = 1; select(STDOUT); $| = 1;
print "+ Testing basic construction and execution ...\n";
my $pl = Argv->new($^X, '-v');
$pl->stdout(0);
$pl->system;
$final += printok($? == 0);
print "+ Testing instance cloning ...\n";
$pl->clone->system;
( run in 0.291 second using v1.01-cache-2.11-cpan-0d8aa00de5b )